@empire-builder-kit/nx 1.0.0-rc.2 → 1.0.0-rc.4

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 (39) hide show
  1. package/package.json +4 -4
  2. package/src/generators/post-generation-install.d.ts +1 -0
  3. package/src/generators/post-generation-install.js +134 -67
  4. package/src/generators/post-generation-install.js.map +1 -1
  5. package/src/generators/preset/tool-versions.d.ts +5 -5
  6. package/src/generators/preset/tool-versions.js +4 -4
  7. package/src/generators/preset/workspace-files.d.ts +2 -2
  8. package/src/generators/preset/workspace-files.js +17 -2
  9. package/src/generators/preset/workspace-files.js.map +1 -1
  10. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +1 -1
  11. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
  12. package/src/generators/slice/built-in-plan-data-retention-job-files.js +4 -3
  13. package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +1 -1
  14. package/src/generators/slice/built-in-plan-database-lifecycle-files.js +4 -3
  15. package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -1
  16. package/src/generators/slice/built-in-plan-testing-files.js +92 -5
  17. package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
  18. package/src/generators/workload/frozen-container.d.ts +3 -2
  19. package/src/generators/workload/frozen-container.js +6 -4
  20. package/src/generators/workload/frozen-container.js.map +1 -1
  21. package/src/local-dev/environment-inspector.d.ts +1 -0
  22. package/src/local-dev/environment-inspector.js +21 -9
  23. package/src/local-dev/environment-inspector.js.map +1 -1
  24. package/src/supply-chain/blueprint-verification-execution.js +17 -2
  25. package/src/supply-chain/blueprint-verification-execution.js.map +1 -1
  26. package/src/supply-chain/generated-command.js +130 -43
  27. package/src/supply-chain/generated-command.js.map +1 -1
  28. package/src/supply-chain/generated-scanner-command.js +113 -54
  29. package/src/supply-chain/generated-scanner-command.js.map +1 -1
  30. package/src/supply-chain/inventory.d.ts +17 -0
  31. package/src/supply-chain/inventory.js +114 -3
  32. package/src/supply-chain/inventory.js.map +1 -1
  33. package/src/supply-chain/pnpm-toolchain-authority.d.ts +4 -3
  34. package/src/supply-chain/pnpm-toolchain-authority.js +20 -34
  35. package/src/supply-chain/pnpm-toolchain-authority.js.map +1 -1
  36. package/src/supply-chain/policy.js +4 -1
  37. package/src/supply-chain/policy.js.map +1 -1
  38. package/src/supply-chain/scanner.js +10 -1
  39. package/src/supply-chain/scanner.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empire-builder-kit/nx",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Nx generators, executors, and Blueprint contracts for Empire Builder Kit",
5
5
  "keywords": [
6
6
  "aws",
@@ -126,7 +126,7 @@
126
126
  "provenance": false
127
127
  },
128
128
  "dependencies": {
129
- "@empire-builder-kit/runtime": "1.0.0-rc.2",
129
+ "@empire-builder-kit/runtime": "1.0.0-rc.4",
130
130
  "@aws-sdk/client-cloudwatch-logs": "^3.700.0",
131
131
  "@aws-sdk/client-iam": "^3.700.0",
132
132
  "@nx/devkit": "23.1.0",
@@ -152,7 +152,7 @@
152
152
  },
153
153
  "homepage": "https://github.com/empire-builder-kit/empire-builder-kit#readme",
154
154
  "engines": {
155
- "node": ">=22.12.0"
155
+ "node": ">=22.13.0"
156
156
  },
157
- "gitHead": "daa31d9fc11699516d1a85072ca46548cd929e50"
157
+ "gitHead": "c29757a0dc5efb67eb10c3c8aa1f09b967ec10ca"
158
158
  }
