@udixio/theme 1.0.0-beta.30 → 1.0.0-beta.31

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": "@udixio/theme",
3
- "version": "1.0.0-beta.30",
3
+ "version": "1.0.0-beta.31",
4
4
  "license": "MIT",
5
5
  "author": "vigreux-joël",
6
6
  "exports": {
@@ -1,10 +1,8 @@
1
1
  import { ConfigInterface } from './config.interface';
2
2
 
3
- import { resolve } from 'node:path';
4
3
  import { defaultColors } from '../color';
5
4
  import { VariantModel } from '../theme';
6
5
  import { AppService } from '../app.service';
7
- import { existsSync } from 'node:fs';
8
6
 
9
7
  export function defineConfig(configObject: ConfigInterface): ConfigInterface {
10
8
  if (!configObject || typeof configObject !== 'object') {
@@ -68,13 +66,18 @@ export class ConfigService {
68
66
  process.release &&
69
67
  process.release.name === 'node'
70
68
  ) {
71
- const base = resolve(this.configPath);
69
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
70
+ const path = require('path');
71
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
72
+ const fs = require('fs');
73
+
74
+ const base = path.resolve(this.configPath);
72
75
  const extensions = ['.js', '.ts', '.jms', '.jcs'];
73
76
  let configImport = null;
74
77
 
75
78
  for (const ext of extensions) {
76
79
  const path = base + ext;
77
- if (existsSync(path)) {
80
+ if (fs.existsSync(path)) {
78
81
  configImport = require(path);
79
82
  break;
80
83
  }