stonyx 0.2.3-beta.62 → 0.2.3-beta.64

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/dist/modules.js CHANGED
@@ -77,7 +77,7 @@ export default async function loadModules(config, rootPath, chronicle) {
77
77
  }
78
78
  catch (error) {
79
79
  console.error(error);
80
- throw new Error(`Stonyx modules with async loading must have a config/environment.{ts,js} file with default configurations. Module "${moduleName}" failed to load.`);
80
+ throw new Error(`Stonyx modules with async loading must have a config/environment.js file with default configurations. Module "${moduleName}" failed to load.`);
81
81
  }
82
82
  }
83
83
  // Wait until all modules are initialized
@@ -1,15 +1,10 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { pathToFileURL } from 'url';
3
- const EXTENSIONS = ['ts', 'js'];
4
3
  export async function importConfig(basePath) {
5
- const matches = EXTENSIONS.filter(ext => existsSync(`${basePath}.${ext}`));
6
- if (matches.length === 0) {
7
- throw new Error(`Config not found: ${basePath}.{ts,js}`);
4
+ const path = `${basePath}.js`;
5
+ if (!existsSync(path)) {
6
+ throw new Error(`Config not found: ${path}`);
8
7
  }
9
- if (matches.length > 1) {
10
- console.warn(`Warning: both ${basePath}.ts and ${basePath}.js exist. Using .ts — delete the .js to silence this warning (it is likely a stale compiled artifact or postinstall stub).`);
11
- }
12
- const ext = matches[0];
13
- const mod = await import(pathToFileURL(`${basePath}.${ext}`).href);
8
+ const mod = await import(pathToFileURL(path).href);
14
9
  return mod.default;
15
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stonyx",
3
- "version": "0.2.3-beta.62",
3
+ "version": "0.2.3-beta.64",
4
4
  "description": "Base stonyx framework module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",