@@ -55,6 +55,7 @@ export interface PostGenerationInstallPnpmInvocation {
55
55
  export declare function postGenerationInstallPnpmInvocation(args: string[], options: {
56
56
  environment?: NodeJS.ProcessEnv;
57
57
  isolatedHome: string;
58
+ npmrcAuthFile?: string;
58
59
  toolchain: PnpmToolchainAuthority;
59
60
  }): PostGenerationInstallPnpmInvocation;
60
61
  /**
@@ -53,7 +53,6 @@ const PHASE_CONTROLLED_PNPM_SETTINGS = new Set([
53
53
  'deployallfiles',
54
54
  'dir',
55
55
  'enablemodulesdir',
56
- 'enableglobalvirtualstore',
57
56
  'enableprepostscripts',
58
57
  'filter',
59
58
  'filterprod',
@@ -101,7 +100,6 @@ const PHASE_CONTROLLED_PNPM_SETTINGS = new Set([
101
100
  'symlink',
102
101
  'storedir',
103
102
  'statedir',
104
- 'usestoreserver',
105
103
  'uselockfile',
106
104
  'verifystoreintegrity',
107
105
  'virtualstoredir',
@@ -123,12 +121,15 @@ const ALLOWED_STRUCTURED_PNPM_SETTINGS = new Set([
123
121
  'cleanupunusedcatalogs',
124
122
  'dedupedirectdeps',
125
123
  'dedupeinjecteddeps',
124
+ 'enableglobalvirtualstore',
126
125
  'enginestrict',
127
126
  'excludelinksfromlockfile',
128
127
  'ignoredbuiltdependencies',
129
128
  'linkworkspacepackages',
130
129
  'minimumreleaseage',
131
130
  'minimumreleaseageexclude',
131
+ 'minimumreleaseageignoremissingtime',
132
+ 'minimumreleaseagestrict',
132
133
  'neverbuiltdependencies',
133
134
  'onlybuiltdependencies',
134
135
  'overrides',
@@ -146,39 +147,9 @@ const ALLOWED_STRUCTURED_PNPM_SETTINGS = new Set([
146
147
  'trustpolicy',
147
148
  'trustpolicyexclude',
148
149
  'trustpolicyignoreafter',
150
+ 'verifydepsbeforerun',
149
151
  ]);
150
- const ALLOWED_NPMRC_RESOLUTION_SETTINGS = new Set([
151
- 'alwaysauth',
152
- 'autoinstallpeers',
153
- 'cafile',
154
- 'certfile',
155
- 'dedupeinjecteddeps',
156
- 'dedupepeerdependents',
157
- 'fetchretries',
158
- 'fetchretryfactor',
159
- 'fetchretrymaxtimeout',
160
- 'fetchretrymintimeout',
161
- 'fetchtimeout',
162
- 'httpsproxy',
163
- 'keyfile',
164
- 'linkworkspacepackages',
165
- 'maxsockets',
166
- 'minimumreleaseage',
167
- 'minimumreleaseageexclude',
168
- 'networkconcurrency',
169
- 'noproxy',
170
- 'preferworkspacepackages',
171
- 'proxy',
172
- 'registry',
173
- 'resolutionmode',
174
- 'resolvepeersfromworkspaceroot',
175
- 'saveworkspaceprotocol',
176
- 'strictpeerdependencies',
177
- 'strictssl',
178
- 'trustpolicy',
179
- 'trustpolicyexclude',
180
- 'trustpolicyignoreafter',
181
- ]);
152
+ const ALLOWED_NPMRC_RESOLUTION_SETTINGS = new Set(['cafile', 'registry']);
182
153
  class SimulatedProtocolCrash extends Error {
183
154
  constructor(checkpoint) {
184
155
  super(`Simulated post-generation install crash ${checkpoint}.`);
@@ -1028,11 +999,10 @@ function npmrcResolutionSemantics(source) {
1028
999
  throw new Error(`Post-generation install controls pnpm ${key} per protocol phase; .npmrc cannot override it.`);
1029
1000
  }
1030
1001
  if (!ALLOWED_NPMRC_RESOLUTION_SETTINGS.has(normalizedKey) &&
1031
- !key.endsWith(':registry') &&
1032
- !/(?:^|:)always-auth$/u.test(key)) {
1033
- throw new Error(`Post-generation install .npmrc setting ${key} is outside the explicit resolution-setting allowlist.`);
1002
+ !key.endsWith(':registry')) {
1003
+ throw new Error(`Post-generation install .npmrc setting ${key} is outside the explicit pnpm 11 authentication, registry, and CA-file allowlist.`);
1034
1004
  }
1035
- if (/^(?:cafile|certfile|keyfile|pnpmfile)$/u.test(key) && value) {
1005
+ if (/^(?:cafile|pnpmfile)$/u.test(key) && value) {
1036
1006
  referencedFiles.add(value);
1037
1007
  }
1038
1008
  try {
@@ -1067,6 +1037,46 @@ function assertPhaseControlledPnpmSettings(value, label) {
1067
1037
  value[key] === POST_GENERATION_STORE_DIRECTORY) {
1068
1038
  continue;
1069
1039
  }
1040
+ if (normalizedKey === 'enableglobalvirtualstore' &&
1041
+ label === 'pnpm-workspace.yaml settings') {
1042
+ // Durable, not phase-controlled: pnpm records this setting in the
1043
+ // installed modules state, so an install-time-only override would make
1044
+ // every later ordinary command fail its verifyDepsBeforeRun check.
1045
+ if (key !== 'enableGlobalVirtualStore' || value[key] !== false) {
1046
+ throw new Error('Post-generation install requires pnpm enableGlobalVirtualStore: false so installed dependency state stays local to the workspace.');
1047
+ }
1048
+ continue;
1049
+ }
1050
+ if (normalizedKey === 'blockexoticsubdeps' &&
1051
+ label === 'pnpm-workspace.yaml settings') {
1052
+ if (key !== 'blockExoticSubdeps' || value[key] !== true) {
1053
+ throw new Error('Post-generation install requires pnpm blockExoticSubdeps: true so later installs cannot substitute a private-hoist dependency.');
1054
+ }
1055
+ continue;
1056
+ }
1057
+ if (normalizedKey === 'ignorepnpmfile' &&
1058
+ label === 'pnpm-workspace.yaml settings') {
1059
+ if (key !== 'ignorePnpmfile' || value[key] !== true) {
1060
+ throw new Error('Post-generation install requires pnpm ignorePnpmfile: true so explicit installs and later script or exec verification retain one pnpmfile authority.');
1061
+ }
1062
+ continue;
1063
+ }
1064
+ if (normalizedKey === 'pnpmfile' &&
1065
+ label === 'pnpm-workspace.yaml settings') {
1066
+ if (key !== 'pnpmfile' ||
1067
+ !Array.isArray(value[key]) ||
1068
+ value[key].length !== 0) {
1069
+ throw new Error('Post-generation install requires pnpm pnpmfile: [] so pnpm records one empty hook authority across install, script, and exec phases.');
1070
+ }
1071
+ continue;
1072
+ }
1073
+ if (normalizedKey === 'verifydepsbeforerun' &&
1074
+ label === 'pnpm-workspace.yaml settings') {
1075
+ if (key !== 'verifyDepsBeforeRun' || value[key] !== 'error') {
1076
+ throw new Error('Post-generation install requires pnpm verifyDepsBeforeRun: error so script and exec commands cannot mutate dependency state implicitly.');
1077
+ }
1078
+ continue;
1079
+ }
1070
1080
  if (PHASE_CONTROLLED_PNPM_SETTINGS.has(normalizedKey)) {
1071
1081
  throw new Error(`Post-generation install controls pnpm ${key} per protocol phase; ${label} cannot override it.`);
1072
1082
  }
@@ -1079,11 +1089,50 @@ function assertRetainedPnpmStore(value) {
1079
1089
  throw new Error(`Post-generation install requires pnpm storeDir ${POST_GENERATION_STORE_DIRECTORY}.`);
1080
1090
  }
1081
1091
  }
1092
+ function assertRetainedPnpmVirtualStorePolicy(value) {
1093
+ if (!isRecord(value) ||
1094
+ !Object.prototype.hasOwnProperty.call(value, 'enableGlobalVirtualStore') ||
1095
+ value.enableGlobalVirtualStore !== false) {
1096
+ throw new Error('Post-generation install requires pnpm enableGlobalVirtualStore: false so installed dependency state stays local to the workspace.');
1097
+ }
1098
+ }
1099
+ function assertRetainedPnpmExoticSubdepPolicy(value) {
1100
+ if (!isRecord(value) ||
1101
+ !Object.prototype.hasOwnProperty.call(value, 'blockExoticSubdeps') ||
1102
+ value.blockExoticSubdeps !== true) {
1103
+ throw new Error('Post-generation install requires pnpm blockExoticSubdeps: true so later installs cannot substitute a private-hoist dependency.');
1104
+ }
1105
+ }
1106
+ function assertRetainedPnpmVerificationPolicy(value) {
1107
+ if (!isRecord(value) ||
1108
+ !Object.prototype.hasOwnProperty.call(value, 'verifyDepsBeforeRun') ||
1109
+ value.verifyDepsBeforeRun !== 'error') {
1110
+ throw new Error('Post-generation install requires pnpm verifyDepsBeforeRun: error so script and exec commands cannot mutate dependency state implicitly.');
1111
+ }
1112
+ }
1113
+ function assertRetainedPnpmfilePolicy(value) {
1114
+ if (!isRecord(value) ||
1115
+ !Object.prototype.hasOwnProperty.call(value, 'ignorePnpmfile') ||
1116
+ value.ignorePnpmfile !== true) {
1117
+ throw new Error('Post-generation install requires pnpm ignorePnpmfile: true so explicit installs and later script or exec verification suppress executable pnpmfile hooks.');
1118
+ }
1119
+ if (!Object.prototype.hasOwnProperty.call(value, 'pnpmfile') ||
1120
+ !Array.isArray(value.pnpmfile) ||
1121
+ value.pnpmfile.length !== 0) {
1122
+ throw new Error('Post-generation install requires pnpm pnpmfile: [] so explicit installs and later script or exec verification retain one empty pnpmfile authority.');
1123
+ }
1124
+ }
1082
1125
  function assertSupportedPnpmSettings(value, label) {
1083
1126
  if (!isRecord(value))
1084
1127
  return;
1085
1128
  for (const key of Object.keys(value)) {
1086
1129
  const normalizedKey = key.toLowerCase().replace(/[^a-z0-9]/gu, '');
1130
+ if (label === 'pnpm-workspace.yaml settings' &&
1131
+ key === 'pnpmfile' &&
1132
+ Array.isArray(value[key]) &&
1133
+ value[key].length === 0) {
1134
+ continue;
1135
+ }
1087
1136
  if (UNSUPPORTED_EXECUTABLE_PNPM_SETTINGS.has(normalizedKey)) {
1088
1137
  throw new Error(`Post-generation install does not accept executable or externally loaded pnpm setting ${key} in ${label}.`);
1089
1138
  }
@@ -1120,7 +1169,7 @@ function buildInstallAuthority(reader) {
1120
1169
  const addDigest = (kind, path, contents, mode = null) => {
1121
1170
  const bytes = Buffer.byteLength(contents);
1122
1171
  if (bytes > pnpm_toolchain_authority_js_1.PNPM_TOOLCHAIN_AUTHORITY_MAX_FILE_BYTES) {
1123
- throw new Error(`Install-authority input exceeds 8 MiB at ${path}.`);
1172
+ throw new Error(`Install-authority input exceeds ${pnpm_toolchain_authority_js_1.PNPM_TOOLCHAIN_AUTHORITY_MAX_FILE_BYTES / (1024 * 1024)} MiB at ${path}.`);
1124
1173
  }
1125
1174
  observedBytes += bytes;
1126
1175
  if (observedBytes > pnpm_toolchain_authority_js_1.PNPM_TOOLCHAIN_AUTHORITY_MAX_TOTAL_BYTES) {
@@ -1162,15 +1211,19 @@ function buildInstallAuthority(reader) {
1162
1211
  }
1163
1212
  const rootManifest = parseBoundedJson(rootManifestSource, 'Post-generation install root package.json');
1164
1213
  (0, pnpm_toolchain_authority_js_1.parsePnpmPackageManagerAuthority)(rootManifestSource.toString('utf8'));
1214
+ if (isRecord(rootManifest) && rootManifest.pnpm !== undefined) {
1215
+ throw new Error('Post-generation install does not accept package.json#pnpm because pnpm 11 ignores that configuration; move reviewed settings to pnpm-workspace.yaml.');
1216
+ }
1165
1217
  const workspaceSource = addFile('workspace-config', 'pnpm-workspace.yaml');
1166
1218
  const workspace = parseBoundedYaml(workspaceSource, 'Post-generation install pnpm-workspace.yaml');
1167
- assertPhaseControlledPnpmSettings(isRecord(rootManifest) ? rootManifest.pnpm : undefined, 'root package.json pnpm settings');
1168
1219
  assertPhaseControlledPnpmSettings(workspace, 'pnpm-workspace.yaml settings');
1169
- assertNoAmbientInterpolation(isRecord(rootManifest) ? rootManifest.pnpm : undefined, 'root package.json pnpm settings');
1170
1220
  assertNoAmbientInterpolation(workspace, 'pnpm-workspace.yaml settings');
1171
- assertSupportedPnpmSettings(isRecord(rootManifest) ? rootManifest.pnpm : undefined, 'root package.json pnpm settings');
1172
1221
  assertSupportedPnpmSettings(workspace, 'pnpm-workspace.yaml settings');
1173
1222
  assertRetainedPnpmStore(workspace);
1223
+ assertRetainedPnpmExoticSubdepPolicy(workspace);
1224
+ assertRetainedPnpmVirtualStorePolicy(workspace);
1225
+ assertRetainedPnpmfilePolicy(workspace);
1226
+ assertRetainedPnpmVerificationPolicy(workspace);
1174
1227
  const manifests = ['package.json'];
1175
1228
  for (const manifestPath of exactWorkspaceManifestPaths(reader, workspace)) {
1176
1229
  addFile('workspace-manifest', manifestPath);
@@ -1196,16 +1249,6 @@ function buildInstallAuthority(reader) {
1196
1249
  localReferences.add(reference);
1197
1250
  }
1198
1251
  if (manifestPath === 'package.json' && isRecord(manifest)) {
1199
- if (isRecord(manifest.pnpm)) {
1200
- for (const key of [
1201
- 'catalog',
1202
- 'catalogs',
1203
- 'overrides',
1204
- 'packageExtensions',
1205
- ]) {
1206
- collectNestedLocalReferences(manifest.pnpm[key], '', localReferences);
1207
- }
1208
- }
1209
1252
  collectNestedLocalReferences(manifest.resolutions, '', localReferences);
1210
1253
  }
1211
1254
  }
@@ -1224,8 +1267,9 @@ function buildInstallAuthority(reader) {
1224
1267
  throw new Error(`Post-generation install does not accept executable pnpm hooks at ${candidate}; use declarative, bound resolution configuration.`);
1225
1268
  }
1226
1269
  }
1227
- if (isRecord(workspace) && typeof workspace.pnpmfile === 'string') {
1228
- throw new Error('Post-generation install does not accept executable pnpmfile hooks in pnpm-workspace.yaml.');
1270
+ if (isRecord(workspace) &&
1271
+ (!Array.isArray(workspace.pnpmfile) || workspace.pnpmfile.length !== 0)) {
1272
+ throw new Error('Post-generation install requires one exact empty pnpmfile authority in pnpm-workspace.yaml.');
1229
1273
  }
1230
1274
  const npmrcSource = reader.read('.npmrc');
1231
1275
  if (npmrcSource !== null) {
@@ -1248,9 +1292,6 @@ function buildInstallAuthority(reader) {
1248
1292
  }
1249
1293
  }
1250
1294
  };
1251
- if (isRecord(rootManifest) && isRecord(rootManifest.pnpm)) {
1252
- collectPatchValues(rootManifest.pnpm.patchedDependencies);
1253
- }
1254
1295
  if (isRecord(workspace))
1255
1296
  collectPatchValues(workspace.patchedDependencies);
1256
1297
  for (const patch of [...patches].sort(literalCompare)) {
@@ -2525,11 +2566,6 @@ function postGenerationInstallPnpmInvocation(args, options) {
2525
2566
  /[\0\r\n"]/u.test(options.isolatedHome)) {
2526
2567
  throw new Error('Post-generation install pnpm execution authority is invalid.');
2527
2568
  }
2528
- const userConfig = (0, node_path_1.join)(options.isolatedHome, 'npm-user.rc');
2529
- const globalConfig = (0, node_path_1.join)(options.isolatedHome, 'npm-global.rc');
2530
- if ((0, node_fs_1.existsSync)(userConfig) || (0, node_fs_1.existsSync)(globalConfig)) {
2531
- throw new Error('Post-generation install isolated npm configuration paths must remain absent.');
2532
- }
2533
2569
  for (const directory of [
2534
2570
  'appdata',
2535
2571
  'cache',
@@ -2555,6 +2591,30 @@ function postGenerationInstallPnpmInvocation(args, options) {
2555
2591
  ? [(0, node_path_1.join)(systemRoot, 'System32')]
2556
2592
  : []),
2557
2593
  ].join(node_path_1.delimiter);
2594
+ let npmrcAuthFile;
2595
+ if (options.npmrcAuthFile !== undefined) {
2596
+ try {
2597
+ if (!(0, node_path_1.isAbsolute)(options.npmrcAuthFile) ||
2598
+ /[\0\r\n"]/u.test(options.npmrcAuthFile)) {
2599
+ throw new Error('invalid authority path');
2600
+ }
2601
+ const requestedMetadata = (0, node_fs_1.lstatSync)(options.npmrcAuthFile);
2602
+ const canonicalAuthFile = (0, node_fs_1.realpathSync)(options.npmrcAuthFile);
2603
+ const metadata = (0, node_fs_1.lstatSync)(canonicalAuthFile);
2604
+ if (requestedMetadata.isSymbolicLink() ||
2605
+ metadata.isSymbolicLink() ||
2606
+ !metadata.isFile() ||
2607
+ metadata.nlink !== 1 ||
2608
+ metadata.size === 0 ||
2609
+ metadata.size > 64 * 1024) {
2610
+ throw new Error('invalid authority');
2611
+ }
2612
+ npmrcAuthFile = canonicalAuthFile;
2613
+ }
2614
+ catch {
2615
+ throw new Error('Post-generation install npm authentication authority must be one exact, non-empty, bounded regular file.');
2616
+ }
2617
+ }
2558
2618
  const environment = {
2559
2619
  ...Object.fromEntries(Object.entries(inheritedEnvironment).filter(([key]) => /^EBK_/u.test(key) ||
2560
2620
  /^LC_/u.test(key) ||
@@ -2565,13 +2625,17 @@ function postGenerationInstallPnpmInvocation(args, options) {
2565
2625
  HOME: options.isolatedHome,
2566
2626
  LOCALAPPDATA: (0, node_path_1.join)(options.isolatedHome, 'localappdata'),
2567
2627
  PATH: controlledPath,
2628
+ ...(npmrcAuthFile
2629
+ ? {
2630
+ PNPM_CONFIG_NPMRC_AUTH_FILE: npmrcAuthFile,
2631
+ pnpm_config_npmrc_auth_file: npmrcAuthFile,
2632
+ }
2633
+ : {}),
2568
2634
  USERPROFILE: options.isolatedHome,
2569
2635
  XDG_CACHE_HOME: (0, node_path_1.join)(options.isolatedHome, 'cache'),
2570
2636
  XDG_CONFIG_HOME: (0, node_path_1.join)(options.isolatedHome, 'config'),
2571
2637
  XDG_DATA_HOME: (0, node_path_1.join)(options.isolatedHome, 'data'),
2572
2638
  XDG_STATE_HOME: (0, node_path_1.join)(options.isolatedHome, 'state'),
2573
- npm_config_globalconfig: globalConfig,
2574
- npm_config_userconfig: userConfig,
2575
2639
  };
2576
2640
  return {
2577
2641
  args: [options.toolchain.entryPoint, ...args],
@@ -2661,6 +2725,7 @@ function defaultInstall(workspaceRoot, frozen, packageManager) {
2661
2725
  // the generated install instead of inheriting a deleted store authority.
2662
2726
  ensureSafeDirectory(workspaceRoot, POST_GENERATION_STORE_DIRECTORY);
2663
2727
  withIsolatedPnpmHome(workspaceRoot, (isolatedHome) => {
2728
+ const npmrcAuthFile = (0, node_path_1.join)(workspaceRoot, '.npmrc');
2664
2729
  const invocation = postGenerationInstallPnpmInvocation([
2665
2730
  'install',
2666
2731
  frozen ? '--frozen-lockfile' : '--no-frozen-lockfile',
@@ -2668,7 +2733,6 @@ function defaultInstall(workspaceRoot, frozen, packageManager) {
2668
2733
  `--config.cache-dir=${(0, node_path_1.join)(isolatedHome, 'cache')}`,
2669
2734
  '--config.deploy-all-files=false',
2670
2735
  '--config.enable-modules-dir=true',
2671
- '--config.enable-global-virtual-store=false',
2672
2736
  '--config.git-branch-lockfile=false',
2673
2737
  '--config.ignore-pnpmfile=true',
2674
2738
  '--config.ignore-scripts=true',
@@ -2687,9 +2751,12 @@ function defaultInstall(workspaceRoot, frozen, packageManager) {
2687
2751
  `--config.state-dir=${(0, node_path_1.join)(isolatedHome, 'state')}`,
2688
2752
  `--config.store-dir=${POST_GENERATION_STORE_DIRECTORY}`,
2689
2753
  '--config.symlink=true',
2690
- '--config.use-store-server=false',
2691
2754
  '--config.verify-store-integrity=true',
2692
- ], { isolatedHome, toolchain });
2755
+ ], {
2756
+ isolatedHome,
2757
+ ...((0, node_fs_1.existsSync)(npmrcAuthFile) ? { npmrcAuthFile } : {}),
2758
+ toolchain,
2759
+ });
2693
2760
  (0, node_child_process_1.execFileSync)(invocation.command, invocation.args, {
2694
2761
  cwd: workspaceRoot,
2695
2762
  env: invocation.env,