@fluffjs/cli 0.3.2 → 0.3.3

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.
@@ -295,9 +295,19 @@ export default function reactivePlugin() {
295
295
  if (args.length === 0)
296
296
  continue;
297
297
  const [optionsArg] = args;
298
- if (!t.isObjectExpression(optionsArg))
298
+ let optionsObject = t.isObjectExpression(optionsArg) ? optionsArg : undefined;
299
+ if (t.isIdentifier(optionsArg)) {
300
+ const binding = path.scope.getBinding(optionsArg.name);
301
+ if (binding?.path.isVariableDeclarator()) {
302
+ const { init } = binding.path.node;
303
+ if (t.isObjectExpression(init)) {
304
+ optionsObject = init;
305
+ }
306
+ }
307
+ }
308
+ if (!optionsObject)
299
309
  continue;
300
- for (const prop of optionsArg.properties) {
310
+ for (const prop of optionsObject.properties) {
301
311
  if (!t.isObjectProperty(prop))
302
312
  continue;
303
313
  if (prop.computed || !t.isIdentifier(prop.key))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluffjs/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",