@intlayer/engine 9.5.11 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/installSkills/skills/bundle-optimization.md +123 -0
- package/dist/assets/installSkills/skills/cli.md +28 -1
- package/dist/assets/installSkills/skills/compat.md +1 -5
- package/dist/assets/installSkills/skills/content.md +8 -2
- package/dist/assets/installSkills/skills/dev-tools.md +8 -6
- package/dist/assets/installSkills/skills/next-js.md +2 -2
- package/dist/assets/installSkills/skills/usage.md +1 -1
- package/dist/cjs/build.cjs +5 -0
- package/dist/cjs/cli.cjs +3 -0
- package/dist/cjs/init/index.cjs +14 -14
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/backendPackages.cjs +15 -0
- package/dist/cjs/init/utils/backendPackages.cjs.map +1 -0
- package/dist/cjs/init/utils/index.cjs +2 -3
- package/dist/cjs/init/utils/packageManager.cjs +1 -1
- package/dist/cjs/init/utils/packageManager.cjs.map +1 -1
- package/dist/cjs/installMCP/installMCP.cjs +35 -25
- package/dist/cjs/installMCP/installMCP.cjs.map +1 -1
- package/dist/cjs/installSkills/index.cjs +28 -1
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/cjs/listGitFiles.cjs +3 -5
- package/dist/cjs/listGitFiles.cjs.map +1 -1
- package/dist/cjs/listProjects.cjs +1 -2
- package/dist/cjs/listProjects.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +9 -8
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +3 -5
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/remoteDictionaryClient.cjs +18 -0
- package/dist/cjs/loadDictionaries/remoteDictionaryClient.cjs.map +1 -0
- package/dist/cjs/prepareIntlayerServer.cjs +132 -0
- package/dist/cjs/prepareIntlayerServer.cjs.map +1 -0
- package/dist/cjs/utils/getProcessChainCommands.cjs +117 -0
- package/dist/cjs/utils/getProcessChainCommands.cjs.map +1 -0
- package/dist/cjs/utils/index.cjs +2 -0
- package/dist/cjs/utils/startContentWatcher.cjs +99 -0
- package/dist/cjs/utils/startContentWatcher.cjs.map +1 -0
- package/dist/cjs/watcher.cjs +2 -2
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeJsonIfChanged.cjs.map +1 -1
- package/dist/esm/build.mjs +2 -1
- package/dist/esm/cli.mjs +4 -4
- package/dist/esm/init/index.mjs +13 -13
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/backendPackages.mjs +14 -0
- package/dist/esm/init/utils/backendPackages.mjs.map +1 -0
- package/dist/esm/init/utils/index.mjs +2 -2
- package/dist/esm/init/utils/packageManager.mjs +1 -1
- package/dist/esm/init/utils/packageManager.mjs.map +1 -1
- package/dist/esm/installMCP/installMCP.mjs +35 -25
- package/dist/esm/installMCP/installMCP.mjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +29 -3
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/esm/listGitFiles.mjs +1 -1
- package/dist/esm/listGitFiles.mjs.map +1 -1
- package/dist/esm/listProjects.mjs +1 -1
- package/dist/esm/listProjects.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +9 -8
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +2 -4
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/remoteDictionaryClient.mjs +16 -0
- package/dist/esm/loadDictionaries/remoteDictionaryClient.mjs.map +1 -0
- package/dist/esm/prepareIntlayerServer.mjs +128 -0
- package/dist/esm/prepareIntlayerServer.mjs.map +1 -0
- package/dist/esm/utils/getProcessChainCommands.mjs +115 -0
- package/dist/esm/utils/getProcessChainCommands.mjs.map +1 -0
- package/dist/esm/utils/index.mjs +2 -1
- package/dist/esm/utils/runParallel/pidTree.mjs +3 -3
- package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -1
- package/dist/esm/utils/runParallel/ps.mjs +2 -2
- package/dist/esm/utils/runParallel/ps.mjs.map +1 -1
- package/dist/esm/utils/runParallel/wmic.mjs +2 -2
- package/dist/esm/utils/runParallel/wmic.mjs.map +1 -1
- package/dist/esm/utils/startContentWatcher.mjs +98 -0
- package/dist/esm/utils/startContentWatcher.mjs.map +1 -0
- package/dist/esm/watcher.mjs +1 -1
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeJsonIfChanged.mjs +1 -1
- package/dist/esm/writeJsonIfChanged.mjs.map +1 -1
- package/dist/types/build.d.ts +2 -1
- package/dist/types/cli.d.ts +4 -4
- package/dist/types/init/index.d.ts +1 -1
- package/dist/types/init/index.d.ts.map +1 -1
- package/dist/types/init/utils/backendPackages.d.ts +5 -0
- package/dist/types/init/utils/backendPackages.d.ts.map +1 -0
- package/dist/types/init/utils/index.d.ts +2 -2
- package/dist/types/init/utils/packageManager.d.ts +5 -0
- package/dist/types/init/utils/packageManager.d.ts.map +1 -1
- package/dist/types/installMCP/installMCP.d.ts +4 -0
- package/dist/types/installMCP/installMCP.d.ts.map +1 -1
- package/dist/types/installSkills/index.d.ts +7 -0
- package/dist/types/installSkills/index.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/remoteDictionaryClient.d.ts +14 -0
- package/dist/types/loadDictionaries/remoteDictionaryClient.d.ts.map +1 -0
- package/dist/types/prepareIntlayerServer.d.ts +67 -0
- package/dist/types/prepareIntlayerServer.d.ts.map +1 -0
- package/dist/types/utils/getProcessChainCommands.d.ts +35 -0
- package/dist/types/utils/getProcessChainCommands.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/startContentWatcher.d.ts +40 -0
- package/dist/types/utils/startContentWatcher.d.ts.map +1 -0
- package/dist/types/watcher.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/cjs/init/utils/devScript.cjs +0 -57
- package/dist/cjs/init/utils/devScript.cjs.map +0 -1
- package/dist/esm/init/utils/devScript.mjs +0 -55
- package/dist/esm/init/utils/devScript.mjs.map +0 -1
- package/dist/types/init/utils/devScript.d.ts +0 -48
- package/dist/types/init/utils/devScript.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"mappings":";;;KA0DK;EACH,gBAAgB;EAChB,gBAAgB;EAChB;EACA;;qBAsBW,QAAK,UAAoB,iBAAY;EAkDZ,mBAAM;;qBAgR/B,wBAAqB,UAAoB,iBAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/engine",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Scans and builds Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -150,16 +150,16 @@
|
|
|
150
150
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
151
151
|
},
|
|
152
152
|
"dependencies": {
|
|
153
|
-
"@intlayer/api": "9.
|
|
154
|
-
"@intlayer/config": "9.
|
|
155
|
-
"@intlayer/core": "9.
|
|
156
|
-
"@intlayer/dictionaries-entry": "9.
|
|
157
|
-
"@intlayer/types": "9.
|
|
153
|
+
"@intlayer/api": "9.6.0",
|
|
154
|
+
"@intlayer/config": "9.6.0",
|
|
155
|
+
"@intlayer/core": "9.6.0",
|
|
156
|
+
"@intlayer/dictionaries-entry": "9.6.0",
|
|
157
|
+
"@intlayer/types": "9.6.0",
|
|
158
158
|
"@parcel/watcher": "2.6.0",
|
|
159
159
|
"defu": "6.1.7",
|
|
160
160
|
"fast-glob": "3.3.3",
|
|
161
161
|
"recast": "0.24.0",
|
|
162
|
-
"simple-git": "
|
|
162
|
+
"simple-git": "4.0.2",
|
|
163
163
|
"zod-to-ts": "2.1.0"
|
|
164
164
|
},
|
|
165
165
|
"devDependencies": {
|
|
@@ -170,11 +170,11 @@
|
|
|
170
170
|
"rimraf": "6.1.3",
|
|
171
171
|
"tsdown": "0.23.0",
|
|
172
172
|
"typescript": "7.0.2",
|
|
173
|
-
"vitest": "5.0.
|
|
173
|
+
"vitest": "5.0.3",
|
|
174
174
|
"zod": "4.6.5"
|
|
175
175
|
},
|
|
176
176
|
"peerDependencies": {
|
|
177
|
-
"@intlayer/babel": "9.
|
|
177
|
+
"@intlayer/babel": "9.6.0"
|
|
178
178
|
},
|
|
179
179
|
"peerDependenciesMeta": {
|
|
180
180
|
"@intlayer/babel": {
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
//#region src/init/utils/devScript.ts
|
|
3
|
-
/**
|
|
4
|
-
* Frameworks with no Intlayer bundler plugin to host the content watcher.
|
|
5
|
-
*
|
|
6
|
-
* Their dev server is a plain Node process, so the only way to rebuild
|
|
7
|
-
* `.intlayer` on a content change is to run the watcher next to it.
|
|
8
|
-
*/
|
|
9
|
-
const BACKEND_INTLAYER_PACKAGES = [
|
|
10
|
-
"express-intlayer",
|
|
11
|
-
"fastify-intlayer",
|
|
12
|
-
"adonis-intlayer",
|
|
13
|
-
"hono-intlayer",
|
|
14
|
-
"elysia-intlayer",
|
|
15
|
-
"remix-intlayer"
|
|
16
|
-
];
|
|
17
|
-
/**
|
|
18
|
-
* Resolves the `dev` script `intlayer init` should write, or `null` when the
|
|
19
|
-
* project's script must be left alone.
|
|
20
|
-
*
|
|
21
|
-
* A Next.js app is always left alone: `withIntlayer` starts the content watcher
|
|
22
|
-
* itself on both bundlers, so wrapping the dev server in `intlayer watch --with`
|
|
23
|
-
* would only add a second watcher rebuilding the same dictionaries. This is checked on the
|
|
24
|
-
* `next` dependency as well as on the config file, since `next.config.*` is
|
|
25
|
-
* optional, and it takes precedence over the backend list, which a Next.js app
|
|
26
|
-
* with a custom server (or a monorepo root) can match too.
|
|
27
|
-
*
|
|
28
|
-
* @example a backend project gets its dev server wrapped
|
|
29
|
-
* ```ts
|
|
30
|
-
* resolveDevScript({
|
|
31
|
-
* devScript: 'node ./src/index.ts',
|
|
32
|
-
* allDeps: { 'express-intlayer': '9.0.0' },
|
|
33
|
-
* isNextJsProject: false,
|
|
34
|
-
* }); // → "intlayer watch --with 'node ./src/index.ts'"
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @example a Next.js project keeps its own script
|
|
38
|
-
* ```ts
|
|
39
|
-
* resolveDevScript({
|
|
40
|
-
* devScript: 'next dev',
|
|
41
|
-
* allDeps: { next: '16.0.0' },
|
|
42
|
-
* isNextJsProject: true,
|
|
43
|
-
* }); // → null
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
const resolveDevScript = ({ devScript, allDeps, isNextJsProject }) => {
|
|
47
|
-
if (!devScript) return null;
|
|
48
|
-
if (isNextJsProject || Boolean(allDeps.next)) return null;
|
|
49
|
-
if (!BACKEND_INTLAYER_PACKAGES.some((packageName) => allDeps[packageName])) return null;
|
|
50
|
-
if (devScript.includes("intlayer watch")) return null;
|
|
51
|
-
return `intlayer watch --with '${devScript}'`;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
//#endregion
|
|
55
|
-
exports.BACKEND_INTLAYER_PACKAGES = BACKEND_INTLAYER_PACKAGES;
|
|
56
|
-
exports.resolveDevScript = resolveDevScript;
|
|
57
|
-
//# sourceMappingURL=devScript.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devScript.cjs","names":[],"sources":["../../../../src/init/utils/devScript.ts"],"sourcesContent":["/**\n * Frameworks with no Intlayer bundler plugin to host the content watcher.\n *\n * Their dev server is a plain Node process, so the only way to rebuild\n * `.intlayer` on a content change is to run the watcher next to it.\n */\nexport const BACKEND_INTLAYER_PACKAGES = [\n 'express-intlayer',\n 'fastify-intlayer',\n 'adonis-intlayer',\n 'hono-intlayer',\n 'elysia-intlayer',\n 'remix-intlayer',\n];\n\nexport type ResolveDevScriptParams = {\n /** The project's current `dev` script, if it has one. */\n devScript?: string;\n /** Combined prod + dev dependencies of the project. */\n allDeps: Record<string, string>;\n /** Whether a `next.config.*` file was found in the project. */\n isNextJsProject: boolean;\n};\n\n/**\n * Resolves the `dev` script `intlayer init` should write, or `null` when the\n * project's script must be left alone.\n *\n * A Next.js app is always left alone: `withIntlayer` starts the content watcher\n * itself on both bundlers, so wrapping the dev server in `intlayer watch --with`\n * would only add a second watcher rebuilding the same dictionaries. This is checked on the\n * `next` dependency as well as on the config file, since `next.config.*` is\n * optional, and it takes precedence over the backend list, which a Next.js app\n * with a custom server (or a monorepo root) can match too.\n *\n * @example a backend project gets its dev server wrapped\n * ```ts\n * resolveDevScript({\n * devScript: 'node ./src/index.ts',\n * allDeps: { 'express-intlayer': '9.0.0' },\n * isNextJsProject: false,\n * }); // → \"intlayer watch --with 'node ./src/index.ts'\"\n * ```\n *\n * @example a Next.js project keeps its own script\n * ```ts\n * resolveDevScript({\n * devScript: 'next dev',\n * allDeps: { next: '16.0.0' },\n * isNextJsProject: true,\n * }); // → null\n * ```\n */\nexport const resolveDevScript = ({\n devScript,\n allDeps,\n isNextJsProject,\n}: ResolveDevScriptParams): string | null => {\n if (!devScript) return null;\n\n const isNextJsApp = isNextJsProject || Boolean(allDeps.next);\n\n if (isNextJsApp) return null;\n\n const hasBackendIntlayerPackage = BACKEND_INTLAYER_PACKAGES.some(\n (packageName) => allDeps[packageName]\n );\n\n if (!hasBackendIntlayerPackage) return null;\n\n // Re-running init must not nest one wrapper inside another.\n if (devScript.includes('intlayer watch')) return null;\n\n return `intlayer watch --with '${devScript}'`;\n};\n"],"mappings":";;;;;;;;AAMA,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,oBAAoB,EAC/B,WACA,SACA,sBAC2C;CAC3C,IAAI,CAAC,WAAW,OAAO;CAIvB,IAFoB,mBAAmB,QAAQ,QAAQ,IAAI,GAE1C,OAAO;CAMxB,IAAI,CAJ8B,0BAA0B,MACzD,gBAAgB,QAAQ,YAGE,GAAG,OAAO;CAGvC,IAAI,UAAU,SAAS,gBAAgB,GAAG,OAAO;CAEjD,OAAO,0BAA0B,UAAU;AAC7C"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
//#region src/init/utils/devScript.ts
|
|
2
|
-
/**
|
|
3
|
-
* Frameworks with no Intlayer bundler plugin to host the content watcher.
|
|
4
|
-
*
|
|
5
|
-
* Their dev server is a plain Node process, so the only way to rebuild
|
|
6
|
-
* `.intlayer` on a content change is to run the watcher next to it.
|
|
7
|
-
*/
|
|
8
|
-
const BACKEND_INTLAYER_PACKAGES = [
|
|
9
|
-
"express-intlayer",
|
|
10
|
-
"fastify-intlayer",
|
|
11
|
-
"adonis-intlayer",
|
|
12
|
-
"hono-intlayer",
|
|
13
|
-
"elysia-intlayer",
|
|
14
|
-
"remix-intlayer"
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* Resolves the `dev` script `intlayer init` should write, or `null` when the
|
|
18
|
-
* project's script must be left alone.
|
|
19
|
-
*
|
|
20
|
-
* A Next.js app is always left alone: `withIntlayer` starts the content watcher
|
|
21
|
-
* itself on both bundlers, so wrapping the dev server in `intlayer watch --with`
|
|
22
|
-
* would only add a second watcher rebuilding the same dictionaries. This is checked on the
|
|
23
|
-
* `next` dependency as well as on the config file, since `next.config.*` is
|
|
24
|
-
* optional, and it takes precedence over the backend list, which a Next.js app
|
|
25
|
-
* with a custom server (or a monorepo root) can match too.
|
|
26
|
-
*
|
|
27
|
-
* @example a backend project gets its dev server wrapped
|
|
28
|
-
* ```ts
|
|
29
|
-
* resolveDevScript({
|
|
30
|
-
* devScript: 'node ./src/index.ts',
|
|
31
|
-
* allDeps: { 'express-intlayer': '9.0.0' },
|
|
32
|
-
* isNextJsProject: false,
|
|
33
|
-
* }); // → "intlayer watch --with 'node ./src/index.ts'"
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @example a Next.js project keeps its own script
|
|
37
|
-
* ```ts
|
|
38
|
-
* resolveDevScript({
|
|
39
|
-
* devScript: 'next dev',
|
|
40
|
-
* allDeps: { next: '16.0.0' },
|
|
41
|
-
* isNextJsProject: true,
|
|
42
|
-
* }); // → null
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
const resolveDevScript = ({ devScript, allDeps, isNextJsProject }) => {
|
|
46
|
-
if (!devScript) return null;
|
|
47
|
-
if (isNextJsProject || Boolean(allDeps.next)) return null;
|
|
48
|
-
if (!BACKEND_INTLAYER_PACKAGES.some((packageName) => allDeps[packageName])) return null;
|
|
49
|
-
if (devScript.includes("intlayer watch")) return null;
|
|
50
|
-
return `intlayer watch --with '${devScript}'`;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
export { BACKEND_INTLAYER_PACKAGES, resolveDevScript };
|
|
55
|
-
//# sourceMappingURL=devScript.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devScript.mjs","names":[],"sources":["../../../../src/init/utils/devScript.ts"],"sourcesContent":["/**\n * Frameworks with no Intlayer bundler plugin to host the content watcher.\n *\n * Their dev server is a plain Node process, so the only way to rebuild\n * `.intlayer` on a content change is to run the watcher next to it.\n */\nexport const BACKEND_INTLAYER_PACKAGES = [\n 'express-intlayer',\n 'fastify-intlayer',\n 'adonis-intlayer',\n 'hono-intlayer',\n 'elysia-intlayer',\n 'remix-intlayer',\n];\n\nexport type ResolveDevScriptParams = {\n /** The project's current `dev` script, if it has one. */\n devScript?: string;\n /** Combined prod + dev dependencies of the project. */\n allDeps: Record<string, string>;\n /** Whether a `next.config.*` file was found in the project. */\n isNextJsProject: boolean;\n};\n\n/**\n * Resolves the `dev` script `intlayer init` should write, or `null` when the\n * project's script must be left alone.\n *\n * A Next.js app is always left alone: `withIntlayer` starts the content watcher\n * itself on both bundlers, so wrapping the dev server in `intlayer watch --with`\n * would only add a second watcher rebuilding the same dictionaries. This is checked on the\n * `next` dependency as well as on the config file, since `next.config.*` is\n * optional, and it takes precedence over the backend list, which a Next.js app\n * with a custom server (or a monorepo root) can match too.\n *\n * @example a backend project gets its dev server wrapped\n * ```ts\n * resolveDevScript({\n * devScript: 'node ./src/index.ts',\n * allDeps: { 'express-intlayer': '9.0.0' },\n * isNextJsProject: false,\n * }); // → \"intlayer watch --with 'node ./src/index.ts'\"\n * ```\n *\n * @example a Next.js project keeps its own script\n * ```ts\n * resolveDevScript({\n * devScript: 'next dev',\n * allDeps: { next: '16.0.0' },\n * isNextJsProject: true,\n * }); // → null\n * ```\n */\nexport const resolveDevScript = ({\n devScript,\n allDeps,\n isNextJsProject,\n}: ResolveDevScriptParams): string | null => {\n if (!devScript) return null;\n\n const isNextJsApp = isNextJsProject || Boolean(allDeps.next);\n\n if (isNextJsApp) return null;\n\n const hasBackendIntlayerPackage = BACKEND_INTLAYER_PACKAGES.some(\n (packageName) => allDeps[packageName]\n );\n\n if (!hasBackendIntlayerPackage) return null;\n\n // Re-running init must not nest one wrapper inside another.\n if (devScript.includes('intlayer watch')) return null;\n\n return `intlayer watch --with '${devScript}'`;\n};\n"],"mappings":";;;;;;;AAMA,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,oBAAoB,EAC/B,WACA,SACA,sBAC2C;CAC3C,IAAI,CAAC,WAAW,OAAO;CAIvB,IAFoB,mBAAmB,QAAQ,QAAQ,IAAI,GAE1C,OAAO;CAMxB,IAAI,CAJ8B,0BAA0B,MACzD,gBAAgB,QAAQ,YAGE,GAAG,OAAO;CAGvC,IAAI,UAAU,SAAS,gBAAgB,GAAG,OAAO;CAEjD,OAAO,0BAA0B,UAAU;AAC7C"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
//#region src/init/utils/devScript.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Frameworks with no Intlayer bundler plugin to host the content watcher.
|
|
4
|
-
*
|
|
5
|
-
* Their dev server is a plain Node process, so the only way to rebuild
|
|
6
|
-
* `.intlayer` on a content change is to run the watcher next to it.
|
|
7
|
-
*/
|
|
8
|
-
export declare const BACKEND_INTLAYER_PACKAGES: string[];
|
|
9
|
-
export type ResolveDevScriptParams = {
|
|
10
|
-
/** The project's current `dev` script, if it has one. */
|
|
11
|
-
devScript?: string;
|
|
12
|
-
/** Combined prod + dev dependencies of the project. */
|
|
13
|
-
allDeps: Record<string, string>;
|
|
14
|
-
/** Whether a `next.config.*` file was found in the project. */
|
|
15
|
-
isNextJsProject: boolean;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Resolves the `dev` script `intlayer init` should write, or `null` when the
|
|
19
|
-
* project's script must be left alone.
|
|
20
|
-
*
|
|
21
|
-
* A Next.js app is always left alone: `withIntlayer` starts the content watcher
|
|
22
|
-
* itself on both bundlers, so wrapping the dev server in `intlayer watch --with`
|
|
23
|
-
* would only add a second watcher rebuilding the same dictionaries. This is checked on the
|
|
24
|
-
* `next` dependency as well as on the config file, since `next.config.*` is
|
|
25
|
-
* optional, and it takes precedence over the backend list, which a Next.js app
|
|
26
|
-
* with a custom server (or a monorepo root) can match too.
|
|
27
|
-
*
|
|
28
|
-
* @example a backend project gets its dev server wrapped
|
|
29
|
-
* ```ts
|
|
30
|
-
* resolveDevScript({
|
|
31
|
-
* devScript: 'node ./src/index.ts',
|
|
32
|
-
* allDeps: { 'express-intlayer': '9.0.0' },
|
|
33
|
-
* isNextJsProject: false,
|
|
34
|
-
* }); // → "intlayer watch --with 'node ./src/index.ts'"
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @example a Next.js project keeps its own script
|
|
38
|
-
* ```ts
|
|
39
|
-
* resolveDevScript({
|
|
40
|
-
* devScript: 'next dev',
|
|
41
|
-
* allDeps: { next: '16.0.0' },
|
|
42
|
-
* isNextJsProject: true,
|
|
43
|
-
* }); // → null
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
export declare const resolveDevScript: ({ devScript, allDeps, isNextJsProject }: ResolveDevScriptParams) => string | null;
|
|
47
|
-
//#endregion
|
|
48
|
-
//# sourceMappingURL=devScript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devScript.d.ts","names":[],"sources":["../../../../src/init/utils/devScript.ts"],"mappings":";;;;;;;qBAMa;YASD;;EAEV;;EAEA,SAAS;;EAET;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCW,qBAAgB,WAAA,SAAA,mBAI1B"}
|