nx 23.0.0-rc.0 → 23.0.0-rc.2

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.
Files changed (27) hide show
  1. package/dist/src/ai/constants.d.ts +5 -0
  2. package/dist/src/ai/constants.js +6 -1
  3. package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +13 -0
  4. package/dist/src/core/graph/main.js +1 -1
  5. package/dist/src/daemon/client/daemon-environment.d.ts +1 -1
  6. package/dist/src/daemon/client/daemon-environment.js +24 -4
  7. package/dist/src/daemon/server/server.js +3 -3
  8. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  9. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  10. package/dist/src/utils/min-release-age/behavior/bun.d.ts +6 -5
  11. package/dist/src/utils/min-release-age/behavior/bun.js +9 -36
  12. package/dist/src/utils/min-release-age/behavior/npm.d.ts +4 -3
  13. package/dist/src/utils/min-release-age/behavior/npm.js +9 -5
  14. package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +5 -6
  15. package/dist/src/utils/min-release-age/behavior/pnpm.js +12 -75
  16. package/dist/src/utils/min-release-age/behavior/yarn.d.ts +4 -6
  17. package/dist/src/utils/min-release-age/behavior/yarn.js +8 -43
  18. package/dist/src/utils/min-release-age/npmrc.d.ts +2 -0
  19. package/dist/src/utils/min-release-age/npmrc.js +5 -0
  20. package/dist/src/utils/min-release-age/packument.d.ts +0 -16
  21. package/dist/src/utils/min-release-age/packument.js +0 -57
  22. package/dist/src/utils/min-release-age/pick.d.ts +24 -0
  23. package/dist/src/utils/min-release-age/pick.js +112 -0
  24. package/dist/src/utils/min-release-age/policy.d.ts +0 -1
  25. package/dist/src/utils/min-release-age/resolve.d.ts +1 -3
  26. package/dist/src/utils/min-release-age/resolve.js +1 -9
  27. package/package.json +11 -11
@@ -17,6 +17,11 @@ export interface AgentRulesWrappedOptions {
17
17
  useH1?: boolean;
18
18
  }
19
19
  export declare const getAgentRulesWrapped: (options: AgentRulesWrappedOptions) => string;
20
+ /**
21
+ * Hostname Nx analytics events are sent to (GA4 Measurement Protocol).
22
+ * Must stay in sync with GA_ENDPOINT in packages/nx/src/native/telemetry/constants.rs.
23
+ */
24
+ export declare const analyticsDomain = "www.google-analytics.com";
20
25
  export declare const nxMcpTomlHeader = "[mcp_servers.\"nx-mcp\"]";
21
26
  /**
22
27
  * Get the MCP TOML configuration based on the Nx version.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nxMcpTomlHeader = exports.getAgentRulesWrapped = exports.rulesRegex = exports.nxRulesMarkerCommentEnd = exports.nxRulesMarkerCommentDescription = exports.nxRulesMarkerCommentStart = void 0;
3
+ exports.nxMcpTomlHeader = exports.analyticsDomain = exports.getAgentRulesWrapped = exports.rulesRegex = exports.nxRulesMarkerCommentEnd = exports.nxRulesMarkerCommentDescription = exports.nxRulesMarkerCommentStart = void 0;
4
4
  exports.agentsMdPath = agentsMdPath;
5
5
  exports.geminiMdPath = geminiMdPath;
6
6
  exports.parseGeminiSettings = parseGeminiSettings;
@@ -54,6 +54,11 @@ const getAgentRulesWrapped = (options) => {
54
54
  return `${exports.nxRulesMarkerCommentStart}\n${exports.nxRulesMarkerCommentDescription}\n\n${agentRulesString}\n\n${exports.nxRulesMarkerCommentEnd}`;
55
55
  };
56
56
  exports.getAgentRulesWrapped = getAgentRulesWrapped;
57
+ /**
58
+ * Hostname Nx analytics events are sent to (GA4 Measurement Protocol).
59
+ * Must stay in sync with GA_ENDPOINT in packages/nx/src/native/telemetry/constants.rs.
60
+ */
61
+ exports.analyticsDomain = 'www.google-analytics.com';
57
62
  exports.nxMcpTomlHeader = `[mcp_servers."nx-mcp"]`;
58
63
  /**
59
64
  * Get the MCP TOML configuration based on the Nx version.
@@ -103,6 +103,19 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
103
103
  ...json.enabledPlugins,
104
104
  'nx@nx-claude-plugins': true,
105
105
  },
106
+ // Allow Nx analytics requests through Claude Code's sandbox network filter
107
+ sandbox: {
108
+ ...json.sandbox,
109
+ network: {
110
+ ...json.sandbox?.network,
111
+ allowedDomains: json.sandbox?.network?.allowedDomains?.includes(constants_1.analyticsDomain)
112
+ ? json.sandbox.network.allowedDomains
113
+ : [
114
+ ...(json.sandbox?.network?.allowedDomains ?? []),
115
+ constants_1.analyticsDomain,
116
+ ],
117
+ },
118
+ },
106
119
  }));
107
120
  // Clean up .mcp.json (nx-mcp now handled by plugin)
108
121
  const mcpJsonPath = (0, constants_1.claudeMcpJsonPath)(options.directory);