@malloydata/malloy 0.0.365 → 0.0.367
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/api/foundation/config.d.ts +9 -0
- package/dist/api/foundation/config.js +208 -25
- package/dist/connection/registry.d.ts +1 -1
- package/dist/connection/registry.js +2 -1
- package/dist/lang/ast/statements/define-source.js +5 -3
- package/dist/model/malloy_types.d.ts +1 -0
- package/dist/model/persist_utils.d.ts +8 -0
- package/dist/model/persist_utils.js +1 -0
- package/dist/model/query_query.js +2 -2
- package/dist/model/source_def_utils.js +2 -0
- package/dist/model/sql_compiled.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { URLReader } from '../../runtime_types';
|
|
2
2
|
import type { Connection, LookupConnection } from '../../connection/types';
|
|
3
3
|
import type { ConnectionConfigEntry } from '../../connection/registry';
|
|
4
|
+
import type { LogMessage } from '../../lang/parse-log';
|
|
4
5
|
import type { BuildID, BuildManifest, BuildManifestEntry, VirtualMap } from '../../model/malloy_types';
|
|
5
6
|
/**
|
|
6
7
|
* The parsed contents of a malloy-config.json file.
|
|
@@ -93,6 +94,7 @@ export declare class MalloyConfig {
|
|
|
93
94
|
private readonly _urlReader?;
|
|
94
95
|
private readonly _configURL?;
|
|
95
96
|
private _data;
|
|
97
|
+
private _log;
|
|
96
98
|
private _connectionMap;
|
|
97
99
|
private readonly _manifest;
|
|
98
100
|
private _managedLookup;
|
|
@@ -157,4 +159,11 @@ export declare class MalloyConfig {
|
|
|
157
159
|
* The VirtualMap parsed from config, if present.
|
|
158
160
|
*/
|
|
159
161
|
get virtualMap(): VirtualMap | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Errors and warnings from parsing and validating the config.
|
|
164
|
+
* Includes JSON parse errors (severity 'error') and schema validation
|
|
165
|
+
* warnings (severity 'warn') such as unknown keys, unknown connection
|
|
166
|
+
* types, wrong value types, and missing environment variables.
|
|
167
|
+
*/
|
|
168
|
+
get log(): LogMessage[];
|
|
160
169
|
}
|
|
@@ -123,23 +123,12 @@ class Manifest {
|
|
|
123
123
|
}
|
|
124
124
|
// New format: {entries: {...}, strict?: boolean}
|
|
125
125
|
// Old format: {buildId: {tableName}, ...} (flat record, no "entries" key)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
else {
|
|
131
|
-
// Treat as old flat-record format: every key with a tableName is an entry
|
|
132
|
-
entries = {};
|
|
133
|
-
for (const [key, val] of Object.entries(parsed)) {
|
|
134
|
-
if (key !== 'strict' &&
|
|
135
|
-
val &&
|
|
136
|
-
typeof val === 'object' &&
|
|
137
|
-
'tableName' in val) {
|
|
138
|
-
entries[key] = val;
|
|
139
|
-
}
|
|
126
|
+
const rawEntries = isRecord(parsed['entries']) ? parsed['entries'] : parsed;
|
|
127
|
+
for (const [key, val] of Object.entries(rawEntries)) {
|
|
128
|
+
if (key !== 'strict' && isBuildManifestEntry(val)) {
|
|
129
|
+
this._manifest.entries[key] = val;
|
|
140
130
|
}
|
|
141
131
|
}
|
|
142
|
-
Object.assign(this._manifest.entries, entries);
|
|
143
132
|
}
|
|
144
133
|
}
|
|
145
134
|
exports.Manifest = Manifest;
|
|
@@ -163,8 +152,11 @@ exports.Manifest = Manifest;
|
|
|
163
152
|
*/
|
|
164
153
|
class MalloyConfig {
|
|
165
154
|
constructor(urlReaderOrText, configURL) {
|
|
155
|
+
this._log = [];
|
|
166
156
|
if (typeof urlReaderOrText === 'string') {
|
|
167
|
-
|
|
157
|
+
const { config, log } = parseConfigText(urlReaderOrText);
|
|
158
|
+
this._data = config;
|
|
159
|
+
this._log = log;
|
|
168
160
|
this._connectionMap = this._data.connections
|
|
169
161
|
? { ...this._data.connections }
|
|
170
162
|
: undefined;
|
|
@@ -198,7 +190,9 @@ class MalloyConfig {
|
|
|
198
190
|
return;
|
|
199
191
|
const result = await this._urlReader.readURL(new URL(this._configURL));
|
|
200
192
|
const contents = typeof result === 'string' ? result : result.contents;
|
|
201
|
-
|
|
193
|
+
const parsed = parseConfigText(contents);
|
|
194
|
+
this._data = parsed.config;
|
|
195
|
+
this._log = parsed.log;
|
|
202
196
|
this._connectionMap = this._data.connections
|
|
203
197
|
? { ...this._data.connections }
|
|
204
198
|
: undefined;
|
|
@@ -285,22 +279,61 @@ class MalloyConfig {
|
|
|
285
279
|
var _a;
|
|
286
280
|
return (_a = this._data) === null || _a === void 0 ? void 0 : _a.virtualMap;
|
|
287
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Errors and warnings from parsing and validating the config.
|
|
284
|
+
* Includes JSON parse errors (severity 'error') and schema validation
|
|
285
|
+
* warnings (severity 'warn') such as unknown keys, unknown connection
|
|
286
|
+
* types, wrong value types, and missing environment variables.
|
|
287
|
+
*/
|
|
288
|
+
get log() {
|
|
289
|
+
return this._log;
|
|
290
|
+
}
|
|
288
291
|
}
|
|
289
292
|
exports.MalloyConfig = MalloyConfig;
|
|
290
293
|
/**
|
|
291
294
|
* Parse a config JSON string into a MalloyProjectConfig.
|
|
292
295
|
* Invalid connection entries (missing `is`) are silently dropped.
|
|
296
|
+
* Returns the processed config and validation log.
|
|
293
297
|
*/
|
|
294
298
|
function parseConfigText(jsonText) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
299
|
+
let parsed;
|
|
300
|
+
try {
|
|
301
|
+
parsed = JSON.parse(jsonText);
|
|
302
|
+
}
|
|
303
|
+
catch (e) {
|
|
304
|
+
return {
|
|
305
|
+
config: {},
|
|
306
|
+
log: [
|
|
307
|
+
{
|
|
308
|
+
message: `Invalid JSON: ${e instanceof Error ? e.message : String(e)}`,
|
|
309
|
+
severity: 'error',
|
|
310
|
+
code: 'config-validation',
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
if (!isRecord(parsed)) {
|
|
316
|
+
return {
|
|
317
|
+
config: {},
|
|
318
|
+
log: [
|
|
319
|
+
{
|
|
320
|
+
message: 'config is not a JSON object',
|
|
321
|
+
severity: 'error',
|
|
322
|
+
code: 'config-validation',
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
const rawConnections = parsed['connections'];
|
|
328
|
+
const connectionEntries = Object.entries(isRecord(rawConnections) ? rawConnections : {}).filter((entry) => (0, registry_1.isConnectionConfigEntry)(entry[1]));
|
|
329
|
+
const connections = Object.fromEntries(connectionEntries);
|
|
298
330
|
const result = { ...parsed, connections };
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
331
|
+
const virtualMap = parsed['virtualMap'];
|
|
332
|
+
if (virtualMap &&
|
|
333
|
+
typeof virtualMap === 'object' &&
|
|
334
|
+
!Array.isArray(virtualMap)) {
|
|
302
335
|
const outer = new Map();
|
|
303
|
-
for (const [connName, inner] of Object.entries(
|
|
336
|
+
for (const [connName, inner] of Object.entries(virtualMap)) {
|
|
304
337
|
if (inner && typeof inner === 'object' && !Array.isArray(inner)) {
|
|
305
338
|
const innerMap = new Map();
|
|
306
339
|
for (const [virtualName, tablePath] of Object.entries(inner)) {
|
|
@@ -313,6 +346,156 @@ function parseConfigText(jsonText) {
|
|
|
313
346
|
}
|
|
314
347
|
result.virtualMap = outer;
|
|
315
348
|
}
|
|
316
|
-
return result;
|
|
349
|
+
return { config: result, log: validateConfig(parsed) };
|
|
350
|
+
}
|
|
351
|
+
const KNOWN_TOP_LEVEL_KEYS = new Set([
|
|
352
|
+
'connections',
|
|
353
|
+
'manifestPath',
|
|
354
|
+
'virtualMap',
|
|
355
|
+
]);
|
|
356
|
+
function isRecord(value) {
|
|
357
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
358
|
+
}
|
|
359
|
+
function isBuildManifestEntry(value) {
|
|
360
|
+
return isRecord(value) && typeof value['tableName'] === 'string';
|
|
361
|
+
}
|
|
362
|
+
function makeWarning(path, message) {
|
|
363
|
+
return {
|
|
364
|
+
message: `${path}: ${message}`,
|
|
365
|
+
severity: 'warn',
|
|
366
|
+
code: 'config-validation',
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Validate a parsed config object against the connection type registry.
|
|
371
|
+
* Returns LogMessage[] — does not throw.
|
|
372
|
+
*/
|
|
373
|
+
function validateConfig(data) {
|
|
374
|
+
const log = [];
|
|
375
|
+
for (const key of Object.keys(data)) {
|
|
376
|
+
if (!KNOWN_TOP_LEVEL_KEYS.has(key)) {
|
|
377
|
+
const suggestion = closestMatch(key, [...KNOWN_TOP_LEVEL_KEYS]);
|
|
378
|
+
const hint = suggestion ? `. Did you mean "${suggestion}"?` : '';
|
|
379
|
+
log.push(makeWarning(key, `unknown config key "${key}"${hint}`));
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
if (data['manifestPath'] !== undefined &&
|
|
383
|
+
typeof data['manifestPath'] !== 'string') {
|
|
384
|
+
log.push(makeWarning('manifestPath', '"manifestPath" should be a string'));
|
|
385
|
+
}
|
|
386
|
+
const connections = data['connections'];
|
|
387
|
+
if (connections === undefined)
|
|
388
|
+
return log;
|
|
389
|
+
if (!isRecord(connections)) {
|
|
390
|
+
log.push(makeWarning('connections', '"connections" should be an object'));
|
|
391
|
+
return log;
|
|
392
|
+
}
|
|
393
|
+
const registeredTypes = new Set((0, registry_1.getRegisteredConnectionTypes)());
|
|
394
|
+
for (const [name, rawEntry] of Object.entries(connections)) {
|
|
395
|
+
const prefix = `connections.${name}`;
|
|
396
|
+
if (!isRecord(rawEntry)) {
|
|
397
|
+
log.push(makeWarning(prefix, 'should be an object'));
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
if (!rawEntry['is']) {
|
|
401
|
+
log.push(makeWarning(prefix, 'missing required "is" field (connection type)'));
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
if (typeof rawEntry['is'] !== 'string') {
|
|
405
|
+
log.push(makeWarning(`${prefix}.is`, '"is" should be a string'));
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
const typeName = rawEntry['is'];
|
|
409
|
+
if (!registeredTypes.has(typeName)) {
|
|
410
|
+
const suggestion = closestMatch(typeName, [...registeredTypes]);
|
|
411
|
+
const hint = suggestion ? ` Did you mean "${suggestion}"?` : '';
|
|
412
|
+
log.push(makeWarning(`${prefix}.is`, `unknown connection type "${typeName}".${hint} Available types: ${[...registeredTypes].join(', ')}`));
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
415
|
+
const props = (0, registry_1.getConnectionProperties)(typeName);
|
|
416
|
+
if (!props)
|
|
417
|
+
continue;
|
|
418
|
+
const knownProps = new Map(props.map(p => [p.name, p]));
|
|
419
|
+
for (const [key, value] of Object.entries(rawEntry)) {
|
|
420
|
+
if (key === 'is')
|
|
421
|
+
continue;
|
|
422
|
+
const propDef = knownProps.get(key);
|
|
423
|
+
if (!propDef) {
|
|
424
|
+
const suggestion = closestMatch(key, [...knownProps.keys()]);
|
|
425
|
+
const hint = suggestion ? `. Did you mean "${suggestion}"?` : '';
|
|
426
|
+
log.push(makeWarning(`${prefix}.${key}`, `unknown property "${key}" for connection type "${typeName}"${hint}`));
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
// For env var references on non-json props, check the variable exists.
|
|
430
|
+
if (propDef.type !== 'json' && (0, registry_1.isValueRef)(value)) {
|
|
431
|
+
const env = value.env;
|
|
432
|
+
if (process.env[env] === undefined) {
|
|
433
|
+
log.push(makeWarning(`${prefix}.${key}`, `environment variable "${env}" is not set`));
|
|
434
|
+
}
|
|
435
|
+
continue;
|
|
436
|
+
}
|
|
437
|
+
const typeError = checkValueType(value, propDef.type);
|
|
438
|
+
if (typeError) {
|
|
439
|
+
log.push(makeWarning(`${prefix}.${key}`, `${typeError} (expected ${propDef.type})`));
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return log;
|
|
444
|
+
}
|
|
445
|
+
function levenshtein(a, b) {
|
|
446
|
+
const m = a.length;
|
|
447
|
+
const n = b.length;
|
|
448
|
+
const dp = Array.from({ length: m + 1 }, () => Array(n + 1).fill(0));
|
|
449
|
+
for (let i = 0; i <= m; i++)
|
|
450
|
+
dp[i][0] = i;
|
|
451
|
+
for (let j = 0; j <= n; j++)
|
|
452
|
+
dp[0][j] = j;
|
|
453
|
+
for (let i = 1; i <= m; i++) {
|
|
454
|
+
for (let j = 1; j <= n; j++) {
|
|
455
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
456
|
+
dp[i][j] = Math.min(dp[i - 1][j] + 1, dp[i][j - 1] + 1, dp[i - 1][j - 1] + cost);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return dp[m][n];
|
|
460
|
+
}
|
|
461
|
+
function closestMatch(input, candidates) {
|
|
462
|
+
if (candidates.length === 0)
|
|
463
|
+
return undefined;
|
|
464
|
+
let best = candidates[0];
|
|
465
|
+
let bestDist = Infinity;
|
|
466
|
+
for (const c of candidates) {
|
|
467
|
+
const dist = levenshtein(input.toLowerCase(), c.toLowerCase());
|
|
468
|
+
if (dist < bestDist) {
|
|
469
|
+
bestDist = dist;
|
|
470
|
+
best = c;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
const maxDist = Math.max(1, Math.floor(Math.max(input.length, best.length) / 3));
|
|
474
|
+
return bestDist <= maxDist ? best : undefined;
|
|
475
|
+
}
|
|
476
|
+
function checkValueType(value, expectedType) {
|
|
477
|
+
if (value === undefined || value === null)
|
|
478
|
+
return undefined;
|
|
479
|
+
switch (expectedType) {
|
|
480
|
+
case 'number':
|
|
481
|
+
if (typeof value !== 'number')
|
|
482
|
+
return `should be a number, got ${typeof value}`;
|
|
483
|
+
break;
|
|
484
|
+
case 'boolean':
|
|
485
|
+
if (typeof value !== 'boolean')
|
|
486
|
+
return `should be a boolean, got ${typeof value}`;
|
|
487
|
+
break;
|
|
488
|
+
case 'string':
|
|
489
|
+
case 'password':
|
|
490
|
+
case 'secret':
|
|
491
|
+
case 'file':
|
|
492
|
+
case 'text':
|
|
493
|
+
if (typeof value !== 'string')
|
|
494
|
+
return `should be a string, got ${typeof value}`;
|
|
495
|
+
break;
|
|
496
|
+
case 'json':
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
return undefined;
|
|
317
500
|
}
|
|
318
501
|
//# sourceMappingURL=config.js.map
|
|
@@ -48,7 +48,7 @@ export type ConfigValue = string | number | boolean | ValueRef | JsonConfigValue
|
|
|
48
48
|
/**
|
|
49
49
|
* Type guard for ValueRef.
|
|
50
50
|
*/
|
|
51
|
-
export declare function isValueRef(value:
|
|
51
|
+
export declare function isValueRef(value: unknown): value is ValueRef;
|
|
52
52
|
/**
|
|
53
53
|
* Resolve a ValueRef to a string by looking up the environment variable.
|
|
54
54
|
* Returns undefined if the env var is not set.
|
|
@@ -22,7 +22,8 @@ function isValueRef(value) {
|
|
|
22
22
|
value !== null &&
|
|
23
23
|
!Array.isArray(value) &&
|
|
24
24
|
Object.keys(value).length === 1 &&
|
|
25
|
-
'env' in value
|
|
25
|
+
'env' in value &&
|
|
26
|
+
typeof value.env === 'string');
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Resolve a ValueRef to a string by looking up the environment variable.
|
|
@@ -25,6 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.DefineSourceList = exports.DefineSource = void 0;
|
|
26
26
|
const malloy_types_1 = require("../../../model/malloy_types");
|
|
27
27
|
const source_def_utils_1 = require("../../../model/source_def_utils");
|
|
28
|
+
const persist_utils_1 = require("../../../model/persist_utils");
|
|
28
29
|
const error_factory_1 = require("../error-factory");
|
|
29
30
|
const malloy_element_1 = require("../types/malloy-element");
|
|
30
31
|
const noteable_1 = require("../types/noteable");
|
|
@@ -67,14 +68,15 @@ class DefineSource extends malloy_element_1.MalloyElement {
|
|
|
67
68
|
as: this.name,
|
|
68
69
|
location: this.location,
|
|
69
70
|
};
|
|
70
|
-
if ((0, malloy_types_1.isPersistableSourceDef)(entry)) {
|
|
71
|
-
entry.sourceID = (0, source_def_utils_1.mkSourceID)(this.name, (_b = this.location) === null || _b === void 0 ? void 0 : _b.url);
|
|
72
|
-
}
|
|
73
71
|
if (this.note) {
|
|
74
72
|
entry.annotation = structDef.annotation
|
|
75
73
|
? { ...this.note, inherits: structDef.annotation }
|
|
76
74
|
: this.note;
|
|
77
75
|
}
|
|
76
|
+
if ((0, malloy_types_1.isPersistableSourceDef)(entry)) {
|
|
77
|
+
entry.sourceID = (0, source_def_utils_1.mkSourceID)(this.name, (_b = this.location) === null || _b === void 0 ? void 0 : _b.url);
|
|
78
|
+
entry.persistent = (0, persist_utils_1.checkPersistAnnotation)(entry).persist;
|
|
79
|
+
}
|
|
78
80
|
entry.partitionComposite =
|
|
79
81
|
(_d = (0, composite_source_utils_1.getPartitionCompositeDesc)(this.note, structDef, (_c = this.sourceExpr) !== null && _c !== void 0 ? _c : this)) !== null && _d !== void 0 ? _d : structDef.partitionComposite;
|
|
80
82
|
doc.setEntry(this.name, { entry, exported: this.exported });
|
|
@@ -767,6 +767,7 @@ export declare function isSourceRegistryReference(entry: SourceRegistryEntry): e
|
|
|
767
767
|
export interface PersistableSourceProperties {
|
|
768
768
|
sourceID?: SourceID;
|
|
769
769
|
extends?: SourceID;
|
|
770
|
+
persistent?: boolean;
|
|
770
771
|
}
|
|
771
772
|
export interface SQLSourceDef extends SourceDefBase, PersistableSourceProperties {
|
|
772
773
|
type: 'sql_select';
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { ModelDef, SourceDef, Query } from './malloy_types';
|
|
2
2
|
import type { LogMessage } from '../lang';
|
|
3
3
|
import type { BuildNode } from '../api/foundation/types';
|
|
4
|
+
/**
|
|
5
|
+
* Check if a source has the #@ persist annotation.
|
|
6
|
+
* Returns both the persist flag and any tag parse errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkPersistAnnotation(source: SourceDef): {
|
|
9
|
+
persist: boolean;
|
|
10
|
+
log: LogMessage[];
|
|
11
|
+
};
|
|
4
12
|
/**
|
|
5
13
|
* Find persistent dependencies for a source or query, returning a nested DAG.
|
|
6
14
|
*
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.checkPersistAnnotation = checkPersistAnnotation;
|
|
7
8
|
exports.findPersistentDependencies = findPersistentDependencies;
|
|
8
9
|
exports.minimalBuildGraph = minimalBuildGraph;
|
|
9
10
|
const malloy_types_1 = require("./malloy_types");
|
|
@@ -542,8 +542,8 @@ class QueryQuery extends query_node_1.QueryField {
|
|
|
542
542
|
return qs.structDef.pipeSQL;
|
|
543
543
|
case 'query_source': {
|
|
544
544
|
const { buildManifest, connectionDigests } = (_d = qs.prepareResultOptions) !== null && _d !== void 0 ? _d : {};
|
|
545
|
-
// Check manifest for this source
|
|
546
|
-
if (buildManifest && connectionDigests) {
|
|
545
|
+
// Check manifest for this source (only if it was marked persistent at definition time)
|
|
546
|
+
if (buildManifest && connectionDigests && qs.structDef.persistent) {
|
|
547
547
|
const connDigest = (0, malloy_types_1.safeRecordGet)(connectionDigests, qs.structDef.connection);
|
|
548
548
|
if (connDigest) {
|
|
549
549
|
// Compile with empty opts to get manifest-ignorant SQL for BuildID
|
|
@@ -59,6 +59,7 @@ function mkQuerySourceDef(base, query, name) {
|
|
|
59
59
|
// PersistableSourceProperties - explicitly NOT copied
|
|
60
60
|
// sourceID: undefined,
|
|
61
61
|
// extends: undefined,
|
|
62
|
+
// persistent: undefined,
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
@@ -97,6 +98,7 @@ function mkSQLSourceDef(base, selectStr, selectSegments) {
|
|
|
97
98
|
// PersistableSourceProperties - explicitly NOT copied
|
|
98
99
|
// sourceID: undefined,
|
|
99
100
|
// extends: undefined,
|
|
101
|
+
// persistent: undefined,
|
|
100
102
|
};
|
|
101
103
|
}
|
|
102
104
|
/**
|
|
@@ -52,8 +52,8 @@ function expandSegment(segment, opts, quoteTablePath, compileQuery) {
|
|
|
52
52
|
*/
|
|
53
53
|
function expandPersistableSource(source, opts, quoteTablePath, compileQuery) {
|
|
54
54
|
const { buildManifest, connectionDigests } = opts;
|
|
55
|
-
// Try manifest lookup if we have the required info
|
|
56
|
-
if (buildManifest && connectionDigests) {
|
|
55
|
+
// Try manifest lookup if we have the required info (only for persistent sources)
|
|
56
|
+
if (buildManifest && connectionDigests && source.persistent) {
|
|
57
57
|
const connDigest = (0, malloy_types_1.safeRecordGet)(connectionDigests, source.connection);
|
|
58
58
|
if (connDigest) {
|
|
59
59
|
// Get the SQL for this source to compute BuildID (no opts = full SQL)
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MALLOY_VERSION = "0.0.
|
|
1
|
+
export declare const MALLOY_VERSION = "0.0.367";
|
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.
|
|
5
|
+
exports.MALLOY_VERSION = '0.0.367';
|
|
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.
|
|
3
|
+
"version": "0.0.367",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"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"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@malloydata/malloy-filter": "0.0.
|
|
51
|
-
"@malloydata/malloy-interfaces": "0.0.
|
|
52
|
-
"@malloydata/malloy-tag": "0.0.
|
|
50
|
+
"@malloydata/malloy-filter": "0.0.367",
|
|
51
|
+
"@malloydata/malloy-interfaces": "0.0.367",
|
|
52
|
+
"@malloydata/malloy-tag": "0.0.367",
|
|
53
53
|
"@noble/hashes": "^1.8.0",
|
|
54
54
|
"antlr4ts": "^0.5.0-alpha.4",
|
|
55
55
|
"assert": "^2.0.0",
|