@frontmcp/nx 1.9.1-rc.1 → 1.9.1-rc.3
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/generators/init/init.js
CHANGED
|
@@ -4,7 +4,8 @@ exports.initGenerator = initGenerator;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const add_dependencies_js_1 = require("../../utils/add-dependencies.js");
|
|
6
6
|
const versions_js_1 = require("../../utils/versions.js");
|
|
7
|
-
const
|
|
7
|
+
const BUILD_EXECUTORS = ['@frontmcp/nx:build', '@frontmcp/nx:build-exec'];
|
|
8
|
+
const TEST_EXECUTOR = '@frontmcp/nx:test';
|
|
8
9
|
/**
|
|
9
10
|
* Executors are only cached when the target (or a `targetDefaults` entry for
|
|
10
11
|
* the executor) says so — Nx does not read that from the plugin itself.
|
|
@@ -15,15 +16,16 @@ function makeExecutorsCacheable(tree) {
|
|
|
15
16
|
return;
|
|
16
17
|
const targetDefaults = nxJson.targetDefaults ?? {};
|
|
17
18
|
const inputs = nxJson.namedInputs?.['production'] ? ['production', '^production'] : undefined;
|
|
18
|
-
for (const executor of
|
|
19
|
-
const existing = targetDefaults[executor];
|
|
19
|
+
for (const executor of BUILD_EXECUTORS) {
|
|
20
20
|
targetDefaults[executor] = {
|
|
21
21
|
cache: true,
|
|
22
|
-
|
|
22
|
+
dependsOn: ['^build'],
|
|
23
23
|
...(inputs && { inputs }),
|
|
24
|
-
...
|
|
24
|
+
...targetDefaults[executor],
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
+
// Default inputs, as in the workspace generator's nx.json: `production` leaves out the spec files
|
|
28
|
+
targetDefaults[TEST_EXECUTOR] = { cache: true, ...targetDefaults[TEST_EXECUTOR] };
|
|
27
29
|
(0, devkit_1.updateNxJson)(tree, { ...nxJson, targetDefaults });
|
|
28
30
|
}
|
|
29
31
|
async function initGenerator(tree, schema = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../src/generators/init/init.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../src/generators/init/init.ts"],"names":[],"mappings":";;AAkCA,sCAiBC;AAnDD,uCAAsG;AAEtG,yEAA0E;AAC1E,yDAAsH;AAGtH,MAAM,eAAe,GAAG,CAAC,oBAAoB,EAAE,yBAAyB,CAAU,CAAC;AACnF,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C;;;GAGG;AACH,SAAS,sBAAsB,CAAC,IAAU;IACxC,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9F,KAAK,MAAM,QAAQ,IAAI,eAAe,EAAE,CAAC;QACvC,cAAc,CAAC,QAAQ,CAAC,GAAG;YACzB,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,CAAC,QAAQ,CAAC;YACrB,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC;YACzB,GAAG,cAAc,CAAC,QAAQ,CAAC;SAC5B,CAAC;IACJ,CAAC;IACD,kGAAkG;IAClG,cAAc,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;IAElF,IAAA,qBAAY,EAAC,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AACpD,CAAC;AAEM,KAAK,UAAU,aAAa,CAAC,IAAU,EAAE,SAA8B,EAAE;IAC9E,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAE7B,MAAM,WAAW,GAAG,MAAM,CAAC,eAAe;QACxC,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS;QACjB,CAAC,CAAC,IAAA,6CAAuB,EACrB,IAAI,EACJ,EAAE,GAAG,IAAA,qCAAuB,GAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EACjD,EAAE,GAAG,IAAA,wCAA0B,GAAE,EAAE,GAAG,IAAA,oCAAsB,GAAE,EAAE,EAChE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAC/B,CAAC;IAEN,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,kBAAe,aAAa,CAAC","sourcesContent":["import { formatFiles, readNxJson, updateNxJson, type GeneratorCallback, type Tree } from '@nx/devkit';\n\nimport { addFrontmcpDependencies } from '../../utils/add-dependencies.js';\nimport { getFrontmcpDependencies, getFrontmcpDevDependencies, getJestDevDependencies } from '../../utils/versions.js';\nimport type { InitGeneratorSchema } from './schema.js';\n\nconst BUILD_EXECUTORS = ['@frontmcp/nx:build', '@frontmcp/nx:build-exec'] as const;\nconst TEST_EXECUTOR = '@frontmcp/nx:test';\n\n/**\n * Executors are only cached when the target (or a `targetDefaults` entry for\n * the executor) says so — Nx does not read that from the plugin itself.\n */\nfunction makeExecutorsCacheable(tree: Tree): void {\n const nxJson = readNxJson(tree);\n if (!nxJson) return;\n\n const targetDefaults = nxJson.targetDefaults ?? {};\n const inputs = nxJson.namedInputs?.['production'] ? ['production', '^production'] : undefined;\n\n for (const executor of BUILD_EXECUTORS) {\n targetDefaults[executor] = {\n cache: true,\n dependsOn: ['^build'],\n ...(inputs && { inputs }),\n ...targetDefaults[executor],\n };\n }\n // Default inputs, as in the workspace generator's nx.json: `production` leaves out the spec files\n targetDefaults[TEST_EXECUTOR] = { cache: true, ...targetDefaults[TEST_EXECUTOR] };\n\n updateNxJson(tree, { ...nxJson, targetDefaults });\n}\n\nexport async function initGenerator(tree: Tree, schema: InitGeneratorSchema = {}): Promise<GeneratorCallback> {\n makeExecutorsCacheable(tree);\n\n const installTask = schema.skipPackageJson\n ? () => undefined\n : addFrontmcpDependencies(\n tree,\n { ...getFrontmcpDependencies(), tslib: '^2.3.0' },\n { ...getFrontmcpDevDependencies(), ...getJestDevDependencies() },\n { keepExistingVersions: true },\n );\n\n if (!schema.skipFormat) {\n await formatFiles(tree);\n }\n\n return installTask;\n}\n\nexport default initGenerator;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/nx",
|
|
3
|
-
"version": "1.9.1-rc.
|
|
3
|
+
"version": "1.9.1-rc.3",
|
|
4
4
|
"description": "Nx plugin for FrontMCP — generators and executors for building MCP servers",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://docs.agentfront.dev",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"node": ">=24.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@frontmcp/skills": "1.9.1-rc.
|
|
36
|
+
"@frontmcp/skills": "1.9.1-rc.3",
|
|
37
37
|
"@nx/devkit": "22.6.4",
|
|
38
38
|
"tslib": "^2.3.0"
|
|
39
39
|
},
|