@malloydata/malloy 0.0.322 → 0.0.323

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.
@@ -122,7 +122,7 @@ export interface NowNode extends ExprLeaf {
122
122
  type: 'timestamp';
123
123
  };
124
124
  }
125
- interface HasTimeValue {
125
+ export interface HasTimeValue {
126
126
  typeDef: TemporalTypeDef;
127
127
  }
128
128
  export type TimeExpr = Expr & HasTimeValue;
@@ -298,30 +298,42 @@ export interface DocumentLocation {
298
298
  url: string;
299
299
  range: DocumentRange;
300
300
  }
301
+ /**
302
+ * Used by the IDE to get information about what a reference refers to. Was once the
303
+ * entire definition, which created very large model files where the definition
304
+ * of an object would be repeated N+1 times, where N is the number of references.
305
+ *
306
+ * The IDE currently only uses these three fields, so as a stop-gap measure we
307
+ * create a LightweightDefinition with just these three fields.
308
+ *
309
+ * I believe there are future plans for the IDE to need more information about
310
+ * the references, and in that case, this should include something like an
311
+ * index or pointer to the full definition elsewhere in the model.
312
+ */
313
+ export interface LightweightDefinition {
314
+ type: string;
315
+ annotation?: Annotation;
316
+ location?: DocumentLocation;
317
+ }
301
318
  interface DocumentReferenceBase {
302
319
  text: string;
303
320
  location: DocumentLocation;
304
- definition: HasLocation;
321
+ definition: LightweightDefinition;
305
322
  }
306
323
  export interface DocumentExploreReference extends DocumentReferenceBase {
307
324
  type: 'exploreReference';
308
- definition: StructDef;
309
325
  }
310
326
  export interface DocumentJoinReference extends DocumentReferenceBase {
311
327
  type: 'joinReference';
312
- definition: FieldDef;
313
328
  }
314
329
  export interface DocumentSQLBlockReference extends DocumentReferenceBase {
315
330
  type: 'sqlBlockReference';
316
- definition: SQLSourceDef;
317
331
  }
318
332
  export interface DocumentQueryReference extends DocumentReferenceBase {
319
333
  type: 'queryReference';
320
- definition: Query;
321
334
  }
322
335
  export interface DocumentFieldReference extends DocumentReferenceBase {
323
336
  type: 'fieldReference';
324
- definition: FieldDef;
325
337
  }
326
338
  export type DocumentReference = DocumentExploreReference | DocumentQueryReference | DocumentSQLBlockReference | DocumentFieldReference | DocumentJoinReference;
327
339
  /** put location into the parse tree. */
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MALLOY_VERSION = "0.0.322";
1
+ export declare const MALLOY_VERSION = "0.0.323";
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MALLOY_VERSION = void 0;
4
4
  // generated with 'generate-version-file' script; do not edit manually
5
- exports.MALLOY_VERSION = '0.0.322';
5
+ exports.MALLOY_VERSION = '0.0.323';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.322",
3
+ "version": "0.0.323",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -41,9 +41,9 @@
41
41
  "generate-version-file": "VERSION=$(npm pkg get version --workspaces=false | tr -d \\\")\necho \"// generated with 'generate-version-file' script; do not edit manually\\nexport const MALLOY_VERSION = '$VERSION';\" > src/version.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@malloydata/malloy-filter": "0.0.322",
45
- "@malloydata/malloy-interfaces": "0.0.322",
46
- "@malloydata/malloy-tag": "0.0.322",
44
+ "@malloydata/malloy-filter": "0.0.323",
45
+ "@malloydata/malloy-interfaces": "0.0.323",
46
+ "@malloydata/malloy-tag": "0.0.323",
47
47
  "antlr4ts": "^0.5.0-alpha.4",
48
48
  "assert": "^2.0.0",
49
49
  "jaro-winkler": "^0.2.8",