@yumerijs/loader 2.2.0 → 3.0.0-alpha.1

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 (2) hide show
  1. package/dist/index.js +6 -7
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -147,7 +147,8 @@ export class PluginLoader {
147
147
  try {
148
148
  const rendererPackageMap = {
149
149
  'vue': '@yumerijs/vue-renderer',
150
- 'react': '@yumerijs/react-renderer'
150
+ 'react': '@yumerijs/react-renderer',
151
+ 'ejs': '@yumerijs/ejs-renderer'
151
152
  };
152
153
  const rendererPackageName = rendererPackageMap[rendererName] || rendererName;
153
154
  this.logger.info(`Loading renderer package: "${rendererPackageName}"...`);
@@ -170,11 +171,6 @@ export class PluginLoader {
170
171
  return false;
171
172
  }
172
173
  this.plugins[pluginName] = pluginInstance;
173
- const depend = pluginInstance.depend || [];
174
- let injections = {};
175
- for (const injection of depend) {
176
- injections[injection] = this.core.getComponent(injection);
177
- }
178
174
  // ### NEW CONFIG LOGIC ###
179
175
  const rawConfig = (this.config.plugins && this.config.plugins[pluginName]) || {};
180
176
  const schema = pluginInstance.config; // The schema is exported as 'config'
@@ -182,7 +178,10 @@ export class PluginLoader {
182
178
  // Update the in-memory config with the fully resolved one
183
179
  this.config.plugins[pluginName] = finalConfig;
184
180
  // ### END NEW CONFIG LOGIC ###
185
- const context = this.getContext(pluginName, injections);
181
+ const context = this.getContext(pluginName, {});
182
+ if (pluginInstance.render) {
183
+ context.renderer = this.core.renderers.get(pluginInstance.render || '');
184
+ }
186
185
  await this.core.plugin(pluginInstance, context, finalConfig);
187
186
  this.pluginStatus[pluginName] = "enabled" /* PluginStatus.ENABLED */;
188
187
  if (triggerPendingCheck) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yumerijs/loader",
3
- "version": "2.2.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "description": "Module loader for yumeri",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "devDependencies": {
30
30
  "@types/js-yaml": "^4.0.9",
31
31
  "@types/node": "^22.13.10",
32
- "@yumerijs/core": "^2.0.1",
32
+ "@yumerijs/core": "^3.0.0-alpha.1",
33
33
  "esbuild-register": "^3.6.0",
34
34
  "typescript": "^5.8.2"
35
35
  },
@@ -41,6 +41,6 @@
41
41
  "js-yaml": "^4.1.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@yumerijs/core": "^2.2.0"
44
+ "@yumerijs/core": "^3.0.0-alpha.1"
45
45
  }
46
46
  }