@intlayer/chokidar 8.1.6 → 8.1.7
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/README.md +37 -28
- package/dist/assets/installSkills/skills/compiler.md +32 -0
- package/dist/cjs/installSkills/index.cjs +1 -1
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +1 -1
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/types/installSkills/index.d.ts +1 -0
- package/dist/types/installSkills/index.d.ts.map +1 -1
- package/package.json +11 -12
package/README.md
CHANGED
|
@@ -46,25 +46,26 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
46
46
|
|
|
47
47
|
## Keys benefits of Intlayer:
|
|
48
48
|
|
|
49
|
-
| Feature | Description
|
|
50
|
-
| --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more.
|
|
52
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content)
|
|
53
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file)
|
|
54
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
55
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
56
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
57
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
58
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
59
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
60
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
61
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
62
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
63
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
64
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
65
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
66
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
67
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/
|
|
49
|
+
| Feature | Description |
|
|
50
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
|
|
52
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
|
|
53
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
|
|
54
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
|
|
55
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
|
|
56
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
|
|
57
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
|
|
58
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/server_component.png?raw=true" alt="Feature" width="700"> | **Consistent Server Component Implementation**<br><br>Perfectly suited for Next.js server components, use the same implementation for both client and server components, no need to pass your `t` function across each server component. <br><br> - [Server Components](https://intlayer.org/doc/environment/nextjs#step-7-utilize-content-in-your-code) |
|
|
59
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
|
|
60
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
|
|
61
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
|
|
62
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
|
|
63
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
|
|
64
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
|
|
65
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
|
|
66
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
|
|
67
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
|
|
68
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) |
|
|
68
69
|
|
|
69
70
|
---
|
|
70
71
|
|
|
@@ -153,6 +154,8 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
153
154
|
<li><a href="https://intlayer.org/doc/concept/how-works-intlayer" rel=''>How Intlayer Works</a></li>
|
|
154
155
|
<li><a href="https://intlayer.org/doc/concept/configuration" rel=''>Configuration</a></li>
|
|
155
156
|
<li><a href="https://intlayer.org/doc/concept/cli" rel=''>Intlayer CLI</a></li>
|
|
157
|
+
<li><a href="https://intlayer.org/doc/compiler" rel=''>Compiler</a></li>
|
|
158
|
+
|
|
156
159
|
<li><a href="https://intlayer.org/doc/concept/editor" rel=''>Intlayer Editor</a></li>
|
|
157
160
|
<li><a href="https://intlayer.org/doc/concept/cms" rel=''>Intlayer CMS</a></li>
|
|
158
161
|
<li><a href="https://intlayer.org/doc/concept/content" rel=''>Dictionary</a>
|
|
@@ -179,17 +182,15 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
179
182
|
<li><a href="https://intlayer.org/doc/environment/nextjs/15" rel=''>Next.js 15</a></li>
|
|
180
183
|
<li><a href="https://intlayer.org/doc/environment/nextjs/14" rel=''>Next.js 14 (App Router)</a></li>
|
|
181
184
|
<li><a href="https://intlayer.org/doc/environment/nextjs/next-with-Page-Router" rel=''>Next.js Page Router</a></li>
|
|
185
|
+
<li><a href="https://intlayer.org/doc/environment/nextjs/compiler" rel=''>Next.js using Compiler</a></li>
|
|
182
186
|
</ul>
|
|
183
187
|
</li>
|
|
184
188
|
<li><a href="https://intlayer.org/doc/environment/create-react-app" rel=''>React CRA</a></li>
|
|
185
|
-
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React</a>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
</ul>
|
|
190
|
-
</li>
|
|
189
|
+
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React</a></li>
|
|
190
|
+
<li><a href="https://intlayer.org/doc/environment/vite-and-react" rel=''>Vite + React using Compiler</a></li>
|
|
191
|
+
<li><a href="https://intlayer.org/doc/environment/vite-and-react/compiler" rel=''>React-router-v7</a></li>
|
|
192
|
+
<li><a href="https://intlayer.org/doc/environment/vite-and-react/tanstack-start" rel=''>Tanstack start</a></li>
|
|
191
193
|
<li><a href="https://intlayer.org/doc/environment/react-native-and-expo" rel=''>React Native</a></li>
|
|
192
|
-
<li><a href="https://intlayer.org/doc/environment/lynx-and-react" rel=''>Lynx + React</a></li>
|
|
193
194
|
<li><a href="https://intlayer.org/doc/environment/vite-and-svelte" rel=''>Vite + Svelte</a></li>
|
|
194
195
|
<li><a href="https://intlayer.org/doc/environment/sveltekit" rel=''>SvelteKit</a></li>
|
|
195
196
|
<li><a href="https://intlayer.org/doc/environment/vite-and-preact" rel=''>Vite + Preact</a></li>
|
|
@@ -197,8 +198,16 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
197
198
|
<li><a href="https://intlayer.org/doc/environment/vite-and-nuxt" rel=''>Vite + Nuxt</a></li>
|
|
198
199
|
<li><a href="https://intlayer.org/doc/environment/vite-and-solid" rel=''>Vite + Solid</a></li>
|
|
199
200
|
<li><a href="https://intlayer.org/doc/environment/angular" rel=''>Angular</a></li>
|
|
200
|
-
<li
|
|
201
|
-
|
|
201
|
+
<li>
|
|
202
|
+
<a href="https://intlayer.org/doc/environment/express" rel=''>Backend</a>
|
|
203
|
+
<ul>
|
|
204
|
+
<li><a href="https://intlayer.org/doc/environment/express" rel=''>Express</a></li>
|
|
205
|
+
<li><a href="https://intlayer.org/doc/environment/nest" rel=''>NestJS</a></li>
|
|
206
|
+
<li><a href="https://intlayer.org/doc/environment/fastify" rel=''>Fastify</a></li>
|
|
207
|
+
<li><a href="https://intlayer.org/doc/environment/adonisjs" rel=''>AdonisJS</a></li>
|
|
208
|
+
<li><a href="https://intlayer.org/doc/environment/hono" rel=''>Hono</a></li>
|
|
209
|
+
</ul>
|
|
210
|
+
</li>
|
|
202
211
|
</ul>
|
|
203
212
|
</details>
|
|
204
213
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intlayer-compiler
|
|
3
|
+
description: Intlayer Compiler setup and usage. Configures automatic content extraction for your components without the need to define .content files manually.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Intlayer
|
|
6
|
+
url: https://intlayer.org
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
category: productivity
|
|
9
|
+
tags: [i18n, compiler]
|
|
10
|
+
documentation: https://intlayer.org/doc/compiler
|
|
11
|
+
support: contact@intlayer.org
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Intlayer Compiler Skill
|
|
15
|
+
|
|
16
|
+
The **Intlayer Compiler Skill** provides instructions on how to set up and use the Intlayer compiler to automatically extract content from your application.
|
|
17
|
+
|
|
18
|
+
## Key Features
|
|
19
|
+
|
|
20
|
+
- **Automatic Content Extraction**: All content will be extracted automatically from your components.
|
|
21
|
+
- **No Manual Content Files**: Alleviates the need to manually create `.content` files.
|
|
22
|
+
|
|
23
|
+
## Setup and Usage
|
|
24
|
+
|
|
25
|
+
To set up the Intlayer compiler for your project, refer to the documentation for your framework:
|
|
26
|
+
|
|
27
|
+
- [Vite + React Compiler Documentation](https://intlayer.org/doc/environment/vite-and-react/compiler)
|
|
28
|
+
- [Next.js Compiler Documentation](https://intlayer.org/doc/environment/nextjs/compiler)
|
|
29
|
+
|
|
30
|
+
Once the compiler plugins are properly configured, simply write your translatable strings inline according to the framework's specifics, and the Intlayer compiler will automatically generate the dictionaries.
|
|
31
|
+
|
|
32
|
+
For more information, visit the [Intlayer Compiler Architecture Documentation](https://intlayer.org/doc/compiler).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../_virtual/_utils_asset.cjs`);let n=require(`node:path`);n=e.__toESM(n);let r=require(`node:fs`),i=require(`@intlayer/core/markdown`);const a={Usage:`How to use Intlayer in your project`,RemoteContent:`How to use Intlayer with Remote/CMS/Server-side content`,Config:`Intlayer configuration documentation`,Content:`Reference for all Intlayer content node types (t, enu, etc.)`,React:`React-specific syntax and hooks usage`,Angular:`Angular-specific syntax and Injectable Function usage`,NextJS:`Next.js-specific usage (Server & Client components)`,Vue:`Vue-specific composables and syntax`,Preact:`Preact-specific syntax and hooks usage`,Solid:`Integrates Intlayer internationalization with SolidJS components. Use when the user asks to "setup SolidJS i18n", use the "useIntlayer" hook in Solid, or manage locales in a SolidJS application.`,Svelte:`Svelte-specific stores and syntax`,Astro:`Astro-specific usage and getIntlayer`,CLI:`Intlayer CLI commands and usage`},o=Object.keys(a),s={},c={Cursor:`.cursor/skills`,Windsurf:`.windsurf/skills`,Trae:`.trae/skills`,OpenCode:`.opencode/skills`,GitHub:`.github/skills`,Claude:`.claude/skills`,VSCode:`.vscode/skills`,Antigravity:`.agent/skills`,Augment:`.augment/skills`,OpenClaw:`skills`,Cline:`.cline/skills`,CodeBuddy:`.codebuddy/skills`,CommandCode:`.commandcode/skills`,Continue:`.continue/skills`,Crush:`.crush/skills`,Droid:`.factory/skills`,Goose:`.goose/skills`,Junie:`.junie/skills`,IFlow:`.iflow/skills`,KiloCode:`.kilocode/skills`,Kiro:`.kiro/skills`,Kode:`.kode/skills`,MCPJam:`.mcpjam/skills`,MistralVibe:`.vibe/skills`,Mux:`.mux/skills`,OpenHands:`.openhands/skills`,Pi:`.pi/skills`,Qoder:`.qoder/skills`,Qwen:`.qwen/skills`,RooCode:`.roo/skills`,TraeCN:`.trae/skills`,Zencoder:`.zencoder/skills`,Neovate:`.neovate/skills`,Pochi:`.pochi/skills`,Other:`skills`},l=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),u=e=>{let n=`./skills/${s[e]??l(e)}.md`;try{return t.readAsset(n)}catch{return console.warn(`Warning: Could not read asset for skill: ${e} at ${n}`),``}},d=()=>{try{return t.readAsset(`./LICENCE.md`)}catch{return console.warn(`Warning: Could not read LICENCE.md asset`),``}},f=async e=>{let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.statusText}`);return t.text()},p=async(e,t,a)=>{let o=c[t]??`skills`,p=n.default.join(e,o),m=t!==`VSCode`;await r.promises.mkdir(p,{recursive:!0});let h=[],g=d();for(let e of a){let t=`intlayer-${s[e]??l(e)}`,a=u(e);if(!a)continue;let o=Array.from(new Set(a.match(/https:\/\/intlayer\.org\/doc\/[^\s)]+\.md/g)||[]));if(m){let s=n.default.join(p,t),c=n.default.join(s,`references`);await r.promises.mkdir(c,{recursive:!0}),g&&await r.promises.writeFile(n.default.join(s,`LICENCE.md`),g,`utf-8`);let l=a,u=o.map(async t=>{try{let e=await f(t),n=(0,i.getMarkdownMetadata)(e),r=``;return r=Array.isArray(n.slugs)?n.slugs.filter(e=>e!==`doc`).join(`_`):new URL(t).pathname.split(`/`).filter(e=>e&&e!==`doc`).map(e=>e.replace(`.md`,``)).join(`_`),r=r?`${r}.md`:`index.md`,{url:t,localRefPath:`references/${r}`,fileName:r,content:e,success:!0}}catch(n){return console.warn(`Warning: Failed to download ref ${t} for skill ${e}`,n),{url:t,success:!1}}}),d=await Promise.all(u);for(let e of d)e.success&&e.fileName&&e.content&&e.localRefPath&&(await r.promises.writeFile(n.default.join(c,e.fileName),e.content,`utf-8`),l=l.replaceAll(e.url,e.localRefPath));let m=n.default.join(s,`SKILL.md`);await r.promises.writeFile(m,l,`utf-8`),h.push(`${t}/SKILL.md`)}else{let e=`${t}.md`,i=n.default.join(p,e);await r.promises.writeFile(i,a,`utf-8`),h.push(e)}}return h.length===0?`No skill files were created. Check your asset paths.`:`Created ${h.length} skills in ${p}`};exports.SKILLS=o,exports.SKILLS_METADATA=a,exports.installSkills=p;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../_virtual/_utils_asset.cjs`);let n=require(`node:path`);n=e.__toESM(n);let r=require(`node:fs`),i=require(`@intlayer/core/markdown`);const a={Usage:`How to use Intlayer in your project`,RemoteContent:`How to use Intlayer with Remote/CMS/Server-side content`,Config:`Intlayer configuration documentation`,Content:`Reference for all Intlayer content node types (t, enu, etc.)`,React:`React-specific syntax and hooks usage`,Angular:`Angular-specific syntax and Injectable Function usage`,NextJS:`Next.js-specific usage (Server & Client components)`,Vue:`Vue-specific composables and syntax`,Preact:`Preact-specific syntax and hooks usage`,Solid:`Integrates Intlayer internationalization with SolidJS components. Use when the user asks to "setup SolidJS i18n", use the "useIntlayer" hook in Solid, or manage locales in a SolidJS application.`,Svelte:`Svelte-specific stores and syntax`,Astro:`Astro-specific usage and getIntlayer`,CLI:`Intlayer CLI commands and usage`,Compiler:`Intlayer Compiler setup and usage for automatic content extraction without .content files`},o=Object.keys(a),s={},c={Cursor:`.cursor/skills`,Windsurf:`.windsurf/skills`,Trae:`.trae/skills`,OpenCode:`.opencode/skills`,GitHub:`.github/skills`,Claude:`.claude/skills`,VSCode:`.vscode/skills`,Antigravity:`.agent/skills`,Augment:`.augment/skills`,OpenClaw:`skills`,Cline:`.cline/skills`,CodeBuddy:`.codebuddy/skills`,CommandCode:`.commandcode/skills`,Continue:`.continue/skills`,Crush:`.crush/skills`,Droid:`.factory/skills`,Goose:`.goose/skills`,Junie:`.junie/skills`,IFlow:`.iflow/skills`,KiloCode:`.kilocode/skills`,Kiro:`.kiro/skills`,Kode:`.kode/skills`,MCPJam:`.mcpjam/skills`,MistralVibe:`.vibe/skills`,Mux:`.mux/skills`,OpenHands:`.openhands/skills`,Pi:`.pi/skills`,Qoder:`.qoder/skills`,Qwen:`.qwen/skills`,RooCode:`.roo/skills`,TraeCN:`.trae/skills`,Zencoder:`.zencoder/skills`,Neovate:`.neovate/skills`,Pochi:`.pochi/skills`,Other:`skills`},l=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),u=e=>{let n=`./skills/${s[e]??l(e)}.md`;try{return t.readAsset(n)}catch{return console.warn(`Warning: Could not read asset for skill: ${e} at ${n}`),``}},d=()=>{try{return t.readAsset(`./LICENCE.md`)}catch{return console.warn(`Warning: Could not read LICENCE.md asset`),``}},f=async e=>{let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.statusText}`);return t.text()},p=async(e,t,a)=>{let o=c[t]??`skills`,p=n.default.join(e,o),m=t!==`VSCode`;await r.promises.mkdir(p,{recursive:!0});let h=[],g=d();for(let e of a){let t=`intlayer-${s[e]??l(e)}`,a=u(e);if(!a)continue;let o=Array.from(new Set(a.match(/https:\/\/intlayer\.org\/doc\/[^\s)]+\.md/g)||[]));if(m){let s=n.default.join(p,t),c=n.default.join(s,`references`);await r.promises.mkdir(c,{recursive:!0}),g&&await r.promises.writeFile(n.default.join(s,`LICENCE.md`),g,`utf-8`);let l=a,u=o.map(async t=>{try{let e=await f(t),n=(0,i.getMarkdownMetadata)(e),r=``;return r=Array.isArray(n.slugs)?n.slugs.filter(e=>e!==`doc`).join(`_`):new URL(t).pathname.split(`/`).filter(e=>e&&e!==`doc`).map(e=>e.replace(`.md`,``)).join(`_`),r=r?`${r}.md`:`index.md`,{url:t,localRefPath:`references/${r}`,fileName:r,content:e,success:!0}}catch(n){return console.warn(`Warning: Failed to download ref ${t} for skill ${e}`,n),{url:t,success:!1}}}),d=await Promise.all(u);for(let e of d)e.success&&e.fileName&&e.content&&e.localRefPath&&(await r.promises.writeFile(n.default.join(c,e.fileName),e.content,`utf-8`),l=l.replaceAll(e.url,e.localRefPath));let m=n.default.join(s,`SKILL.md`);await r.promises.writeFile(m,l,`utf-8`),h.push(`${t}/SKILL.md`)}else{let e=`${t}.md`,i=n.default.join(p,e);await r.promises.writeFile(i,a,`utf-8`),h.push(e)}}return h.length===0?`No skill files were created. Check your asset paths.`:`Created ${h.length} skills in ${p}`};exports.SKILLS=o,exports.SKILLS_METADATA=a,exports.installSkills=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["readAsset","path","fs"],"sources":["../../../src/installSkills/index.ts"],"sourcesContent":["import { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { readAsset } from 'utils:asset';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\n\nexport const SKILLS_METADATA = {\n Usage: 'How to use Intlayer in your project',\n RemoteContent: 'How to use Intlayer with Remote/CMS/Server-side content',\n Config: 'Intlayer configuration documentation',\n Content: 'Reference for all Intlayer content node types (t, enu, etc.)',\n React: 'React-specific syntax and hooks usage',\n Angular: 'Angular-specific syntax and Injectable Function usage',\n NextJS: 'Next.js-specific usage (Server & Client components)',\n Vue: 'Vue-specific composables and syntax',\n Preact: 'Preact-specific syntax and hooks usage',\n Solid:\n 'Integrates Intlayer internationalization with SolidJS components. Use when the user asks to \"setup SolidJS i18n\", use the \"useIntlayer\" hook in Solid, or manage locales in a SolidJS application.',\n Svelte: 'Svelte-specific stores and syntax',\n Astro: 'Astro-specific usage and getIntlayer',\n CLI: 'Intlayer CLI commands and usage',\n} as const;\n\nexport const SKILLS = Object.keys(\n SKILLS_METADATA\n) as (keyof typeof SKILLS_METADATA)[];\n\nexport type Skill = (typeof SKILLS)[number];\n\n/**\n * Maps specific skill keys to special filenames if they differ from standard snake_case.\n */\nconst SKILL_FILENAME_MAP: Partial<Record<Skill, string>> = {};\n\n/**\n * Configuration for Platform paths to keep code clean.\n */\nconst PLATFORM_DIRS = {\n Cursor: '.cursor/skills',\n Windsurf: '.windsurf/skills',\n Trae: '.trae/skills',\n OpenCode: '.opencode/skills',\n GitHub: '.github/skills',\n Claude: '.claude/skills',\n VSCode: '.vscode/skills', // Fixed: VSCode usually uses .vscode, not .github\n Antigravity: '.agent/skills',\n Augment: '.augment/skills',\n OpenClaw: 'skills',\n Cline: '.cline/skills',\n CodeBuddy: '.codebuddy/skills',\n CommandCode: '.commandcode/skills',\n Continue: '.continue/skills',\n Crush: '.crush/skills',\n Droid: '.factory/skills',\n Goose: '.goose/skills',\n Junie: '.junie/skills',\n IFlow: '.iflow/skills',\n KiloCode: '.kilocode/skills',\n Kiro: '.kiro/skills',\n Kode: '.kode/skills',\n MCPJam: '.mcpjam/skills',\n MistralVibe: '.vibe/skills',\n Mux: '.mux/skills',\n OpenHands: '.openhands/skills',\n Pi: '.pi/skills',\n Qoder: '.qoder/skills',\n Qwen: '.qwen/skills',\n RooCode: '.roo/skills',\n TraeCN: '.trae/skills',\n Zencoder: '.zencoder/skills',\n Neovate: '.neovate/skills',\n Pochi: '.pochi/skills',\n Other: 'skills',\n};\n\nexport type Platform = keyof typeof PLATFORM_DIRS;\n\n/**\n * Helper to convert CamelCase to kebab-case for directory naming\n */\nconst camelToKebabCase = (str: string) =>\n str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Reads the raw markdown content for a specific skill from the assets folder.\n */\nconst getSkillContent = (skill: Skill): string => {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const fileName = `./skills/${baseName}.md`;\n\n try {\n return readAsset(fileName);\n } catch {\n console.warn(\n `Warning: Could not read asset for skill: ${skill} at ${fileName}`\n );\n return '';\n }\n};\n\n/**\n * Reads the licence content from the assets folder.\n */\nconst getLicenceContent = (): string => {\n try {\n return readAsset('./LICENCE.md');\n } catch {\n console.warn('Warning: Could not read LICENCE.md asset');\n return '';\n }\n};\n\n/**\n * Fetches the content of a URL using native fetch.\n */\nconst fetchUrlContent = async (url: string): Promise<string> => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch ${url}: ${response.statusText}`);\n }\n return response.text();\n};\n\n/**\n * Installs skills using the \"Agent Skills\" directory standard.\n * Standard: <PROJECT_ROOT>/<CONFIG_DIR>/skills/<SKILL_NAME>/SKILL.md\n */\nexport const installSkills = async (\n projectRoot: string,\n platform: Platform,\n skills: Skill[]\n): Promise<string> => {\n // 1. Determine destination directory\n const relativeDir = PLATFORM_DIRS[platform] ?? 'skills';\n const skillsBaseDir = path.join(projectRoot, relativeDir);\n\n const useAgentStructure = platform !== 'VSCode';\n\n // Ensure the base directory exists\n await fs.mkdir(skillsBaseDir, { recursive: true });\n\n const createdSkills: string[] = [];\n const licenceContent = getLicenceContent();\n\n for (const skill of skills) {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const skillName = `intlayer-${baseName}`;\n const skillContent = getSkillContent(skill);\n\n if (!skillContent) continue;\n\n // Extract unique URLs\n const urls = Array.from(\n new Set(\n skillContent.match(/https:\\/\\/intlayer\\.org\\/doc\\/[^\\s)]+\\.md/g) || []\n )\n );\n\n if (useAgentStructure) {\n // Agent Standard: .../skills/<skill-name>/SKILL.md\n const skillDir = path.join(skillsBaseDir, skillName);\n const referenceDir = path.join(skillDir, 'references');\n\n // Ensure directories exist\n await fs.mkdir(referenceDir, { recursive: true });\n\n // Write License\n if (licenceContent) {\n await fs.writeFile(\n path.join(skillDir, 'LICENCE.md'),\n licenceContent,\n 'utf-8'\n );\n }\n\n let updatedSkillContent = skillContent;\n\n // Parallel download of references\n const downloadPromises = urls.map(async (url) => {\n try {\n const content = await fetchUrlContent(url);\n const metadata = getMarkdownMetadata<{ slugs?: string[] }>(content);\n\n let fileName = '';\n\n // Determine filename from slugs or URL path\n if (Array.isArray(metadata.slugs)) {\n fileName = metadata.slugs\n .filter((slug) => slug !== 'doc')\n .join('_');\n } else {\n const urlPath = new URL(url).pathname;\n fileName = urlPath\n .split('/')\n .filter((part) => part && part !== 'doc')\n .map((part) => part.replace('.md', '')) // Clean extension for joining\n .join('_');\n }\n\n // Ensure it ends with .md\n fileName = fileName ? `${fileName}.md` : 'index.md';\n const localRefPath = `references/${fileName}`;\n\n return {\n url,\n localRefPath,\n fileName,\n content,\n success: true,\n };\n } catch (error) {\n console.warn(\n `Warning: Failed to download ref ${url} for skill ${skill}`,\n error\n );\n return { url, success: false };\n }\n });\n\n const results = await Promise.all(downloadPromises);\n\n // Process results: Write files and update content string\n for (const res of results) {\n if (res.success && res.fileName && res.content && res.localRefPath) {\n // Write the reference file\n await fs.writeFile(\n path.join(referenceDir, res.fileName),\n res.content,\n 'utf-8'\n );\n\n // Update the main content to point to local file\n updatedSkillContent = updatedSkillContent.replaceAll(\n res.url,\n res.localRefPath\n );\n }\n }\n\n // Write the main SKILL.md\n const filePath = path.join(skillDir, 'SKILL.md');\n await fs.writeFile(filePath, updatedSkillContent, 'utf-8');\n createdSkills.push(`${skillName}/SKILL.md`);\n } else {\n // Flat Structure (Generic/VSCode): .../skills/<skill-name>.md\n const fileName = `${skillName}.md`;\n const filePath = path.join(skillsBaseDir, fileName);\n\n await fs.writeFile(filePath, skillContent, 'utf-8');\n createdSkills.push(fileName);\n }\n }\n\n if (createdSkills.length === 0) {\n return `No skill files were created. Check your asset paths.`;\n }\n\n return `Created ${createdSkills.length} skills in ${skillsBaseDir}`;\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["readAsset","path","fs"],"sources":["../../../src/installSkills/index.ts"],"sourcesContent":["import { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { readAsset } from 'utils:asset';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\n\nexport const SKILLS_METADATA = {\n Usage: 'How to use Intlayer in your project',\n RemoteContent: 'How to use Intlayer with Remote/CMS/Server-side content',\n Config: 'Intlayer configuration documentation',\n Content: 'Reference for all Intlayer content node types (t, enu, etc.)',\n React: 'React-specific syntax and hooks usage',\n Angular: 'Angular-specific syntax and Injectable Function usage',\n NextJS: 'Next.js-specific usage (Server & Client components)',\n Vue: 'Vue-specific composables and syntax',\n Preact: 'Preact-specific syntax and hooks usage',\n Solid:\n 'Integrates Intlayer internationalization with SolidJS components. Use when the user asks to \"setup SolidJS i18n\", use the \"useIntlayer\" hook in Solid, or manage locales in a SolidJS application.',\n Svelte: 'Svelte-specific stores and syntax',\n Astro: 'Astro-specific usage and getIntlayer',\n CLI: 'Intlayer CLI commands and usage',\n Compiler:\n 'Intlayer Compiler setup and usage for automatic content extraction without .content files',\n} as const;\n\nexport const SKILLS = Object.keys(\n SKILLS_METADATA\n) as (keyof typeof SKILLS_METADATA)[];\n\nexport type Skill = (typeof SKILLS)[number];\n\n/**\n * Maps specific skill keys to special filenames if they differ from standard snake_case.\n */\nconst SKILL_FILENAME_MAP: Partial<Record<Skill, string>> = {};\n\n/**\n * Configuration for Platform paths to keep code clean.\n */\nconst PLATFORM_DIRS = {\n Cursor: '.cursor/skills',\n Windsurf: '.windsurf/skills',\n Trae: '.trae/skills',\n OpenCode: '.opencode/skills',\n GitHub: '.github/skills',\n Claude: '.claude/skills',\n VSCode: '.vscode/skills', // Fixed: VSCode usually uses .vscode, not .github\n Antigravity: '.agent/skills',\n Augment: '.augment/skills',\n OpenClaw: 'skills',\n Cline: '.cline/skills',\n CodeBuddy: '.codebuddy/skills',\n CommandCode: '.commandcode/skills',\n Continue: '.continue/skills',\n Crush: '.crush/skills',\n Droid: '.factory/skills',\n Goose: '.goose/skills',\n Junie: '.junie/skills',\n IFlow: '.iflow/skills',\n KiloCode: '.kilocode/skills',\n Kiro: '.kiro/skills',\n Kode: '.kode/skills',\n MCPJam: '.mcpjam/skills',\n MistralVibe: '.vibe/skills',\n Mux: '.mux/skills',\n OpenHands: '.openhands/skills',\n Pi: '.pi/skills',\n Qoder: '.qoder/skills',\n Qwen: '.qwen/skills',\n RooCode: '.roo/skills',\n TraeCN: '.trae/skills',\n Zencoder: '.zencoder/skills',\n Neovate: '.neovate/skills',\n Pochi: '.pochi/skills',\n Other: 'skills',\n};\n\nexport type Platform = keyof typeof PLATFORM_DIRS;\n\n/**\n * Helper to convert CamelCase to kebab-case for directory naming\n */\nconst camelToKebabCase = (str: string) =>\n str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Reads the raw markdown content for a specific skill from the assets folder.\n */\nconst getSkillContent = (skill: Skill): string => {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const fileName = `./skills/${baseName}.md`;\n\n try {\n return readAsset(fileName);\n } catch {\n console.warn(\n `Warning: Could not read asset for skill: ${skill} at ${fileName}`\n );\n return '';\n }\n};\n\n/**\n * Reads the licence content from the assets folder.\n */\nconst getLicenceContent = (): string => {\n try {\n return readAsset('./LICENCE.md');\n } catch {\n console.warn('Warning: Could not read LICENCE.md asset');\n return '';\n }\n};\n\n/**\n * Fetches the content of a URL using native fetch.\n */\nconst fetchUrlContent = async (url: string): Promise<string> => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch ${url}: ${response.statusText}`);\n }\n return response.text();\n};\n\n/**\n * Installs skills using the \"Agent Skills\" directory standard.\n * Standard: <PROJECT_ROOT>/<CONFIG_DIR>/skills/<SKILL_NAME>/SKILL.md\n */\nexport const installSkills = async (\n projectRoot: string,\n platform: Platform,\n skills: Skill[]\n): Promise<string> => {\n // 1. Determine destination directory\n const relativeDir = PLATFORM_DIRS[platform] ?? 'skills';\n const skillsBaseDir = path.join(projectRoot, relativeDir);\n\n const useAgentStructure = platform !== 'VSCode';\n\n // Ensure the base directory exists\n await fs.mkdir(skillsBaseDir, { recursive: true });\n\n const createdSkills: string[] = [];\n const licenceContent = getLicenceContent();\n\n for (const skill of skills) {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const skillName = `intlayer-${baseName}`;\n const skillContent = getSkillContent(skill);\n\n if (!skillContent) continue;\n\n // Extract unique URLs\n const urls = Array.from(\n new Set(\n skillContent.match(/https:\\/\\/intlayer\\.org\\/doc\\/[^\\s)]+\\.md/g) || []\n )\n );\n\n if (useAgentStructure) {\n // Agent Standard: .../skills/<skill-name>/SKILL.md\n const skillDir = path.join(skillsBaseDir, skillName);\n const referenceDir = path.join(skillDir, 'references');\n\n // Ensure directories exist\n await fs.mkdir(referenceDir, { recursive: true });\n\n // Write License\n if (licenceContent) {\n await fs.writeFile(\n path.join(skillDir, 'LICENCE.md'),\n licenceContent,\n 'utf-8'\n );\n }\n\n let updatedSkillContent = skillContent;\n\n // Parallel download of references\n const downloadPromises = urls.map(async (url) => {\n try {\n const content = await fetchUrlContent(url);\n const metadata = getMarkdownMetadata<{ slugs?: string[] }>(content);\n\n let fileName = '';\n\n // Determine filename from slugs or URL path\n if (Array.isArray(metadata.slugs)) {\n fileName = metadata.slugs\n .filter((slug) => slug !== 'doc')\n .join('_');\n } else {\n const urlPath = new URL(url).pathname;\n fileName = urlPath\n .split('/')\n .filter((part) => part && part !== 'doc')\n .map((part) => part.replace('.md', '')) // Clean extension for joining\n .join('_');\n }\n\n // Ensure it ends with .md\n fileName = fileName ? `${fileName}.md` : 'index.md';\n const localRefPath = `references/${fileName}`;\n\n return {\n url,\n localRefPath,\n fileName,\n content,\n success: true,\n };\n } catch (error) {\n console.warn(\n `Warning: Failed to download ref ${url} for skill ${skill}`,\n error\n );\n return { url, success: false };\n }\n });\n\n const results = await Promise.all(downloadPromises);\n\n // Process results: Write files and update content string\n for (const res of results) {\n if (res.success && res.fileName && res.content && res.localRefPath) {\n // Write the reference file\n await fs.writeFile(\n path.join(referenceDir, res.fileName),\n res.content,\n 'utf-8'\n );\n\n // Update the main content to point to local file\n updatedSkillContent = updatedSkillContent.replaceAll(\n res.url,\n res.localRefPath\n );\n }\n }\n\n // Write the main SKILL.md\n const filePath = path.join(skillDir, 'SKILL.md');\n await fs.writeFile(filePath, updatedSkillContent, 'utf-8');\n createdSkills.push(`${skillName}/SKILL.md`);\n } else {\n // Flat Structure (Generic/VSCode): .../skills/<skill-name>.md\n const fileName = `${skillName}.md`;\n const filePath = path.join(skillsBaseDir, fileName);\n\n await fs.writeFile(filePath, skillContent, 'utf-8');\n createdSkills.push(fileName);\n }\n }\n\n if (createdSkills.length === 0) {\n return `No skill files were created. Check your asset paths.`;\n }\n\n return `Created ${createdSkills.length} skills in ${skillsBaseDir}`;\n};\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{readAsset as e}from"../_virtual/_utils_asset.mjs";import t from"node:path";import{promises as n}from"node:fs";import{getMarkdownMetadata as r}from"@intlayer/core/markdown";const i={Usage:`How to use Intlayer in your project`,RemoteContent:`How to use Intlayer with Remote/CMS/Server-side content`,Config:`Intlayer configuration documentation`,Content:`Reference for all Intlayer content node types (t, enu, etc.)`,React:`React-specific syntax and hooks usage`,Angular:`Angular-specific syntax and Injectable Function usage`,NextJS:`Next.js-specific usage (Server & Client components)`,Vue:`Vue-specific composables and syntax`,Preact:`Preact-specific syntax and hooks usage`,Solid:`Integrates Intlayer internationalization with SolidJS components. Use when the user asks to "setup SolidJS i18n", use the "useIntlayer" hook in Solid, or manage locales in a SolidJS application.`,Svelte:`Svelte-specific stores and syntax`,Astro:`Astro-specific usage and getIntlayer`,CLI:`Intlayer CLI commands and usage`},a=Object.keys(i),o={},s={Cursor:`.cursor/skills`,Windsurf:`.windsurf/skills`,Trae:`.trae/skills`,OpenCode:`.opencode/skills`,GitHub:`.github/skills`,Claude:`.claude/skills`,VSCode:`.vscode/skills`,Antigravity:`.agent/skills`,Augment:`.augment/skills`,OpenClaw:`skills`,Cline:`.cline/skills`,CodeBuddy:`.codebuddy/skills`,CommandCode:`.commandcode/skills`,Continue:`.continue/skills`,Crush:`.crush/skills`,Droid:`.factory/skills`,Goose:`.goose/skills`,Junie:`.junie/skills`,IFlow:`.iflow/skills`,KiloCode:`.kilocode/skills`,Kiro:`.kiro/skills`,Kode:`.kode/skills`,MCPJam:`.mcpjam/skills`,MistralVibe:`.vibe/skills`,Mux:`.mux/skills`,OpenHands:`.openhands/skills`,Pi:`.pi/skills`,Qoder:`.qoder/skills`,Qwen:`.qwen/skills`,RooCode:`.roo/skills`,TraeCN:`.trae/skills`,Zencoder:`.zencoder/skills`,Neovate:`.neovate/skills`,Pochi:`.pochi/skills`,Other:`skills`},c=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),l=t=>{let n=`./skills/${o[t]??c(t)}.md`;try{return e(n)}catch{return console.warn(`Warning: Could not read asset for skill: ${t} at ${n}`),``}},u=()=>{try{return e(`./LICENCE.md`)}catch{return console.warn(`Warning: Could not read LICENCE.md asset`),``}},d=async e=>{let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.statusText}`);return t.text()},f=async(e,i,a)=>{let f=s[i]??`skills`,p=t.join(e,f),m=i!==`VSCode`;await n.mkdir(p,{recursive:!0});let h=[],g=u();for(let e of a){let i=`intlayer-${o[e]??c(e)}`,a=l(e);if(!a)continue;let s=Array.from(new Set(a.match(/https:\/\/intlayer\.org\/doc\/[^\s)]+\.md/g)||[]));if(m){let o=t.join(p,i),c=t.join(o,`references`);await n.mkdir(c,{recursive:!0}),g&&await n.writeFile(t.join(o,`LICENCE.md`),g,`utf-8`);let l=a,u=s.map(async t=>{try{let e=await d(t),n=r(e),i=``;return i=Array.isArray(n.slugs)?n.slugs.filter(e=>e!==`doc`).join(`_`):new URL(t).pathname.split(`/`).filter(e=>e&&e!==`doc`).map(e=>e.replace(`.md`,``)).join(`_`),i=i?`${i}.md`:`index.md`,{url:t,localRefPath:`references/${i}`,fileName:i,content:e,success:!0}}catch(n){return console.warn(`Warning: Failed to download ref ${t} for skill ${e}`,n),{url:t,success:!1}}}),f=await Promise.all(u);for(let e of f)e.success&&e.fileName&&e.content&&e.localRefPath&&(await n.writeFile(t.join(c,e.fileName),e.content,`utf-8`),l=l.replaceAll(e.url,e.localRefPath));let m=t.join(o,`SKILL.md`);await n.writeFile(m,l,`utf-8`),h.push(`${i}/SKILL.md`)}else{let e=`${i}.md`,r=t.join(p,e);await n.writeFile(r,a,`utf-8`),h.push(e)}}return h.length===0?`No skill files were created. Check your asset paths.`:`Created ${h.length} skills in ${p}`};export{a as SKILLS,i as SKILLS_METADATA,f as installSkills};
|
|
1
|
+
import{readAsset as e}from"../_virtual/_utils_asset.mjs";import t from"node:path";import{promises as n}from"node:fs";import{getMarkdownMetadata as r}from"@intlayer/core/markdown";const i={Usage:`How to use Intlayer in your project`,RemoteContent:`How to use Intlayer with Remote/CMS/Server-side content`,Config:`Intlayer configuration documentation`,Content:`Reference for all Intlayer content node types (t, enu, etc.)`,React:`React-specific syntax and hooks usage`,Angular:`Angular-specific syntax and Injectable Function usage`,NextJS:`Next.js-specific usage (Server & Client components)`,Vue:`Vue-specific composables and syntax`,Preact:`Preact-specific syntax and hooks usage`,Solid:`Integrates Intlayer internationalization with SolidJS components. Use when the user asks to "setup SolidJS i18n", use the "useIntlayer" hook in Solid, or manage locales in a SolidJS application.`,Svelte:`Svelte-specific stores and syntax`,Astro:`Astro-specific usage and getIntlayer`,CLI:`Intlayer CLI commands and usage`,Compiler:`Intlayer Compiler setup and usage for automatic content extraction without .content files`},a=Object.keys(i),o={},s={Cursor:`.cursor/skills`,Windsurf:`.windsurf/skills`,Trae:`.trae/skills`,OpenCode:`.opencode/skills`,GitHub:`.github/skills`,Claude:`.claude/skills`,VSCode:`.vscode/skills`,Antigravity:`.agent/skills`,Augment:`.augment/skills`,OpenClaw:`skills`,Cline:`.cline/skills`,CodeBuddy:`.codebuddy/skills`,CommandCode:`.commandcode/skills`,Continue:`.continue/skills`,Crush:`.crush/skills`,Droid:`.factory/skills`,Goose:`.goose/skills`,Junie:`.junie/skills`,IFlow:`.iflow/skills`,KiloCode:`.kilocode/skills`,Kiro:`.kiro/skills`,Kode:`.kode/skills`,MCPJam:`.mcpjam/skills`,MistralVibe:`.vibe/skills`,Mux:`.mux/skills`,OpenHands:`.openhands/skills`,Pi:`.pi/skills`,Qoder:`.qoder/skills`,Qwen:`.qwen/skills`,RooCode:`.roo/skills`,TraeCN:`.trae/skills`,Zencoder:`.zencoder/skills`,Neovate:`.neovate/skills`,Pochi:`.pochi/skills`,Other:`skills`},c=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),l=t=>{let n=`./skills/${o[t]??c(t)}.md`;try{return e(n)}catch{return console.warn(`Warning: Could not read asset for skill: ${t} at ${n}`),``}},u=()=>{try{return e(`./LICENCE.md`)}catch{return console.warn(`Warning: Could not read LICENCE.md asset`),``}},d=async e=>{let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.statusText}`);return t.text()},f=async(e,i,a)=>{let f=s[i]??`skills`,p=t.join(e,f),m=i!==`VSCode`;await n.mkdir(p,{recursive:!0});let h=[],g=u();for(let e of a){let i=`intlayer-${o[e]??c(e)}`,a=l(e);if(!a)continue;let s=Array.from(new Set(a.match(/https:\/\/intlayer\.org\/doc\/[^\s)]+\.md/g)||[]));if(m){let o=t.join(p,i),c=t.join(o,`references`);await n.mkdir(c,{recursive:!0}),g&&await n.writeFile(t.join(o,`LICENCE.md`),g,`utf-8`);let l=a,u=s.map(async t=>{try{let e=await d(t),n=r(e),i=``;return i=Array.isArray(n.slugs)?n.slugs.filter(e=>e!==`doc`).join(`_`):new URL(t).pathname.split(`/`).filter(e=>e&&e!==`doc`).map(e=>e.replace(`.md`,``)).join(`_`),i=i?`${i}.md`:`index.md`,{url:t,localRefPath:`references/${i}`,fileName:i,content:e,success:!0}}catch(n){return console.warn(`Warning: Failed to download ref ${t} for skill ${e}`,n),{url:t,success:!1}}}),f=await Promise.all(u);for(let e of f)e.success&&e.fileName&&e.content&&e.localRefPath&&(await n.writeFile(t.join(c,e.fileName),e.content,`utf-8`),l=l.replaceAll(e.url,e.localRefPath));let m=t.join(o,`SKILL.md`);await n.writeFile(m,l,`utf-8`),h.push(`${i}/SKILL.md`)}else{let e=`${i}.md`,r=t.join(p,e);await n.writeFile(r,a,`utf-8`),h.push(e)}}return h.length===0?`No skill files were created. Check your asset paths.`:`Created ${h.length} skills in ${p}`};export{a as SKILLS,i as SKILLS_METADATA,f as installSkills};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["fs"],"sources":["../../../src/installSkills/index.ts"],"sourcesContent":["import { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { readAsset } from 'utils:asset';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\n\nexport const SKILLS_METADATA = {\n Usage: 'How to use Intlayer in your project',\n RemoteContent: 'How to use Intlayer with Remote/CMS/Server-side content',\n Config: 'Intlayer configuration documentation',\n Content: 'Reference for all Intlayer content node types (t, enu, etc.)',\n React: 'React-specific syntax and hooks usage',\n Angular: 'Angular-specific syntax and Injectable Function usage',\n NextJS: 'Next.js-specific usage (Server & Client components)',\n Vue: 'Vue-specific composables and syntax',\n Preact: 'Preact-specific syntax and hooks usage',\n Solid:\n 'Integrates Intlayer internationalization with SolidJS components. Use when the user asks to \"setup SolidJS i18n\", use the \"useIntlayer\" hook in Solid, or manage locales in a SolidJS application.',\n Svelte: 'Svelte-specific stores and syntax',\n Astro: 'Astro-specific usage and getIntlayer',\n CLI: 'Intlayer CLI commands and usage',\n} as const;\n\nexport const SKILLS = Object.keys(\n SKILLS_METADATA\n) as (keyof typeof SKILLS_METADATA)[];\n\nexport type Skill = (typeof SKILLS)[number];\n\n/**\n * Maps specific skill keys to special filenames if they differ from standard snake_case.\n */\nconst SKILL_FILENAME_MAP: Partial<Record<Skill, string>> = {};\n\n/**\n * Configuration for Platform paths to keep code clean.\n */\nconst PLATFORM_DIRS = {\n Cursor: '.cursor/skills',\n Windsurf: '.windsurf/skills',\n Trae: '.trae/skills',\n OpenCode: '.opencode/skills',\n GitHub: '.github/skills',\n Claude: '.claude/skills',\n VSCode: '.vscode/skills', // Fixed: VSCode usually uses .vscode, not .github\n Antigravity: '.agent/skills',\n Augment: '.augment/skills',\n OpenClaw: 'skills',\n Cline: '.cline/skills',\n CodeBuddy: '.codebuddy/skills',\n CommandCode: '.commandcode/skills',\n Continue: '.continue/skills',\n Crush: '.crush/skills',\n Droid: '.factory/skills',\n Goose: '.goose/skills',\n Junie: '.junie/skills',\n IFlow: '.iflow/skills',\n KiloCode: '.kilocode/skills',\n Kiro: '.kiro/skills',\n Kode: '.kode/skills',\n MCPJam: '.mcpjam/skills',\n MistralVibe: '.vibe/skills',\n Mux: '.mux/skills',\n OpenHands: '.openhands/skills',\n Pi: '.pi/skills',\n Qoder: '.qoder/skills',\n Qwen: '.qwen/skills',\n RooCode: '.roo/skills',\n TraeCN: '.trae/skills',\n Zencoder: '.zencoder/skills',\n Neovate: '.neovate/skills',\n Pochi: '.pochi/skills',\n Other: 'skills',\n};\n\nexport type Platform = keyof typeof PLATFORM_DIRS;\n\n/**\n * Helper to convert CamelCase to kebab-case for directory naming\n */\nconst camelToKebabCase = (str: string) =>\n str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Reads the raw markdown content for a specific skill from the assets folder.\n */\nconst getSkillContent = (skill: Skill): string => {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const fileName = `./skills/${baseName}.md`;\n\n try {\n return readAsset(fileName);\n } catch {\n console.warn(\n `Warning: Could not read asset for skill: ${skill} at ${fileName}`\n );\n return '';\n }\n};\n\n/**\n * Reads the licence content from the assets folder.\n */\nconst getLicenceContent = (): string => {\n try {\n return readAsset('./LICENCE.md');\n } catch {\n console.warn('Warning: Could not read LICENCE.md asset');\n return '';\n }\n};\n\n/**\n * Fetches the content of a URL using native fetch.\n */\nconst fetchUrlContent = async (url: string): Promise<string> => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch ${url}: ${response.statusText}`);\n }\n return response.text();\n};\n\n/**\n * Installs skills using the \"Agent Skills\" directory standard.\n * Standard: <PROJECT_ROOT>/<CONFIG_DIR>/skills/<SKILL_NAME>/SKILL.md\n */\nexport const installSkills = async (\n projectRoot: string,\n platform: Platform,\n skills: Skill[]\n): Promise<string> => {\n // 1. Determine destination directory\n const relativeDir = PLATFORM_DIRS[platform] ?? 'skills';\n const skillsBaseDir = path.join(projectRoot, relativeDir);\n\n const useAgentStructure = platform !== 'VSCode';\n\n // Ensure the base directory exists\n await fs.mkdir(skillsBaseDir, { recursive: true });\n\n const createdSkills: string[] = [];\n const licenceContent = getLicenceContent();\n\n for (const skill of skills) {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const skillName = `intlayer-${baseName}`;\n const skillContent = getSkillContent(skill);\n\n if (!skillContent) continue;\n\n // Extract unique URLs\n const urls = Array.from(\n new Set(\n skillContent.match(/https:\\/\\/intlayer\\.org\\/doc\\/[^\\s)]+\\.md/g) || []\n )\n );\n\n if (useAgentStructure) {\n // Agent Standard: .../skills/<skill-name>/SKILL.md\n const skillDir = path.join(skillsBaseDir, skillName);\n const referenceDir = path.join(skillDir, 'references');\n\n // Ensure directories exist\n await fs.mkdir(referenceDir, { recursive: true });\n\n // Write License\n if (licenceContent) {\n await fs.writeFile(\n path.join(skillDir, 'LICENCE.md'),\n licenceContent,\n 'utf-8'\n );\n }\n\n let updatedSkillContent = skillContent;\n\n // Parallel download of references\n const downloadPromises = urls.map(async (url) => {\n try {\n const content = await fetchUrlContent(url);\n const metadata = getMarkdownMetadata<{ slugs?: string[] }>(content);\n\n let fileName = '';\n\n // Determine filename from slugs or URL path\n if (Array.isArray(metadata.slugs)) {\n fileName = metadata.slugs\n .filter((slug) => slug !== 'doc')\n .join('_');\n } else {\n const urlPath = new URL(url).pathname;\n fileName = urlPath\n .split('/')\n .filter((part) => part && part !== 'doc')\n .map((part) => part.replace('.md', '')) // Clean extension for joining\n .join('_');\n }\n\n // Ensure it ends with .md\n fileName = fileName ? `${fileName}.md` : 'index.md';\n const localRefPath = `references/${fileName}`;\n\n return {\n url,\n localRefPath,\n fileName,\n content,\n success: true,\n };\n } catch (error) {\n console.warn(\n `Warning: Failed to download ref ${url} for skill ${skill}`,\n error\n );\n return { url, success: false };\n }\n });\n\n const results = await Promise.all(downloadPromises);\n\n // Process results: Write files and update content string\n for (const res of results) {\n if (res.success && res.fileName && res.content && res.localRefPath) {\n // Write the reference file\n await fs.writeFile(\n path.join(referenceDir, res.fileName),\n res.content,\n 'utf-8'\n );\n\n // Update the main content to point to local file\n updatedSkillContent = updatedSkillContent.replaceAll(\n res.url,\n res.localRefPath\n );\n }\n }\n\n // Write the main SKILL.md\n const filePath = path.join(skillDir, 'SKILL.md');\n await fs.writeFile(filePath, updatedSkillContent, 'utf-8');\n createdSkills.push(`${skillName}/SKILL.md`);\n } else {\n // Flat Structure (Generic/VSCode): .../skills/<skill-name>.md\n const fileName = `${skillName}.md`;\n const filePath = path.join(skillsBaseDir, fileName);\n\n await fs.writeFile(filePath, skillContent, 'utf-8');\n createdSkills.push(fileName);\n }\n }\n\n if (createdSkills.length === 0) {\n return `No skill files were created. Check your asset paths.`;\n }\n\n return `Created ${createdSkills.length} skills in ${skillsBaseDir}`;\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["fs"],"sources":["../../../src/installSkills/index.ts"],"sourcesContent":["import { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { readAsset } from 'utils:asset';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\n\nexport const SKILLS_METADATA = {\n Usage: 'How to use Intlayer in your project',\n RemoteContent: 'How to use Intlayer with Remote/CMS/Server-side content',\n Config: 'Intlayer configuration documentation',\n Content: 'Reference for all Intlayer content node types (t, enu, etc.)',\n React: 'React-specific syntax and hooks usage',\n Angular: 'Angular-specific syntax and Injectable Function usage',\n NextJS: 'Next.js-specific usage (Server & Client components)',\n Vue: 'Vue-specific composables and syntax',\n Preact: 'Preact-specific syntax and hooks usage',\n Solid:\n 'Integrates Intlayer internationalization with SolidJS components. Use when the user asks to \"setup SolidJS i18n\", use the \"useIntlayer\" hook in Solid, or manage locales in a SolidJS application.',\n Svelte: 'Svelte-specific stores and syntax',\n Astro: 'Astro-specific usage and getIntlayer',\n CLI: 'Intlayer CLI commands and usage',\n Compiler:\n 'Intlayer Compiler setup and usage for automatic content extraction without .content files',\n} as const;\n\nexport const SKILLS = Object.keys(\n SKILLS_METADATA\n) as (keyof typeof SKILLS_METADATA)[];\n\nexport type Skill = (typeof SKILLS)[number];\n\n/**\n * Maps specific skill keys to special filenames if they differ from standard snake_case.\n */\nconst SKILL_FILENAME_MAP: Partial<Record<Skill, string>> = {};\n\n/**\n * Configuration for Platform paths to keep code clean.\n */\nconst PLATFORM_DIRS = {\n Cursor: '.cursor/skills',\n Windsurf: '.windsurf/skills',\n Trae: '.trae/skills',\n OpenCode: '.opencode/skills',\n GitHub: '.github/skills',\n Claude: '.claude/skills',\n VSCode: '.vscode/skills', // Fixed: VSCode usually uses .vscode, not .github\n Antigravity: '.agent/skills',\n Augment: '.augment/skills',\n OpenClaw: 'skills',\n Cline: '.cline/skills',\n CodeBuddy: '.codebuddy/skills',\n CommandCode: '.commandcode/skills',\n Continue: '.continue/skills',\n Crush: '.crush/skills',\n Droid: '.factory/skills',\n Goose: '.goose/skills',\n Junie: '.junie/skills',\n IFlow: '.iflow/skills',\n KiloCode: '.kilocode/skills',\n Kiro: '.kiro/skills',\n Kode: '.kode/skills',\n MCPJam: '.mcpjam/skills',\n MistralVibe: '.vibe/skills',\n Mux: '.mux/skills',\n OpenHands: '.openhands/skills',\n Pi: '.pi/skills',\n Qoder: '.qoder/skills',\n Qwen: '.qwen/skills',\n RooCode: '.roo/skills',\n TraeCN: '.trae/skills',\n Zencoder: '.zencoder/skills',\n Neovate: '.neovate/skills',\n Pochi: '.pochi/skills',\n Other: 'skills',\n};\n\nexport type Platform = keyof typeof PLATFORM_DIRS;\n\n/**\n * Helper to convert CamelCase to kebab-case for directory naming\n */\nconst camelToKebabCase = (str: string) =>\n str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Reads the raw markdown content for a specific skill from the assets folder.\n */\nconst getSkillContent = (skill: Skill): string => {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const fileName = `./skills/${baseName}.md`;\n\n try {\n return readAsset(fileName);\n } catch {\n console.warn(\n `Warning: Could not read asset for skill: ${skill} at ${fileName}`\n );\n return '';\n }\n};\n\n/**\n * Reads the licence content from the assets folder.\n */\nconst getLicenceContent = (): string => {\n try {\n return readAsset('./LICENCE.md');\n } catch {\n console.warn('Warning: Could not read LICENCE.md asset');\n return '';\n }\n};\n\n/**\n * Fetches the content of a URL using native fetch.\n */\nconst fetchUrlContent = async (url: string): Promise<string> => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch ${url}: ${response.statusText}`);\n }\n return response.text();\n};\n\n/**\n * Installs skills using the \"Agent Skills\" directory standard.\n * Standard: <PROJECT_ROOT>/<CONFIG_DIR>/skills/<SKILL_NAME>/SKILL.md\n */\nexport const installSkills = async (\n projectRoot: string,\n platform: Platform,\n skills: Skill[]\n): Promise<string> => {\n // 1. Determine destination directory\n const relativeDir = PLATFORM_DIRS[platform] ?? 'skills';\n const skillsBaseDir = path.join(projectRoot, relativeDir);\n\n const useAgentStructure = platform !== 'VSCode';\n\n // Ensure the base directory exists\n await fs.mkdir(skillsBaseDir, { recursive: true });\n\n const createdSkills: string[] = [];\n const licenceContent = getLicenceContent();\n\n for (const skill of skills) {\n const baseName = SKILL_FILENAME_MAP[skill] ?? camelToKebabCase(skill);\n const skillName = `intlayer-${baseName}`;\n const skillContent = getSkillContent(skill);\n\n if (!skillContent) continue;\n\n // Extract unique URLs\n const urls = Array.from(\n new Set(\n skillContent.match(/https:\\/\\/intlayer\\.org\\/doc\\/[^\\s)]+\\.md/g) || []\n )\n );\n\n if (useAgentStructure) {\n // Agent Standard: .../skills/<skill-name>/SKILL.md\n const skillDir = path.join(skillsBaseDir, skillName);\n const referenceDir = path.join(skillDir, 'references');\n\n // Ensure directories exist\n await fs.mkdir(referenceDir, { recursive: true });\n\n // Write License\n if (licenceContent) {\n await fs.writeFile(\n path.join(skillDir, 'LICENCE.md'),\n licenceContent,\n 'utf-8'\n );\n }\n\n let updatedSkillContent = skillContent;\n\n // Parallel download of references\n const downloadPromises = urls.map(async (url) => {\n try {\n const content = await fetchUrlContent(url);\n const metadata = getMarkdownMetadata<{ slugs?: string[] }>(content);\n\n let fileName = '';\n\n // Determine filename from slugs or URL path\n if (Array.isArray(metadata.slugs)) {\n fileName = metadata.slugs\n .filter((slug) => slug !== 'doc')\n .join('_');\n } else {\n const urlPath = new URL(url).pathname;\n fileName = urlPath\n .split('/')\n .filter((part) => part && part !== 'doc')\n .map((part) => part.replace('.md', '')) // Clean extension for joining\n .join('_');\n }\n\n // Ensure it ends with .md\n fileName = fileName ? `${fileName}.md` : 'index.md';\n const localRefPath = `references/${fileName}`;\n\n return {\n url,\n localRefPath,\n fileName,\n content,\n success: true,\n };\n } catch (error) {\n console.warn(\n `Warning: Failed to download ref ${url} for skill ${skill}`,\n error\n );\n return { url, success: false };\n }\n });\n\n const results = await Promise.all(downloadPromises);\n\n // Process results: Write files and update content string\n for (const res of results) {\n if (res.success && res.fileName && res.content && res.localRefPath) {\n // Write the reference file\n await fs.writeFile(\n path.join(referenceDir, res.fileName),\n res.content,\n 'utf-8'\n );\n\n // Update the main content to point to local file\n updatedSkillContent = updatedSkillContent.replaceAll(\n res.url,\n res.localRefPath\n );\n }\n }\n\n // Write the main SKILL.md\n const filePath = path.join(skillDir, 'SKILL.md');\n await fs.writeFile(filePath, updatedSkillContent, 'utf-8');\n createdSkills.push(`${skillName}/SKILL.md`);\n } else {\n // Flat Structure (Generic/VSCode): .../skills/<skill-name>.md\n const fileName = `${skillName}.md`;\n const filePath = path.join(skillsBaseDir, fileName);\n\n await fs.writeFile(filePath, skillContent, 'utf-8');\n createdSkills.push(fileName);\n }\n }\n\n if (createdSkills.length === 0) {\n return `No skill files were created. Check your asset paths.`;\n }\n\n return `Created ${createdSkills.length} skills in ${skillsBaseDir}`;\n};\n"],"mappings":"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"}
|
|
@@ -13,6 +13,7 @@ declare const SKILLS_METADATA: {
|
|
|
13
13
|
readonly Svelte: "Svelte-specific stores and syntax";
|
|
14
14
|
readonly Astro: "Astro-specific usage and getIntlayer";
|
|
15
15
|
readonly CLI: "Intlayer CLI commands and usage";
|
|
16
|
+
readonly Compiler: "Intlayer Compiler setup and usage for automatic content extraction without .content files";
|
|
16
17
|
};
|
|
17
18
|
declare const SKILLS: (keyof typeof SKILLS_METADATA)[];
|
|
18
19
|
type Skill = (typeof SKILLS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/installSkills/index.ts"],"mappings":";cAKa,eAAA;EAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/installSkills/index.ts"],"mappings":";cAKa,eAAA;EAAA;;;;;;;;;;;;;;;cAmBA,MAAA,gBAEM,eAAA;AAAA,KAEP,KAAA,WAAgB,MAAA;;;;cAUtB,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsCM,QAAA,gBAAwB,aAAA;;;;;cAoDvB,aAAA,GACX,WAAA,UACA,QAAA,EAAU,QAAA,EACV,MAAA,EAAQ,KAAA,OACP,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/chokidar",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
"./package.json"
|
|
85
85
|
],
|
|
86
86
|
"scripts": {
|
|
87
|
-
"_prepublish": "cp -f ../../../README.md ./README.md",
|
|
88
87
|
"build": "tsdown --config tsdown.config.ts",
|
|
89
88
|
"build:ci": "tsdown --config tsdown.config.ts",
|
|
90
89
|
"clean": "rimraf ./dist .turbo",
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
"format:fix": "biome format --write .",
|
|
94
93
|
"lint": "biome lint .",
|
|
95
94
|
"lint:fix": "biome lint --write .",
|
|
96
|
-
"prepublish": "
|
|
95
|
+
"prepublish": "cp -f ../../../README.md ./README.md",
|
|
97
96
|
"publish": "bun publish || true",
|
|
98
97
|
"publish:canary": "bun publish --access public --tag canary || true",
|
|
99
98
|
"publish:latest": "bun publish --access public --tag latest || true",
|
|
@@ -102,13 +101,13 @@
|
|
|
102
101
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
103
102
|
},
|
|
104
103
|
"dependencies": {
|
|
105
|
-
"@intlayer/api": "8.1.
|
|
106
|
-
"@intlayer/config": "8.1.
|
|
107
|
-
"@intlayer/core": "8.1.
|
|
108
|
-
"@intlayer/dictionaries-entry": "8.1.
|
|
109
|
-
"@intlayer/remote-dictionaries-entry": "8.1.
|
|
110
|
-
"@intlayer/types": "8.1.
|
|
111
|
-
"@intlayer/unmerged-dictionaries-entry": "8.1.
|
|
104
|
+
"@intlayer/api": "8.1.7",
|
|
105
|
+
"@intlayer/config": "8.1.7",
|
|
106
|
+
"@intlayer/core": "8.1.7",
|
|
107
|
+
"@intlayer/dictionaries-entry": "8.1.7",
|
|
108
|
+
"@intlayer/remote-dictionaries-entry": "8.1.7",
|
|
109
|
+
"@intlayer/types": "8.1.7",
|
|
110
|
+
"@intlayer/unmerged-dictionaries-entry": "8.1.7",
|
|
112
111
|
"chokidar": "3.6.0",
|
|
113
112
|
"crypto-js": "4.2.0",
|
|
114
113
|
"defu": "6.1.4",
|
|
@@ -130,8 +129,8 @@
|
|
|
130
129
|
"zod": "4.3.6"
|
|
131
130
|
},
|
|
132
131
|
"peerDependencies": {
|
|
133
|
-
"@intlayer/svelte-transformer": "8.1.
|
|
134
|
-
"@intlayer/vue-transformer": "8.1.
|
|
132
|
+
"@intlayer/svelte-transformer": "8.1.7",
|
|
133
|
+
"@intlayer/vue-transformer": "8.1.7"
|
|
135
134
|
},
|
|
136
135
|
"peerDependenciesMeta": {
|
|
137
136
|
"@intlayer/svelte-transformer": {
|