astro-intlayer 8.0.4 → 8.0.5
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/index.cjs +1 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/package.json +8 -8
package/dist/cjs/index.cjs
CHANGED
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { getAlias, getConfiguration } from '@intlayer/config';\nimport type { AstroIntegration } from 'astro';\nimport {\n intlayerPrune,\n intlayerMiddleware as viteIntlayerMiddlewarePlugin,\n intlayer as viteIntlayerPlugin,\n} from 'vite-intlayer';\n\n/**\n * Astro integration for Intlayer.\n *\n * It handles:\n * 1. Preparing Intlayer resources (dictionaries) at config setup.\n * 2. Injecting Vite plugins for aliases, locale-based routing (middleware), and build optimizations (prune).\n * 3. Configuring Vite aliases for dictionary access.\n * 4. Starting a file watcher for dictionary changes during development.\n *\n * @returns An Astro integration object.\n *\n * @example\n * ```ts\n * // astro.config.mjs\n * import { defineConfig } from 'astro/config';\n * import { intlayer } from 'astro-intlayer';\n *\n * export default defineConfig({\n * integrations: [intlayer()],\n * });\n * ```\n */\nexport const intlayer = (): AstroIntegration =>\n ({\n name: 'astro-intlayer',\n hooks: {\n 'astro:config:setup': async ({ updateConfig }) => {\n const configuration = getConfiguration();\n const { optimize } = configuration.build;\n\n // Prepare once per process start to ensure generated entries exist\n await prepareIntlayer(configuration);\n\n updateConfig({\n vite: {\n plugins: [\n // Aliases + watcher + buildStart prep\n viteIntlayerPlugin(),\n // Dev-time middleware for locale routing\n viteIntlayerMiddlewarePlugin(),\n // Tree-shake/prune content when enabled\n ...(optimize ? [intlayerPrune(configuration) as any] : []),\n ],\n resolve: {\n alias: {\n ...getAlias({\n configuration,\n formatter: (value: string) => resolve(value),\n }),\n },\n },\n },\n });\n },\n\n 'astro:server:setup': async () => {\n const configuration = getConfiguration();\n if (configuration.content.watch) {\n watch({ configuration });\n }\n },\n },\n }) satisfies AstroIntegration;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { getAlias, getConfiguration } from '@intlayer/config';\nimport type { AstroIntegration } from 'astro';\nimport {\n intlayerPrune,\n intlayerMiddleware as viteIntlayerMiddlewarePlugin,\n intlayer as viteIntlayerPlugin,\n} from 'vite-intlayer';\n\n/**\n * Astro integration for Intlayer.\n *\n * It handles:\n * 1. Preparing Intlayer resources (dictionaries) at config setup.\n * 2. Injecting Vite plugins for aliases, locale-based routing (middleware), and build optimizations (prune).\n * 3. Configuring Vite aliases for dictionary access.\n * 4. Starting a file watcher for dictionary changes during development.\n *\n * @returns An Astro integration object.\n *\n * @example\n * ```ts\n * // astro.config.mjs\n * import { defineConfig } from 'astro/config';\n * import { intlayer } from 'astro-intlayer';\n *\n * export default defineConfig({\n * integrations: [intlayer()],\n * });\n * ```\n */\nexport const intlayer = (): AstroIntegration =>\n ({\n name: 'astro-intlayer',\n hooks: {\n 'astro:config:setup': async ({ updateConfig }) => {\n const configuration = getConfiguration();\n const { optimize } = configuration.build;\n\n // Prepare once per process start to ensure generated entries exist\n await prepareIntlayer(configuration);\n\n updateConfig({\n vite: {\n plugins: [\n // Aliases + watcher + buildStart prep\n viteIntlayerPlugin(),\n // Dev-time middleware for locale routing\n viteIntlayerMiddlewarePlugin(),\n // Tree-shake/prune content when enabled\n ...(optimize ? [intlayerPrune(configuration) as any] : []),\n ],\n resolve: {\n alias: {\n ...getAlias({\n configuration,\n formatter: (value: string) => resolve(value),\n }),\n },\n },\n },\n });\n },\n\n 'astro:server:setup': async () => {\n const configuration = getConfiguration();\n if (configuration.content.watch) {\n watch({ configuration });\n }\n },\n },\n }) satisfies AstroIntegration;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAa,kBACV;CACC,MAAM;CACN,OAAO;EACL,sBAAsB,OAAO,EAAE,mBAAmB;GAChD,MAAM,wDAAkC;GACxC,MAAM,EAAE,aAAa,cAAc;AAGnC,iDAAsB,cAAc;AAEpC,gBAAa,EACX,MAAM;IACJ,SAAS;kCAEa;4CAEU;KAE9B,GAAI,WAAW,kCAAe,cAAc,CAAQ,GAAG,EAAE;KAC1D;IACD,SAAS,EACP,OAAO,EACL,kCAAY;KACV;KACA,YAAY,iCAA0B,MAAM;KAC7C,CAAC,EACH,EACF;IACF,EACF,CAAC;;EAGJ,sBAAsB,YAAY;GAChC,MAAM,wDAAkC;AACxC,OAAI,cAAc,QAAQ,MACxB,+BAAM,EAAE,eAAe,CAAC;;EAG7B;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-intlayer",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Nuxt applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -77,20 +77,20 @@
|
|
|
77
77
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@intlayer/chokidar": "8.0.
|
|
81
|
-
"@intlayer/config": "8.0.
|
|
82
|
-
"@intlayer/core": "8.0.
|
|
83
|
-
"@intlayer/types": "8.0.
|
|
84
|
-
"vite-intlayer": "8.0.
|
|
80
|
+
"@intlayer/chokidar": "8.0.5",
|
|
81
|
+
"@intlayer/config": "8.0.5",
|
|
82
|
+
"@intlayer/core": "8.0.5",
|
|
83
|
+
"@intlayer/types": "8.0.5",
|
|
84
|
+
"vite-intlayer": "8.0.5"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@types/node": "25.
|
|
87
|
+
"@types/node": "25.2.2",
|
|
88
88
|
"@utils/ts-config": "1.0.4",
|
|
89
89
|
"@utils/ts-config-types": "1.0.4",
|
|
90
90
|
"@utils/tsdown-config": "1.0.4",
|
|
91
91
|
"fast-glob": "3.3.3",
|
|
92
92
|
"rimraf": "6.1.2",
|
|
93
|
-
"tsdown": "0.20.
|
|
93
|
+
"tsdown": "0.20.3",
|
|
94
94
|
"typescript": "5.9.3",
|
|
95
95
|
"vitest": "4.0.18"
|
|
96
96
|
},
|