@ronin/compiler 0.17.4-corny-ron-1099-experimental-382 → 0.17.4-corny-ron-1099-experimental-384

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/index.d.ts CHANGED
@@ -307,7 +307,7 @@ type ModelTrigger<T extends ModelEntityList<ModelField> = ModelEntityList<ModelF
307
307
  /** When the trigger should fire in the case that a matching query is executed. */
308
308
  when: 'BEFORE' | 'DURING' | 'AFTER';
309
309
  /** A list of queries that should be executed when the trigger fires. */
310
- effects: Array<Query>;
310
+ effects: Array<Record<typeof QUERY_SYMBOLS.QUERY, Query>>;
311
311
  /** A list of field slugs for which the trigger should fire. */
312
312
  fields?: Array<ModelTriggerField<T>>;
313
313
  /**
package/dist/index.js CHANGED
@@ -1987,16 +1987,11 @@ var transformMetaQuery = (models, dependencyStatements, statementParams, query,
1987
1987
  statementParts.push("WHEN", `(${withStatement})`);
1988
1988
  }
1989
1989
  const effectStatements = trigger.effects.map((effectQuery) => {
1990
- return compileQueryInput(
1991
- QUERY_SYMBOLS.QUERY in effectQuery ? effectQuery[QUERY_SYMBOLS.QUERY] : effectQuery,
1992
- models,
1993
- null,
1994
- {
1995
- returning: false,
1996
- parentModel: existingModel,
1997
- inlineDefaults: options.inlineDefaults
1998
- }
1999
- ).main.statement;
1990
+ return compileQueryInput(effectQuery[QUERY_SYMBOLS.QUERY], models, null, {
1991
+ returning: false,
1992
+ parentModel: existingModel,
1993
+ inlineDefaults: options.inlineDefaults
1994
+ }).main.statement;
2000
1995
  });
2001
1996
  statementParts.push("BEGIN");
2002
1997
  statementParts.push(`${effectStatements.join("; ")};`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.17.4-corny-ron-1099-experimental-382",
3
+ "version": "0.17.4-corny-ron-1099-experimental-384",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {