@ronin/compiler 0.9.0-leo-ron-1083-experimental-202 → 0.9.0-leo-ron-1083-experimental-203

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 +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20,6 +20,12 @@ var RONIN_MODEL_FIELD_REGEX = new RegExp(
20
20
  `${RONIN_MODEL_SYMBOLS.FIELD}[_a-zA-Z0-9]+`,
21
21
  "g"
22
22
  );
23
+ var MODEL_ENTITY_ERROR_CODES = {
24
+ field: "FIELD_NOT_FOUND",
25
+ index: "INDEX_NOT_FOUND",
26
+ trigger: "TRIGGER_NOT_FOUND",
27
+ preset: "PRESET_NOT_FOUND"
28
+ };
23
29
  var RoninError = class extends Error {
24
30
  code;
25
31
  field;
@@ -837,12 +843,7 @@ var transformMetaQuery = (models, dependencyStatements, statementParams, query)
837
843
  if ((action === "alter" || action === "drop") && (typeof targetEntityIndex === "undefined" || targetEntityIndex === -1)) {
838
844
  throw new RoninError({
839
845
  message: `No ${entity} with slug "${slug}" defined in model "${existingModel.name}".`,
840
- code: {
841
- field: "FIELD_NOT_FOUND",
842
- index: "INDEX_NOT_FOUND",
843
- trigger: "TRIGGER_NOT_FOUND",
844
- preset: "PRESET_NOT_FOUND"
845
- }[entity]
846
+ code: MODEL_ENTITY_ERROR_CODES[entity]
846
847
  });
847
848
  }
848
849
  let json;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.9.0-leo-ron-1083-experimental-202",
3
+ "version": "0.9.0-leo-ron-1083-experimental-203",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {