@storm-software/workspace-tools 1.43.6 → 1.43.8

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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [1.43.7](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.6...workspace-tools-v1.43.7) (2024-01-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **config-tools:** Resolved issue with bad config file lookup logic ([9967de4](https://github.com/storm-software/storm-ops/commit/9967de48b063a83f42c74c3f6dd667d31123dc6f))
7
+ * **workspace-tools:** Resolved issue with config file names changing ([f18c40c](https://github.com/storm-software/storm-ops/commit/f18c40c1be8c154aff163692e79351b34accb991))
8
+
9
+ ## [1.43.6](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.5...workspace-tools-v1.43.6) (2024-01-17)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **workspace-tools:** Added code to properly parse out the config file ([c345fef](https://github.com/storm-software/storm-ops/commit/c345fefc6389a9a10b3f5b8446eb76982f45e6f7))
15
+
1
16
  ## [1.43.5](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.4...workspace-tools-v1.43.5) (2024-01-17)
2
17
 
3
18
 
package/index.js CHANGED
@@ -34308,7 +34308,7 @@ var require_jsonfile = __commonJS({
34308
34308
  return obj;
34309
34309
  }
34310
34310
  var readFile = universalify.fromPromise(_readFile);
34311
- function readFileSync4(file, options = {}) {
34311
+ function readFileSync3(file, options = {}) {
34312
34312
  if (typeof options === "string") {
34313
34313
  options = { encoding: options };
34314
34314
  }
@@ -34340,7 +34340,7 @@ var require_jsonfile = __commonJS({
34340
34340
  }
34341
34341
  var jsonfile = {
34342
34342
  readFile,
34343
- readFileSync: readFileSync4,
34343
+ readFileSync: readFileSync3,
34344
34344
  writeFile: writeFile2,
34345
34345
  writeFileSync: writeFileSync3
34346
34346
  };
@@ -46989,7 +46989,7 @@ var require_lib6 = __commonJS({
46989
46989
  function _interopRequireDefault(obj) {
46990
46990
  return obj && obj.__esModule ? obj : { default: obj };
46991
46991
  }
46992
- var readFileSync4 = (fp) => {
46992
+ var readFileSync3 = (fp) => {
46993
46993
  return _fs.default.readFileSync(fp, "utf8");
46994
46994
  };
46995
46995
  var pathExists = (fp) => new Promise((resolve) => {
@@ -47113,7 +47113,7 @@ var require_lib6 = __commonJS({
47113
47113
  if (this.packageJsonCache.has(filepath2)) {
47114
47114
  return this.packageJsonCache.get(filepath2)[options.packageKey];
47115
47115
  }
47116
- const data2 = this.options.parseJSON(readFileSync4(filepath2));
47116
+ const data2 = this.options.parseJSON(readFileSync3(filepath2));
47117
47117
  return data2;
47118
47118
  }
47119
47119
  };
@@ -47147,7 +47147,7 @@ var require_lib6 = __commonJS({
47147
47147
  if (this.packageJsonCache.has(filepath2)) {
47148
47148
  return this.packageJsonCache.get(filepath2)[options.packageKey];
47149
47149
  }
47150
- const data2 = this.options.parseJSON(readFileSync4(filepath2));
47150
+ const data2 = this.options.parseJSON(readFileSync3(filepath2));
47151
47151
  return data2;
47152
47152
  }
47153
47153
  };
@@ -73213,7 +73213,7 @@ var require_util5 = __commonJS({
73213
73213
  var normalize2 = createSafeHandler((url) => {
73214
73214
  });
73215
73215
  exports.normalize = normalize2;
73216
- function join8(aRoot, aPath) {
73216
+ function join7(aRoot, aPath) {
73217
73217
  const pathType = getURLType(aPath);
73218
73218
  const rootType = getURLType(aRoot);
73219
73219
  aRoot = ensureDirectory(aRoot);
@@ -73239,7 +73239,7 @@ var require_util5 = __commonJS({
73239
73239
  const newPath = withBase(aPath, withBase(aRoot, base));
73240
73240
  return computeRelativeURL(base, newPath);
73241
73241
  }
73242
- exports.join = join8;
73242
+ exports.join = join7;
73243
73243
  function relative(rootURL, targetURL) {
73244
73244
  const result = relativeIfPossible(rootURL, targetURL);
73245
73245
  return typeof result === "string" ? result : normalize2(targetURL);
@@ -73269,9 +73269,9 @@ var require_util5 = __commonJS({
73269
73269
  }
73270
73270
  let url = normalize2(sourceURL || "");
73271
73271
  if (sourceRoot)
73272
- url = join8(sourceRoot, url);
73272
+ url = join7(sourceRoot, url);
73273
73273
  if (sourceMapURL)
73274
- url = join8(trimFilename(sourceMapURL), url);
73274
+ url = join7(trimFilename(sourceMapURL), url);
73275
73275
  return url;
73276
73276
  }
73277
73277
  exports.computeSourceURL = computeSourceURL;
@@ -75036,8 +75036,8 @@ var require_source_map = __commonJS({
75036
75036
  // node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js
75037
75037
  var require_native = __commonJS({
75038
75038
  "node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js"(exports, module2) {
75039
- var { existsSync: existsSync6 } = require("node:fs");
75040
- var { join: join8 } = require("node:path");
75039
+ var { existsSync: existsSync5 } = require("node:fs");
75040
+ var { join: join7 } = require("node:path");
75041
75041
  var { platform, arch, report } = require("node:process");
75042
75042
  var isMusl = () => !report.getReport().header.glibcVersionRuntime;
75043
75043
  var bindingsByPlatformAndArch = {
@@ -75087,7 +75087,7 @@ If this is important to you, please consider supporting Rollup to make a native
75087
75087
  return imported.base;
75088
75088
  }
75089
75089
  var localName = `./rollup.${packageBase}.node`;
75090
- var { parse, parseAsync, xxhashBase64Url } = existsSync6(join8(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
75090
+ var { parse, parseAsync, xxhashBase64Url } = existsSync5(join7(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
75091
75091
  module2.exports.parse = parse;
75092
75092
  module2.exports.parseAsync = parseAsync;
75093
75093
  module2.exports.xxhashBase64Url = xxhashBase64Url;
@@ -111220,7 +111220,7 @@ var require_TransformerError = __commonJS({
111220
111220
  TransformerError2.from = function(method) {
111221
111221
  return function(errors) {
111222
111222
  var body = errors.map(function(e) {
111223
- var subject = e.explore.object === null ? "" : join8(e.explore.object)(e.explore.property);
111223
+ var subject = e.explore.object === null ? "" : join7(e.explore.object)(e.explore.property);
111224
111224
  var type = "".concat(subject.length ? "".concat(subject, ": ") : "").concat(e.name);
111225
111225
  return "- ".concat(type, "\n").concat(e.messages.map(function(msg) {
111226
111226
  return " - ".concat(msg);
@@ -111232,7 +111232,7 @@ var require_TransformerError = __commonJS({
111232
111232
  });
111233
111233
  };
111234
111234
  };
111235
- var join8 = function(object) {
111235
+ var join7 = function(object) {
111236
111236
  return function(key) {
111237
111237
  if (key === null)
111238
111238
  return object.name;
@@ -117312,13 +117312,13 @@ var require_application_object = __commonJS({
117312
117312
  return __assign2(__assign2({ type: "object", properties, nullable: options.purpose === "swagger" ? nullable : void 0, required: required.length ? required : void 0, description: obj.description }, options.surplus ? { "x-typia-jsDocTags": obj.jsDocTags } : {}), options.purpose === "ajv" ? extraProps : options.surplus ? {
117313
117313
  "x-typia-additionalProperties": extraProps.additionalProperties,
117314
117314
  "x-typia-patternProperties": extraProps.patternProperties,
117315
- additionalProperties: join8(options)(components)(extraMeta)
117315
+ additionalProperties: join7(options)(components)(extraMeta)
117316
117316
  } : {});
117317
117317
  };
117318
117318
  };
117319
117319
  };
117320
117320
  };
117321
- var join8 = function(options) {
117321
+ var join7 = function(options) {
117322
117322
  return function(components) {
117323
117323
  return function(extra) {
117324
117324
  var _a;
@@ -126381,7 +126381,7 @@ module.exports = __toCommonJS(workspace_tools_exports);
126381
126381
  // packages/config-tools/src/config-file/get-config-file.ts
126382
126382
  var import_cosmiconfig = __toESM(require_dist(), 1);
126383
126383
  var _static_cache = void 0;
126384
- var getConfigFileName = (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
126384
+ var getConfigFileName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
126385
126385
  var getConfigFile = async (filePath) => {
126386
126386
  if (_static_cache) {
126387
126387
  return _static_cache;
@@ -126509,10 +126509,6 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
126509
126509
  return result;
126510
126510
  }
126511
126511
 
126512
- // packages/config-tools/src/utilities/get-default-config.ts
126513
- var import_node_fs2 = require("node:fs");
126514
- var import_node_path2 = require("node:path");
126515
-
126516
126512
  // node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
126517
126513
  var util;
126518
126514
  (function(util2) {
@@ -130173,51 +130169,6 @@ var DefaultStormConfig = {
130173
130169
  colors: { ...DefaultColorConfig },
130174
130170
  extensions: {}
130175
130171
  };
130176
- var getDefaultConfig = (config = {}, root) => {
130177
- let name = "storm-workspace";
130178
- let namespace = "storm-software";
130179
- let repository = "https://github.com/storm-software/storm-ops";
130180
- let license = DefaultStormConfig.license;
130181
- let homepage = DefaultStormConfig.homepage;
130182
- const workspaceRoot = findWorkspaceRoot(root);
130183
- if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
130184
- const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
130185
- encoding: "utf-8"
130186
- });
130187
- if (file) {
130188
- const packageJson = JSON.parse(file);
130189
- if (packageJson.name) {
130190
- name = packageJson.name;
130191
- }
130192
- if (packageJson.namespace) {
130193
- namespace = packageJson.namespace;
130194
- }
130195
- if (packageJson.repository?.url) {
130196
- repository = packageJson.repository?.url;
130197
- }
130198
- if (packageJson.license) {
130199
- license = packageJson.license;
130200
- }
130201
- if (packageJson.homepage) {
130202
- homepage = packageJson.homepage;
130203
- }
130204
- }
130205
- }
130206
- return StormConfigSchema.parse({
130207
- ...config,
130208
- ...DefaultStormConfig,
130209
- colors: { ...config.colors, ...DefaultColorConfig },
130210
- workspaceRoot,
130211
- name,
130212
- namespace,
130213
- repository,
130214
- license: license ?? DefaultStormConfig.license,
130215
- homepage: homepage ?? DefaultStormConfig.homepage,
130216
- extensions: {
130217
- ...config.extensions
130218
- }
130219
- });
130220
- };
130221
130172
 
130222
130173
  // packages/config-tools/src/utilities/get-log-level.ts
130223
130174
  var getLogLevel = (label) => {
@@ -130619,26 +130570,15 @@ var getConfigEnv = () => {
130619
130570
 
130620
130571
  // packages/config-tools/src/create-storm-config.ts
130621
130572
  var loadStormConfig = async (workspaceRoot) => {
130622
- let config = {};
130623
130573
  let _workspaceRoot = workspaceRoot;
130624
130574
  if (!_workspaceRoot) {
130625
130575
  _workspaceRoot = findWorkspaceRoot();
130626
130576
  }
130627
- const configFile = await getDefaultConfig(
130628
- {
130629
- ...await getConfigFile(_workspaceRoot),
130630
- ...getConfigEnv()
130631
- },
130632
- _workspaceRoot
130633
- );
130634
- if (configFile) {
130635
- config = StormConfigSchema.parse(configFile);
130636
- } else {
130637
- writeWarning(
130638
- config,
130639
- "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
130640
- );
130641
- }
130577
+ const configFile = {
130578
+ ...await getConfigFile(_workspaceRoot),
130579
+ ...getConfigEnv()
130580
+ };
130581
+ const config = StormConfigSchema.parse(configFile);
130642
130582
  setConfigEnv(config);
130643
130583
  return config;
130644
130584
  };
@@ -131429,9 +131369,9 @@ ${commentStart} ----------------------------------------------------------------
131429
131369
  };
131430
131370
 
131431
131371
  // packages/workspace-tools/src/executors/tsup/executor.ts
131432
- var import_node_fs3 = require("node:fs");
131372
+ var import_node_fs2 = require("node:fs");
131433
131373
  var import_promises2 = require("node:fs/promises");
131434
- var import_node_path4 = require("node:path");
131374
+ var import_node_path3 = require("node:path");
131435
131375
  var import_esbuild_decorators = __toESM(require_src2());
131436
131376
  var import_devkit3 = __toESM(require_devkit());
131437
131377
  var import_js2 = __toESM(require_src());
@@ -137663,13 +137603,13 @@ var import_tsup = __toESM(require_dist6());
137663
137603
  var ts = __toESM(require("typescript"));
137664
137604
 
137665
137605
  // packages/workspace-tools/src/utils/file-path-utils.ts
137666
- var import_node_path3 = require("node:path");
137606
+ var import_node_path2 = require("node:path");
137667
137607
  var removeExtension = (filePath) => {
137668
137608
  return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
137669
137609
  };
137670
137610
  function findFileName(filePath) {
137671
137611
  return filePath?.split(
137672
- filePath?.includes(import_node_path3.sep) ? import_node_path3.sep : filePath?.includes("/") ? "/" : "\\"
137612
+ filePath?.includes(import_node_path2.sep) ? import_node_path2.sep : filePath?.includes("/") ? "/" : "\\"
137673
137613
  )?.pop() ?? "";
137674
137614
  }
137675
137615
 
@@ -137795,9 +137735,9 @@ ${Object.keys(options).map(
137795
137735
  if (!result.success) {
137796
137736
  throw new Error("The Build process failed trying to copy assets");
137797
137737
  }
137798
- const pathToPackageJson = (0, import_node_path4.join)(context.root, projectRoot, "package.json");
137738
+ const pathToPackageJson = (0, import_node_path3.join)(context.root, projectRoot, "package.json");
137799
137739
  const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit3.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
137800
- const workspacePackageJson = (0, import_devkit3.readJsonFile)((0, import_node_path4.join)(workspaceRoot, "package.json"));
137740
+ const workspacePackageJson = (0, import_devkit3.readJsonFile)((0, import_node_path3.join)(workspaceRoot, "package.json"));
137801
137741
  options.external = options.external || [];
137802
137742
  if (workspacePackageJson?.dependencies) {
137803
137743
  options.external = Object.keys(workspacePackageJson?.dependencies).reduce(
@@ -137835,9 +137775,7 @@ ${Object.keys(options).map(
137835
137775
  }
137836
137776
  if (implicitDependencies && implicitDependencies.length > 0) {
137837
137777
  options.external = implicitDependencies.reduce((ret, key) => {
137838
- if (getLogLevel(config?.logLevel) >= LogLevel.DEBUG) {
137839
- writeDebug(config, `\u26A1 Adding implicit dependency: ${key}`);
137840
- }
137778
+ writeDebug(config, `\u26A1 Adding implicit dependency: ${key}`);
137841
137779
  const projectConfig = projectConfigs[key];
137842
137780
  if (projectConfig?.targets?.build) {
137843
137781
  const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
@@ -137958,11 +137896,11 @@ ${externalDependencies.map((dep) => {
137958
137896
  },
137959
137897
  ...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
137960
137898
  [removeExtension(entryPoint).replace(sourceRoot, "")]: {
137961
- types: (0, import_node_path4.join)(
137899
+ types: (0, import_node_path3.join)(
137962
137900
  `./${distPaths[0]}`,
137963
137901
  `${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
137964
137902
  ),
137965
- default: (0, import_node_path4.join)(
137903
+ default: (0, import_node_path3.join)(
137966
137904
  `./${distPaths[0]}`,
137967
137905
  `${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
137968
137906
  )
@@ -138008,7 +137946,7 @@ ${externalDependencies.map((dep) => {
138008
137946
  if (distSrc.startsWith("/")) {
138009
137947
  distSrc = distSrc.substring(1);
138010
137948
  }
138011
- packageJson.source ??= `${(0, import_node_path4.join)(distSrc, "index.ts").replaceAll("\\", "/")}`;
137949
+ packageJson.source ??= `${(0, import_node_path3.join)(distSrc, "index.ts").replaceAll("\\", "/")}`;
138012
137950
  }
138013
137951
  packageJson.sideEffects ??= false;
138014
137952
  packageJson.files ??= ["dist/**/*"];
@@ -138026,10 +137964,10 @@ ${externalDependencies.map((dep) => {
138026
137964
  packageJson.license ??= workspacePackageJson.license;
138027
137965
  packageJson.keywords ??= workspacePackageJson.keywords;
138028
137966
  packageJson.repository ??= workspacePackageJson.repository;
138029
- packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_node_path4.join)("packages", context.projectName);
138030
- const packageJsonPath = (0, import_node_path4.join)(context.root, options.outputPath, "package.json");
137967
+ packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_node_path3.join)("packages", context.projectName);
137968
+ const packageJsonPath = (0, import_node_path3.join)(context.root, options.outputPath, "package.json");
138031
137969
  writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
138032
- (0, import_node_fs3.writeFileSync)(
137970
+ (0, import_node_fs2.writeFileSync)(
138033
137971
  packageJsonPath,
138034
137972
  await (0, import_prettier.format)(JSON.stringify(packageJson), {
138035
137973
  ...prettierOptions,
@@ -138053,7 +137991,7 @@ ${externalDependencies.map((dep) => {
138053
137991
  await (0, import_prettier.format)(
138054
137992
  `${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
138055
137993
 
138056
- ${(0, import_node_fs3.readFileSync)(file, "utf-8")}`,
137994
+ ${(0, import_node_fs2.readFileSync)(file, "utf-8")}`,
138057
137995
  {
138058
137996
  ...prettierOptions,
138059
137997
  parser: "typescript"
@@ -138158,11 +138096,11 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138158
138096
  emitDeclarationOnly: true,
138159
138097
  declaration: true,
138160
138098
  declarationMap: true,
138161
- declarationDir: (0, import_node_path4.join)(workspaceRoot, "tmp", ".tsup", "declaration")
138099
+ declarationDir: (0, import_node_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
138162
138100
  }
138163
138101
  },
138164
138102
  ts.sys,
138165
- (0, import_node_path4.dirname)(options.tsConfig)
138103
+ (0, import_node_path3.dirname)(options.tsConfig)
138166
138104
  );
138167
138105
  tsConfig.options.pathsBasePath = workspaceRoot;
138168
138106
  if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
@@ -139840,12 +139778,12 @@ var generator_default3 = withRunGenerator(
139840
139778
  );
139841
139779
 
139842
139780
  // packages/workspace-tools/src/utils/find-cache-dir.ts
139843
- var import_node_fs4 = require("node:fs");
139844
- var import_node_path5 = require("node:path");
139781
+ var import_node_fs3 = require("node:fs");
139782
+ var import_node_path4 = require("node:path");
139845
139783
  var import_node_process = require("node:process");
139846
139784
  var isWritable2 = (path3) => {
139847
139785
  try {
139848
- (0, import_node_fs4.accessSync)(path3, import_node_fs4.constants.W_OK);
139786
+ (0, import_node_fs3.accessSync)(path3, import_node_fs3.constants.W_OK);
139849
139787
  return true;
139850
139788
  } catch {
139851
139789
  return false;
@@ -139853,13 +139791,13 @@ var isWritable2 = (path3) => {
139853
139791
  };
139854
139792
  function useDirectory(directory, { create = true }) {
139855
139793
  if (create) {
139856
- (0, import_node_fs4.mkdirSync)(directory, { recursive: true });
139794
+ (0, import_node_fs3.mkdirSync)(directory, { recursive: true });
139857
139795
  }
139858
139796
  return directory;
139859
139797
  }
139860
139798
  function getNodeModuleDirectory(workspaceRoot) {
139861
- const nodeModules = (0, import_node_path5.join)(workspaceRoot, "node_modules");
139862
- if ((0, import_node_fs4.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
139799
+ const nodeModules = (0, import_node_path4.join)(workspaceRoot, "node_modules");
139800
+ if ((0, import_node_fs3.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
139863
139801
  throw new Error("Cannot write to node_modules directory");
139864
139802
  }
139865
139803
  return nodeModules;
@@ -139875,10 +139813,10 @@ function findCacheDirectory({
139875
139813
  create: true
139876
139814
  }) {
139877
139815
  if (import_node_process.env.CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.CACHE_DIR)) {
139878
- return useDirectory((0, import_node_path5.join)(import_node_process.env.CACHE_DIR, name, cacheName), { create });
139816
+ return useDirectory((0, import_node_path4.join)(import_node_process.env.CACHE_DIR, name, cacheName), { create });
139879
139817
  }
139880
139818
  if (import_node_process.env.STORM_CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.STORM_CACHE_DIR)) {
139881
- return useDirectory((0, import_node_path5.join)(import_node_process.env.STORM_CACHE_DIR, name, cacheName), {
139819
+ return useDirectory((0, import_node_path4.join)(import_node_process.env.STORM_CACHE_DIR, name, cacheName), {
139882
139820
  create
139883
139821
  });
139884
139822
  }
@@ -139887,14 +139825,14 @@ function findCacheDirectory({
139887
139825
  throw new Error("Cannot find node_modules directory");
139888
139826
  }
139889
139827
  return useDirectory(
139890
- (0, import_node_path5.join)(workspaceRoot, "node_modules", ".cache", name, cacheName),
139828
+ (0, import_node_path4.join)(workspaceRoot, "node_modules", ".cache", name, cacheName),
139891
139829
  { create }
139892
139830
  );
139893
139831
  }
139894
139832
 
139895
139833
  // packages/workspace-tools/src/utils/workspace-storage.ts
139896
- var import_node_fs5 = require("node:fs");
139897
- var import_node_path6 = require("node:path");
139834
+ var import_node_fs4 = require("node:fs");
139835
+ var import_node_path5 = require("node:path");
139898
139836
  var WorkspaceStorage = class {
139899
139837
  constructor({
139900
139838
  cacheName,
@@ -139914,9 +139852,9 @@ var WorkspaceStorage = class {
139914
139852
  * @returns The value of the key
139915
139853
  */
139916
139854
  getItem(key) {
139917
- const cacheFile = (0, import_node_path6.join)(this.cacheDir, key);
139918
- if ((0, import_node_fs5.existsSync)(cacheFile)) {
139919
- return (0, import_node_fs5.readFileSync)(cacheFile, "utf-8");
139855
+ const cacheFile = (0, import_node_path5.join)(this.cacheDir, key);
139856
+ if ((0, import_node_fs4.existsSync)(cacheFile)) {
139857
+ return (0, import_node_fs4.readFileSync)(cacheFile, "utf-8");
139920
139858
  }
139921
139859
  return void 0;
139922
139860
  }
@@ -139927,7 +139865,7 @@ var WorkspaceStorage = class {
139927
139865
  * @param value - The value to set
139928
139866
  */
139929
139867
  setItem(key, value) {
139930
- (0, import_node_fs5.writeFileSync)((0, import_node_path6.join)(this.cacheDir, key), value, { encoding: "utf-8" });
139868
+ (0, import_node_fs4.writeFileSync)((0, import_node_path5.join)(this.cacheDir, key), value, { encoding: "utf-8" });
139931
139869
  }
139932
139870
  /**
139933
139871
  * Remove item from cache
@@ -139935,14 +139873,14 @@ var WorkspaceStorage = class {
139935
139873
  * @param key - The key to remove
139936
139874
  */
139937
139875
  removeItem(key) {
139938
- (0, import_node_fs5.rmSync)((0, import_node_path6.join)(this.cacheDir, key), { force: true, recursive: true });
139876
+ (0, import_node_fs4.rmSync)((0, import_node_path5.join)(this.cacheDir, key), { force: true, recursive: true });
139939
139877
  }
139940
139878
  /**
139941
139879
  * Clear the cache
139942
139880
  */
139943
139881
  clear() {
139944
- (0, import_node_fs5.readdirSync)(this.cacheDir).forEach((cacheFile) => {
139945
- (0, import_node_fs5.rmSync)(cacheFile, { force: true, recursive: true });
139882
+ (0, import_node_fs4.readdirSync)(this.cacheDir).forEach((cacheFile) => {
139883
+ (0, import_node_fs4.rmSync)(cacheFile, { force: true, recursive: true });
139946
139884
  });
139947
139885
  }
139948
139886
  /**
@@ -139952,7 +139890,7 @@ var WorkspaceStorage = class {
139952
139890
  * @returns The key at the index
139953
139891
  */
139954
139892
  key(index) {
139955
- const files = (0, import_node_fs5.readdirSync)(this.cacheDir);
139893
+ const files = (0, import_node_fs4.readdirSync)(this.cacheDir);
139956
139894
  if (index < files.length && index >= 0) {
139957
139895
  return files[index];
139958
139896
  }