@storm-software/workspace-tools 1.180.9 → 1.181.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.180.9",
3
+ "version": "1.181.0",
4
4
  "type": "commonjs",
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "repository": {
@@ -57,7 +57,8 @@
57
57
  "@nx/devkit": "^19.6.4",
58
58
  "@nx/esbuild": "^19.6.4",
59
59
  "@nx/rollup": "^19.6.2",
60
- "nx": "^19.6.4"
60
+ "nx": "^19.6.4",
61
+ "typescript": ">=5.5.3"
61
62
  },
62
63
  "peerDependenciesMeta": {
63
64
  "@microsoft/api-extractor": {
@@ -74,6 +75,9 @@
74
75
  },
75
76
  "nx": {
76
77
  "optional": false
78
+ },
79
+ "typescript": {
80
+ "optional": false
77
81
  }
78
82
  },
79
83
  "dependencies": {
@@ -120,7 +124,8 @@
120
124
  "@nx/rollup": "^19.6.2",
121
125
  "@types/micromatch": "4.0.9",
122
126
  "@types/semver": "7.5.8",
123
- "nx": "^19.6.4"
127
+ "nx": "^19.6.4",
128
+ "typescript": ">=5.5.3"
124
129
  },
125
130
  "publishConfig": {
126
131
  "access": "public"
@@ -39009,7 +39009,7 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
39009
39009
  const getSuperRef = _core.types.isIdentifier(superRef) ? () => superRef : () => (null != injectSuperRef || (injectSuperRef = props[0].scope.generateUidIdentifierBasedOnNode(superRef)), injectSuperRef), classRefForInnerBinding = null != (_ref = ref2) ? _ref : props[0].scope.generateUidIdentifier((null == innerBindingRef ? void 0 : innerBindingRef.name) || "Class");
39010
39010
  null != ref2 || (ref2 = _core.types.cloneNode(innerBindingRef));
39011
39011
  for (const prop of props) {
39012
- prop.isClassProperty() && ts2.assertFieldTransformed(prop);
39012
+ prop.isClassProperty() && ts.assertFieldTransformed(prop);
39013
39013
  const isStatic = !(null != _core.types.isStaticBlock && _core.types.isStaticBlock(prop.node)) && prop.node.static, isInstance = !isStatic, isPrivate = prop.isPrivate(), isPublic = !isPrivate, isField = prop.isProperty(), isMethod = !isField, isStaticBlock = null == prop.isStaticBlock ? void 0 : prop.isStaticBlock();
39014
39014
  if (isStatic && (classRefFlags |= 1), isStatic || isMethod && isPrivate || isStaticBlock) {
39015
39015
  new _helperReplaceSupers.default({ methodPath: prop, constantSuper, file, refToPreserve: innerBindingRef, getSuperRef, getObjectRef: () => (classRefFlags |= 2, isStatic || isStaticBlock ? classRefForInnerBinding : _core.types.memberExpression(classRefForInnerBinding, _core.types.identifier("prototype"))) }).replace();
@@ -39112,7 +39112,7 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
39112
39112
  const body = path9.get("body"), handler = privateFieldsAsProperties ? privateNameHandlerLoose : privateNameHandlerSpec;
39113
39113
  (0, _helperMemberExpressionToFunctions.default)(body, privateNameVisitor, Object.assign({ privateNamesMap, classRef: ref2, file: state }, handler, { noDocumentAll, noUninitializedPrivateFieldAccess, innerBinding })), body.traverse(privateInVisitor, { privateNamesMap, classRef: ref2, file: state, privateFieldsAsProperties, innerBinding });
39114
39114
  };
39115
- var _core = __webpack_require__2("./node_modules/.pnpm/@babel+core@7.24.7/node_modules/@babel/core/lib/index.js"), _helperReplaceSupers = __webpack_require__2("./node_modules/.pnpm/@babel+helper-replace-supers@7.24.7_@babel+core@7.24.7/node_modules/@babel/helper-replace-supers/lib/index.js"), _helperEnvironmentVisitor = __webpack_require__2("./node_modules/.pnpm/@babel+helper-environment-visitor@7.24.7/node_modules/@babel/helper-environment-visitor/lib/index.js"), _helperMemberExpressionToFunctions = __webpack_require__2("./node_modules/.pnpm/@babel+helper-member-expression-to-functions@7.24.7/node_modules/@babel/helper-member-expression-to-functions/lib/index.js"), _helperOptimiseCallExpression = __webpack_require__2("./node_modules/.pnpm/@babel+helper-optimise-call-expression@7.24.7/node_modules/@babel/helper-optimise-call-expression/lib/index.js"), _helperAnnotateAsPure = __webpack_require__2("./node_modules/.pnpm/@babel+helper-annotate-as-pure@7.24.7/node_modules/@babel/helper-annotate-as-pure/lib/index.js"), _helperSkipTransparentExpressionWrappers = __webpack_require__2("./node_modules/.pnpm/@babel+helper-skip-transparent-expression-wrappers@7.24.7/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js"), ts2 = __webpack_require__2("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.24.7_@babel+core@7.24.7/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js"), newHelpers = (file) => file.availableHelper("classPrivateFieldGet2");
39115
+ var _core = __webpack_require__2("./node_modules/.pnpm/@babel+core@7.24.7/node_modules/@babel/core/lib/index.js"), _helperReplaceSupers = __webpack_require__2("./node_modules/.pnpm/@babel+helper-replace-supers@7.24.7_@babel+core@7.24.7/node_modules/@babel/helper-replace-supers/lib/index.js"), _helperEnvironmentVisitor = __webpack_require__2("./node_modules/.pnpm/@babel+helper-environment-visitor@7.24.7/node_modules/@babel/helper-environment-visitor/lib/index.js"), _helperMemberExpressionToFunctions = __webpack_require__2("./node_modules/.pnpm/@babel+helper-member-expression-to-functions@7.24.7/node_modules/@babel/helper-member-expression-to-functions/lib/index.js"), _helperOptimiseCallExpression = __webpack_require__2("./node_modules/.pnpm/@babel+helper-optimise-call-expression@7.24.7/node_modules/@babel/helper-optimise-call-expression/lib/index.js"), _helperAnnotateAsPure = __webpack_require__2("./node_modules/.pnpm/@babel+helper-annotate-as-pure@7.24.7/node_modules/@babel/helper-annotate-as-pure/lib/index.js"), _helperSkipTransparentExpressionWrappers = __webpack_require__2("./node_modules/.pnpm/@babel+helper-skip-transparent-expression-wrappers@7.24.7/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js"), ts = __webpack_require__2("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.24.7_@babel+core@7.24.7/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js"), newHelpers = (file) => file.availableHelper("classPrivateFieldGet2");
39116
39116
  function privateNameVisitorFactory(visitor) {
39117
39117
  const nestedVisitor = _core.traverse.visitors.merge([Object.assign({}, visitor), _helperEnvironmentVisitor.default]), privateNameVisitor2 = Object.assign({}, visitor, { Class(path9) {
39118
39118
  const { privateNamesMap } = this, body = path9.get("body.body"), visiblePrivateNames = new Map(privateNamesMap), redeclared = [];
@@ -78018,12 +78018,12 @@ var require_node = __commonJS({
78018
78018
  return !b6(n2) || !Object.prototype.hasOwnProperty.call(n2, "_countQueuingStrategyHighWaterMark") ? false : n2 instanceof Ke2;
78019
78019
  }
78020
78020
  u3(go, "IsCountQueuingStrategy");
78021
- function ts2(n2, o) {
78021
+ function ts(n2, o) {
78022
78022
  ce2(n2, o);
78023
78023
  const a2 = n2?.cancel, p2 = n2?.flush, g4 = n2?.readableType, _6 = n2?.start, S6 = n2?.transform, C5 = n2?.writableType;
78024
78024
  return { cancel: a2 === void 0 ? void 0 : is(a2, n2, `${o} has member 'cancel' that`), flush: p2 === void 0 ? void 0 : rs(p2, n2, `${o} has member 'flush' that`), readableType: g4, start: _6 === void 0 ? void 0 : ns(_6, n2, `${o} has member 'start' that`), transform: S6 === void 0 ? void 0 : os2(S6, n2, `${o} has member 'transform' that`), writableType: C5 };
78025
78025
  }
78026
- u3(ts2, "convertTransformer");
78026
+ u3(ts, "convertTransformer");
78027
78027
  function rs(n2, o, a2) {
78028
78028
  return ee3(n2, a2), (p2) => H6(n2, o, [p2]);
78029
78029
  }
@@ -78043,7 +78043,7 @@ var require_node = __commonJS({
78043
78043
  const Xr = class Xr {
78044
78044
  constructor(o = {}, a2 = {}, p2 = {}) {
78045
78045
  o === void 0 && (o = null);
78046
- const g4 = zt(a2, "Second parameter"), _6 = zt(p2, "Third parameter"), S6 = ts2(o, "First parameter");
78046
+ const g4 = zt(a2, "Second parameter"), _6 = zt(p2, "Third parameter"), S6 = ts(o, "First parameter");
78047
78047
  if (S6.readableType !== void 0) throw new RangeError("Invalid readableType specified");
78048
78048
  if (S6.writableType !== void 0) throw new RangeError("Invalid writableType specified");
78049
78049
  const C5 = lt(_6, 0), q5 = Ot(_6), P5 = lt(g4, 1), W6 = Ot(g4);
@@ -94143,9 +94143,9 @@ var init_get_default_config = __esm({
94143
94143
  let repository = "https://github.com/storm-software/storm-ops";
94144
94144
  let license = DEFAULT_STORM_CONFIG.license;
94145
94145
  let homepage = DEFAULT_STORM_CONFIG.homepage;
94146
- const workspaceRoot3 = findWorkspaceRoot(root);
94147
- if ((0, import_node_fs10.existsSync)((0, import_node_path11.join)(workspaceRoot3, "package.json"))) {
94148
- const file = (0, import_node_fs10.readFileSync)((0, import_node_path11.join)(workspaceRoot3, "package.json"), {
94146
+ const workspaceRoot2 = findWorkspaceRoot(root);
94147
+ if ((0, import_node_fs10.existsSync)((0, import_node_path11.join)(workspaceRoot2, "package.json"))) {
94148
+ const file = (0, import_node_fs10.readFileSync)((0, import_node_path11.join)(workspaceRoot2, "package.json"), {
94149
94149
  encoding: "utf-8"
94150
94150
  });
94151
94151
  if (file) {
@@ -94178,7 +94178,7 @@ var init_get_default_config = __esm({
94178
94178
  return ret;
94179
94179
  }, {}),
94180
94180
  colors: { ...DEFAULT_COLOR_CONFIG, ...config.colors },
94181
- workspaceRoot: workspaceRoot3,
94181
+ workspaceRoot: workspaceRoot2,
94182
94182
  name,
94183
94183
  namespace,
94184
94184
  repository,
@@ -95024,14 +95024,14 @@ var init_create_storm_config = __esm({
95024
95024
  init_get_default_config();
95025
95025
  _extension_cache = /* @__PURE__ */ new WeakMap();
95026
95026
  _static_cache = void 0;
95027
- createConfig = (workspaceRoot3) => {
95028
- return createStormConfig(void 0, void 0, workspaceRoot3);
95027
+ createConfig = (workspaceRoot2) => {
95028
+ return createStormConfig(void 0, void 0, workspaceRoot2);
95029
95029
  };
95030
- createStormConfig = (extensionName, schema, workspaceRoot3) => {
95030
+ createStormConfig = (extensionName, schema, workspaceRoot2) => {
95031
95031
  let result;
95032
95032
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 3e4) {
95033
95033
  const config = getConfigEnv();
95034
- const defaultConfig = getDefaultConfig(config, workspaceRoot3);
95034
+ const defaultConfig = getDefaultConfig(config, workspaceRoot2);
95035
95035
  result = StormConfigSchema.parse({
95036
95036
  ...defaultConfig,
95037
95037
  ...config,
@@ -95040,7 +95040,7 @@ var init_create_storm_config = __esm({
95040
95040
  ...config.colors
95041
95041
  }
95042
95042
  });
95043
- result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot3);
95043
+ result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot2);
95044
95044
  } else {
95045
95045
  result = _static_cache.data;
95046
95046
  }
@@ -95068,7 +95068,7 @@ var init_create_storm_config = __esm({
95068
95068
  _extension_cache.set(extension_cache_key, extension);
95069
95069
  return extension;
95070
95070
  };
95071
- loadStormConfig = async (workspaceRoot3) => {
95071
+ loadStormConfig = async (workspaceRoot2) => {
95072
95072
  let config = {};
95073
95073
  if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
95074
95074
  writeInfo(
@@ -95077,7 +95077,7 @@ var init_create_storm_config = __esm({
95077
95077
  );
95078
95078
  return _static_cache.data;
95079
95079
  }
95080
- let _workspaceRoot = workspaceRoot3;
95080
+ let _workspaceRoot = workspaceRoot2;
95081
95081
  if (!_workspaceRoot) {
95082
95082
  _workspaceRoot = findWorkspaceRoot();
95083
95083
  }
@@ -154041,7 +154041,7 @@ var require_fields = __commonJS({
154041
154041
  var _helperOptimiseCallExpression = require_lib27();
154042
154042
  var _helperAnnotateAsPure = require_lib30();
154043
154043
  var _helperSkipTransparentExpressionWrappers = require_lib29();
154044
- var ts2 = require_typescript3();
154044
+ var ts = require_typescript3();
154045
154045
  {
154046
154046
  newHelpers = (file) => {
154047
154047
  ;
@@ -154940,7 +154940,7 @@ var require_fields = __commonJS({
154940
154940
  const classRefForInnerBinding = (_ref = ref2) != null ? _ref : props[0].scope.generateUidIdentifier((innerBindingRef == null ? void 0 : innerBindingRef.name) || "Class");
154941
154941
  (_ref2 = ref2) != null ? _ref2 : ref2 = _core.types.cloneNode(innerBindingRef);
154942
154942
  for (const prop of props) {
154943
- prop.isClassProperty() && ts2.assertFieldTransformed(prop);
154943
+ prop.isClassProperty() && ts.assertFieldTransformed(prop);
154944
154944
  const isStatic = !(_core.types.isStaticBlock != null && _core.types.isStaticBlock(prop.node)) && prop.node.static;
154945
154945
  const isInstance = !isStatic;
154946
154946
  const isPrivate = prop.isPrivate();
@@ -200339,22 +200339,22 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
200339
200339
  "The Build process failed because the context is not valid. Please run this command from a workspace."
200340
200340
  );
200341
200341
  }
200342
- const workspaceRoot3 = findWorkspaceRoot2();
200343
- const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot3;
200344
- const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot3;
200342
+ const workspaceRoot2 = findWorkspaceRoot2();
200343
+ const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot2;
200344
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot2;
200345
200345
  const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
200346
- config.workspaceRoot = workspaceRoot3;
200346
+ config.workspaceRoot = workspaceRoot2;
200347
200347
  if (!executorOptions.skipReadingConfig) {
200348
200348
  writeDebug2(
200349
200349
  `Loading the Storm Config from environment variables and storm.config.js file...
200350
- - workspaceRoot: ${workspaceRoot3}
200350
+ - workspaceRoot: ${workspaceRoot2}
200351
200351
  - projectRoot: ${projectRoot}
200352
200352
  - sourceRoot: ${sourceRoot}
200353
200353
  - projectName: ${projectName}
200354
200354
  `,
200355
200355
  config
200356
200356
  );
200357
- config = await loadStormConfig2(workspaceRoot3);
200357
+ config = await loadStormConfig2(workspaceRoot2);
200358
200358
  }
200359
200359
  if (executorOptions?.hooks?.applyDefaultOptions) {
200360
200360
  writeDebug2("Running the applyDefaultOptions hook...", config);
@@ -200374,7 +200374,7 @@ ${Object.keys(options).map(
200374
200374
  options,
200375
200375
  {
200376
200376
  config,
200377
- workspaceRoot: workspaceRoot3,
200377
+ workspaceRoot: workspaceRoot2,
200378
200378
  projectRoot,
200379
200379
  sourceRoot,
200380
200380
  projectName,
@@ -200450,6 +200450,7 @@ var _isFunction2 = (value2) => {
200450
200450
  var import_devkit2 = require("@nx/devkit");
200451
200451
  var import_type_definitions = require("@nx/js/src/plugins/rollup/type-definitions");
200452
200452
  var import_buildable_libs_utils = require("@nx/js/src/utils/buildable-libs-utils");
200453
+ var import_ensure_typescript = require("@nx/js/src/utils/typescript/ensure-typescript.js");
200453
200454
  var import_generate_package_json = require("@nx/rollup/src/plugins/package-json/generate-package-json");
200454
200455
 
200455
200456
  // node_modules/.pnpm/@rollup+plugin-babel@6.0.4_@babel+core@7.24.7_@types+babel__core@7.20.5_rollup@4.18.0/node_modules/@rollup/plugin-babel/dist/es/index.js
@@ -201908,14 +201909,14 @@ function nodeResolve(opts = {}) {
201908
201909
  // packages/workspace-tools/src/executors/rollup/utils/get-options.ts
201909
201910
  var import_node_fs12 = require("node:fs");
201910
201911
  var import_node_path13 = require("node:path");
201911
- var ts = __toESM(require("typescript"));
201912
+ var import_typescript = require("typescript");
201912
201913
 
201913
201914
  // packages/workspace-tools/src/executors/rollup/utils/normalize-options.ts
201914
201915
  var import_devkit = require("@nx/devkit");
201915
201916
  var import_js = require("@nx/js");
201916
201917
  var import_node_fs11 = require("node:fs");
201917
201918
  var import_node_path12 = require("node:path");
201918
- function normalizeOptions(projectRoot, sourceRoot, options) {
201919
+ function normalizeOptions(projectRoot, sourceRoot, options, config) {
201919
201920
  if (global.NX_GRAPH_CREATION)
201920
201921
  return options;
201921
201922
  normalizeRelativePaths(projectRoot, options);
@@ -201935,7 +201936,10 @@ function normalizeOptions(projectRoot, sourceRoot, options) {
201935
201936
  generateExportsField: options.generateExportsField ?? false,
201936
201937
  javascriptEnabled: options.javascriptEnabled ?? false,
201937
201938
  skipTypeCheck: options.skipTypeCheck ?? false,
201938
- skipTypeField: options.skipTypeField ?? false
201939
+ skipTypeField: options.skipTypeField ?? false,
201940
+ projectRoot,
201941
+ sourceRoot,
201942
+ config
201939
201943
  };
201940
201944
  }
201941
201945
  function normalizeAssets(assets, root, sourceRoot) {
@@ -202026,11 +202030,14 @@ function analyze() {
202026
202030
  }
202027
202031
  };
202028
202032
  }
202029
- async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, config) {
202033
+ async function withRollupConfig(rawOptions, rollupConfig = {}, config, dependencies) {
202030
202034
  const { writeWarning: writeWarning2, correctPaths: correctPaths2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
202035
+ const ts = (0, import_ensure_typescript.ensureTypescript)();
202031
202036
  const finalConfig = { ...rollupConfig };
202032
202037
  const projectNode = getProjectNode();
202033
- const projectRoot = correctPaths2((0, import_node_path13.join)(import_devkit2.workspaceRoot, projectNode.data.root));
202038
+ const projectRoot = correctPaths2(
202039
+ (0, import_node_path13.join)(config.workspaceRoot, projectNode.data.root)
202040
+ );
202034
202041
  const projectGraph = global.NX_GRAPH_CREATION ? null : (0, import_devkit2.readCachedProjectGraph)();
202035
202042
  if (!projectGraph) {
202036
202043
  throw new Error(`Cannot find project graph.`);
@@ -202049,7 +202056,7 @@ async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, con
202049
202056
  const result = (0, import_buildable_libs_utils.calculateProjectBuildableDependencies)(
202050
202057
  void 0,
202051
202058
  projectGraph,
202052
- import_devkit2.workspaceRoot,
202059
+ config.workspaceRoot,
202053
202060
  projectNode.name,
202054
202061
  process.env.NX_TASK_TARGET_TARGET,
202055
202062
  process.env.NX_TASK_TARGET_CONFIGURATION,
@@ -202063,13 +202070,16 @@ async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, con
202063
202070
  const options = normalizeOptions(
202064
202071
  projectNode.data.root,
202065
202072
  projectNode.data.sourceRoot,
202066
- rawOptions
202073
+ rawOptions,
202074
+ config
202075
+ );
202076
+ const tsConfigPath = correctPaths2(
202077
+ (0, import_node_path13.join)(config.workspaceRoot, options.tsConfig)
202067
202078
  );
202068
- const tsConfigPath = correctPaths2((0, import_node_path13.join)(import_devkit2.workspaceRoot, options.tsConfig));
202069
202079
  const tsConfigFile = ts.readConfigFile(tsConfigPath, ts.sys.readFile);
202070
202080
  const tsConfigInclude = [
202071
202081
  ...tsConfigFile.config?.include && Array.isArray(tsConfigFile.config.include) ? tsConfigFile.config.include : [],
202072
- (0, import_node_path13.join)(import_devkit2.workspaceRoot, "node_modules/typescript/lib/*.d.ts")
202082
+ (0, import_node_path13.join)(config.workspaceRoot, "node_modules/typescript/lib/*.d.ts")
202073
202083
  ];
202074
202084
  const tsConfig = ts.parseJsonConfigFileContent(
202075
202085
  {
@@ -202112,13 +202122,13 @@ async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, con
202112
202122
  // Options are not normalized with project root during graph creation due to the lack of project and project root.
202113
202123
  // Cannot be joined with workspace root now, but will be handled by @nx/rollup/plugin.
202114
202124
  options.outputPath
202115
- ) : correctPaths2((0, import_node_path13.join)(import_devkit2.workspaceRoot, options.outputPath)),
202125
+ ) : correctPaths2((0, import_node_path13.join)(config.workspaceRoot, options.outputPath)),
202116
202126
  sourcemap: options.sourceMap
202117
202127
  }));
202118
202128
  }
202119
202129
  let packageJson = {};
202120
202130
  if (!global.NX_GRAPH_CREATION) {
202121
- const packageJsonPath = options.project ? (0, import_node_path13.join)(import_devkit2.workspaceRoot, options.project) : (0, import_node_path13.join)(projectRoot, "package.json");
202131
+ const packageJsonPath = options.project ? (0, import_node_path13.join)(config.workspaceRoot, options.project) : (0, import_node_path13.join)(projectRoot, "package.json");
202122
202132
  if (!(0, import_node_fs12.existsSync)(packageJsonPath)) {
202123
202133
  throw new Error(`Cannot find ${packageJsonPath}.`);
202124
202134
  }
@@ -202164,7 +202174,8 @@ async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, con
202164
202174
  copy({
202165
202175
  targets: convertCopyAssetsToRollupOptions(
202166
202176
  options.outputPath,
202167
- options.assets
202177
+ options.assets,
202178
+ config.workspaceRoot
202168
202179
  )
202169
202180
  }),
202170
202181
  image(),
@@ -202174,7 +202185,7 @@ async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, con
202174
202185
  extensions: fileExtensions
202175
202186
  }),
202176
202187
  require_rollup_plugin_typescript2_cjs()({
202177
- cwd: correctPaths2(import_devkit2.workspaceRoot),
202188
+ cwd: correctPaths2(config.workspaceRoot),
202178
202189
  check: !options.skipTypeCheck,
202179
202190
  typescript: ts,
202180
202191
  tsconfig: options.tsConfig,
@@ -202212,7 +202223,7 @@ async function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, con
202212
202223
  },
202213
202224
  cwd: correctPaths2(
202214
202225
  (0, import_node_path13.join)(
202215
- import_devkit2.workspaceRoot,
202226
+ config.workspaceRoot,
202216
202227
  projectNode.data.sourceRoot ?? projectNode.data.root
202217
202228
  )
202218
202229
  ),
@@ -202252,9 +202263,14 @@ function createInput(options) {
202252
202263
  if (global.NX_GRAPH_CREATION) return {};
202253
202264
  const mainEntryFileName = options.outputFileName || options.main;
202254
202265
  const input = {};
202255
- input[(0, import_node_path13.parse)(mainEntryFileName).name] = (0, import_node_path13.join)(import_devkit2.workspaceRoot, options.main);
202266
+ input[(0, import_node_path13.parse)(mainEntryFileName).name] = (0, import_node_path13.join)(
202267
+ options.config.workspaceRoot,
202268
+ options.main
202269
+ );
202256
202270
  options.additionalEntryPoints?.forEach((entry) => {
202257
- input[(0, import_node_path13.parse)(entry).name] = (0, import_node_path13.join)(import_devkit2.workspaceRoot, entry);
202271
+ const entryPoint = (0, import_node_path13.join)(options.config.workspaceRoot, entry);
202272
+ const entryName = entryPoint.includes(options.sourceRoot) ? entryPoint.replace(options.sourceRoot, "") : entryPoint.replace(options.config.workspaceRoot, "");
202273
+ input[entryName.replaceAll("\\", "/").startsWith("/") ? entryName.slice(1) : entryName] = entryPoint;
202258
202274
  });
202259
202275
  return input;
202260
202276
  }
@@ -202276,7 +202292,7 @@ async function createTsCompilerOptions(parsedCommandLine, options, dependencies,
202276
202292
  skipDefaultLibCheck: true,
202277
202293
  paths: compilerOptionPaths
202278
202294
  };
202279
- if (parsedCommandLine.options.module === ts.ModuleKind.CommonJS) {
202295
+ if (parsedCommandLine.options.module === import_typescript.ModuleKind.CommonJS) {
202280
202296
  compilerOptions["module"] = "ESNext";
202281
202297
  }
202282
202298
  if (options.compiler === "swc") {
@@ -202284,17 +202300,17 @@ async function createTsCompilerOptions(parsedCommandLine, options, dependencies,
202284
202300
  }
202285
202301
  return compilerOptions;
202286
202302
  }
202287
- function convertCopyAssetsToRollupOptions(outputPath, assets) {
202303
+ function convertCopyAssetsToRollupOptions(outputPath, assets, workspaceRoot2) {
202288
202304
  return assets ? assets.map((a2) => ({
202289
202305
  src: (0, import_node_path13.join)(a2.input, a2.glob).replace(/\\/g, "/"),
202290
- dest: (0, import_node_path13.join)(import_devkit2.workspaceRoot, outputPath, a2.output).replace(/\\/g, "/")
202306
+ dest: (0, import_node_path13.join)(workspaceRoot2, outputPath, a2.output).replace(/\\/g, "/")
202291
202307
  })) : [];
202292
202308
  }
202293
202309
  function readCompatibleFormats(config) {
202294
202310
  switch (config.options.module) {
202295
- case ts.ModuleKind.CommonJS:
202296
- case ts.ModuleKind.UMD:
202297
- case ts.ModuleKind.AMD:
202311
+ case import_typescript.ModuleKind.CommonJS:
202312
+ case import_typescript.ModuleKind.UMD:
202313
+ case import_typescript.ModuleKind.AMD:
202298
202314
  return ["cjs"];
202299
202315
  default:
202300
202316
  return ["esm"];
@@ -202316,7 +202332,7 @@ async function* rollupExecutorFn(options, context, config) {
202316
202332
  if (!context?.projectName || !context?.projectsConfigurations?.projects?.[context.projectName]?.root) {
202317
202333
  throw new Error("Nx executor context was invalid");
202318
202334
  }
202319
- const workspaceRoot3 = findWorkspaceRoot2();
202335
+ const workspaceRoot2 = findWorkspaceRoot2();
202320
202336
  const projectRoot = context?.projectsConfigurations?.projects[context.projectName]?.root;
202321
202337
  const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? projectRoot;
202322
202338
  if (options.clean !== false) {
@@ -202346,7 +202362,7 @@ async function* rollupExecutorFn(options, context, config) {
202346
202362
  const files = await new Glob("**/*.{ts,mts,cts,tsx}", {
202347
202363
  absolute: true,
202348
202364
  cwd: sourceRoot,
202349
- root: workspaceRoot3
202365
+ root: workspaceRoot2
202350
202366
  }).walk();
202351
202367
  options.additionalEntryPoints = files.reduce(
202352
202368
  (ret, file) => {
@@ -202357,10 +202373,10 @@ async function* rollupExecutorFn(options, context, config) {
202357
202373
  return ret;
202358
202374
  },
202359
202375
  options.additionalEntryPoints?.map(
202360
- (entry) => correctPaths2((0, import_path5.join)(workspaceRoot3, entry))
202376
+ (entry) => correctPaths2((0, import_path5.join)(workspaceRoot2, entry))
202361
202377
  ) ?? []
202362
202378
  ).map((entry) => {
202363
- const formatted = entry.replace(workspaceRoot3, "");
202379
+ const formatted = entry.replace(workspaceRoot2, "");
202364
202380
  return formatted.startsWith("/") ? formatted.slice(1) : formatted;
202365
202381
  });
202366
202382
  }
@@ -202472,8 +202488,8 @@ async function createRollupOptions(options, context, config) {
202472
202488
  const rollupConfig = await withRollupConfig(
202473
202489
  options,
202474
202490
  {},
202475
- dependencies,
202476
- config
202491
+ config,
202492
+ dependencies
202477
202493
  );
202478
202494
  const generatePackageJsonPlugin = Array.isArray(rollupConfig.plugins) ? rollupConfig.plugins.find(
202479
202495
  (p2) => p2?.["name"] === import_generate_package_json2.pluginName
@@ -2,4 +2,4 @@ import { DependentBuildableProjectNode } from "@nx/js/src/utils/buildable-libs-u
2
2
  import { StormConfig } from "@storm-software/config";
3
3
  import * as rollup from "rollup";
4
4
  import { RollupWithNxPluginOptions } from "./normalize-options";
5
- export declare function withRollupConfig(rawOptions: RollupWithNxPluginOptions, rollupConfig?: rollup.RollupOptions, dependencies?: DependentBuildableProjectNode[], config?: StormConfig): Promise<rollup.RollupOptions>;
5
+ export declare function withRollupConfig(rawOptions: RollupWithNxPluginOptions, rollupConfig: rollup.RollupOptions | undefined, config: StormConfig, dependencies: DependentBuildableProjectNode[]): Promise<rollup.RollupOptions>;
@@ -1,3 +1,4 @@
1
+ import { StormConfig } from "@storm-software/config";
1
2
  export interface RollupWithNxPluginOptions {
2
3
  /**
3
4
  * Additional entry-points to add to exports field in the package.json file.
@@ -87,5 +88,8 @@ export interface NormalizedRollupWithNxPluginOptions extends RollupWithNxPluginO
87
88
  assets: AssetGlobPattern[];
88
89
  compiler: "babel" | "tsc" | "swc";
89
90
  format: ("cjs" | "esm")[];
91
+ projectRoot: string;
92
+ sourceRoot: string;
93
+ config: StormConfig;
90
94
  }
91
- export declare function normalizeOptions(projectRoot: string, sourceRoot: string, options: RollupWithNxPluginOptions): NormalizedRollupWithNxPluginOptions;
95
+ export declare function normalizeOptions(projectRoot: string, sourceRoot: string, options: RollupWithNxPluginOptions, config: StormConfig): NormalizedRollupWithNxPluginOptions;