@malloydata/malloy 0.0.372 → 0.0.373
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 +109 -108
- package/dist/api/foundation/config.js +205 -364
- package/dist/api/foundation/config_compile.d.ts +34 -0
- package/dist/api/foundation/config_compile.js +247 -0
- package/dist/api/foundation/config_discover.d.ts +37 -0
- package/dist/api/foundation/config_discover.js +154 -0
- package/dist/api/foundation/config_overlays.d.ts +54 -0
- package/dist/api/foundation/config_overlays.js +51 -0
- package/dist/api/foundation/config_resolve.d.ts +49 -0
- package/dist/api/foundation/config_resolve.js +230 -0
- package/dist/api/foundation/index.d.ts +3 -0
- package/dist/api/foundation/index.js +7 -1
- package/dist/api/foundation/runtime.d.ts +54 -9
- package/dist/api/foundation/runtime.js +98 -14
- package/dist/connection/registry.d.ts +14 -23
- package/dist/connection/registry.js +5 -30
- package/dist/index.d.ts +4 -3
- package/dist/index.js +5 -3
- package/dist/model/malloy_types.d.ts +8 -0
- package/dist/model/query_query.js +4 -1
- package/dist/model/sql_compiled.js +4 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Malloy = exports.Model = exports.MalloyTranslator = exports.malloyToQuery = exports.constantExprToSQL = exports.isDateUnit = exports.isTimestampUnit = exports.composeSQLExpr = exports.indent = exports.expressionIsUngroupedAggregate = exports.expressionIsScalar = exports.expressionIsCalculation = exports.expressionIsAnalytic = exports.expressionIsAggregate = exports.mkFieldDef = exports.mkArrayDef = exports.isBasicArray = exports.isRepeatedRecord = exports.isSamplingRows = exports.isSamplingPercent = exports.isSamplingEnable = exports.isJoinedSource = exports.isJoined = exports.isCompoundArrayData = exports.isBasicAtomic = exports.isAtomic = exports.isSourceDef = exports.TinyParser = exports.Dialect = exports.spread = exports.literal = exports.variadicParam = exports.param = exports.makeParam = exports.sql = exports.maxScalar = exports.minAggregate = exports.anyExprType = exports.minScalar = exports.overload = exports.qtz = exports.arg = exports.registerDialect = exports.DatabricksDialect = exports.MySQLDialect = exports.SnowflakeDialect = exports.PostgresDialect = exports.TrinoDialect = exports.StandardSQLDialect = exports.DuckDBDialect = void 0;
|
|
37
|
-
exports.makeDigest = exports.EMPTY_BUILD_MANIFEST = exports.PersistSource = exports.annotationToTaglines = exports.annotationToTag = exports.sqlKey = exports.API = exports.sourceDefToSourceInfo = exports.modelDefToModelInfo = exports.toAsyncGenerator = exports.
|
|
37
|
+
exports.makeDigest = exports.EMPTY_BUILD_MANIFEST = exports.PersistSource = exports.annotationToTaglines = exports.annotationToTag = exports.sqlKey = exports.API = exports.sourceDefToSourceInfo = exports.modelDefToModelInfo = exports.toAsyncGenerator = exports.createConnectionsFromConfig = exports.getRegisteredConnectionTypes = exports.getConnectionTypeDisplayName = exports.getConnectionProperties = exports.registerConnectionType = exports.discoverConfig = exports.defaultConfigOverlays = exports.contextOverlay = exports.envOverlay = exports.MalloyConfig = exports.Manifest = exports.CacheManager = exports.InMemoryModelCache = exports.Explore = exports.DataWriter = exports.Parse = exports.JSONWriter = exports.CSVWriter = exports.QueryMaterializer = exports.Result = exports.PreparedResult = exports.TimestampTimeframe = exports.DateTimeframe = exports.SourceRelationship = exports.JoinRelationship = exports.MalloyError = exports.FixedConnectionMap = exports.InMemoryURLReader = exports.EmptyURLReader = exports.SingleConnectionRuntime = exports.ConnectionRuntime = exports.AtomicFieldType = exports.Runtime = void 0;
|
|
38
38
|
/*
|
|
39
39
|
* Copyright 2023 Google LLC
|
|
40
40
|
*
|
|
@@ -138,14 +138,16 @@ Object.defineProperty(exports, "InMemoryModelCache", { enumerable: true, get: fu
|
|
|
138
138
|
Object.defineProperty(exports, "CacheManager", { enumerable: true, get: function () { return foundation_1.CacheManager; } });
|
|
139
139
|
Object.defineProperty(exports, "Manifest", { enumerable: true, get: function () { return foundation_1.Manifest; } });
|
|
140
140
|
Object.defineProperty(exports, "MalloyConfig", { enumerable: true, get: function () { return foundation_1.MalloyConfig; } });
|
|
141
|
+
Object.defineProperty(exports, "envOverlay", { enumerable: true, get: function () { return foundation_1.envOverlay; } });
|
|
142
|
+
Object.defineProperty(exports, "contextOverlay", { enumerable: true, get: function () { return foundation_1.contextOverlay; } });
|
|
143
|
+
Object.defineProperty(exports, "defaultConfigOverlays", { enumerable: true, get: function () { return foundation_1.defaultConfigOverlays; } });
|
|
144
|
+
Object.defineProperty(exports, "discoverConfig", { enumerable: true, get: function () { return foundation_1.discoverConfig; } });
|
|
141
145
|
var registry_1 = require("./connection/registry");
|
|
142
146
|
Object.defineProperty(exports, "registerConnectionType", { enumerable: true, get: function () { return registry_1.registerConnectionType; } });
|
|
143
147
|
Object.defineProperty(exports, "getConnectionProperties", { enumerable: true, get: function () { return registry_1.getConnectionProperties; } });
|
|
144
148
|
Object.defineProperty(exports, "getConnectionTypeDisplayName", { enumerable: true, get: function () { return registry_1.getConnectionTypeDisplayName; } });
|
|
145
149
|
Object.defineProperty(exports, "getRegisteredConnectionTypes", { enumerable: true, get: function () { return registry_1.getRegisteredConnectionTypes; } });
|
|
146
150
|
Object.defineProperty(exports, "createConnectionsFromConfig", { enumerable: true, get: function () { return registry_1.createConnectionsFromConfig; } });
|
|
147
|
-
Object.defineProperty(exports, "isValueRef", { enumerable: true, get: function () { return registry_1.isValueRef; } });
|
|
148
|
-
Object.defineProperty(exports, "resolveValue", { enumerable: true, get: function () { return registry_1.resolveValue; } });
|
|
149
151
|
var connection_utils_1 = require("./connection_utils");
|
|
150
152
|
Object.defineProperty(exports, "toAsyncGenerator", { enumerable: true, get: function () { return connection_utils_1.toAsyncGenerator; } });
|
|
151
153
|
var to_stable_1 = require("./to_stable");
|
|
@@ -1150,9 +1150,17 @@ export interface BuildManifestEntry {
|
|
|
1150
1150
|
*
|
|
1151
1151
|
* When `strict` is true, a missing entry for a persist source throws an error
|
|
1152
1152
|
* instead of falling through to inline SQL.
|
|
1153
|
+
*
|
|
1154
|
+
* `loadError` is set by Runtime's auto-read path when the manifest file was
|
|
1155
|
+
* present but unreadable or unparseable. In that case `entries` is `{}` so
|
|
1156
|
+
* non-strict compiles still soft-fall-through to inline SQL, but strict
|
|
1157
|
+
* compiles can surface the underlying load error in their "not found in
|
|
1158
|
+
* manifest" message — telling the user *why* every entry is missing instead
|
|
1159
|
+
* of just *that* it is.
|
|
1153
1160
|
*/
|
|
1154
1161
|
export interface BuildManifest {
|
|
1155
1162
|
entries: Record<BuildID, BuildManifestEntry>;
|
|
1156
1163
|
strict?: boolean;
|
|
1164
|
+
loadError?: string;
|
|
1157
1165
|
}
|
|
1158
1166
|
export {};
|
|
@@ -555,7 +555,10 @@ class QueryQuery extends query_node_1.QueryField {
|
|
|
555
555
|
return this.parent.dialect.quoteTablePath(entry.tableName);
|
|
556
556
|
}
|
|
557
557
|
if (buildManifest.strict) {
|
|
558
|
-
|
|
558
|
+
const base = `Persist source '${qs.structDef.sourceID}' not found in manifest (buildId: ${buildId})`;
|
|
559
|
+
throw new Error(buildManifest.loadError
|
|
560
|
+
? `${base}\n ${buildManifest.loadError}`
|
|
561
|
+
: base);
|
|
559
562
|
}
|
|
560
563
|
}
|
|
561
564
|
}
|
|
@@ -66,7 +66,10 @@ function expandPersistableSource(source, opts, quoteTablePath, compileQuery) {
|
|
|
66
66
|
}
|
|
67
67
|
// Not in manifest
|
|
68
68
|
if (buildManifest.strict) {
|
|
69
|
-
|
|
69
|
+
const base = `Persist source '${source.sourceID}' not found in manifest (buildId: ${buildId})`;
|
|
70
|
+
throw new Error(buildManifest.loadError
|
|
71
|
+
? `${base}\n ${buildManifest.loadError}`
|
|
72
|
+
: base);
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
75
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MALLOY_VERSION = "0.0.
|
|
1
|
+
export declare const MALLOY_VERSION = "0.0.373";
|
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.373';
|
|
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.373",
|
|
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.373",
|
|
51
|
+
"@malloydata/malloy-interfaces": "0.0.373",
|
|
52
|
+
"@malloydata/malloy-tag": "0.0.373",
|
|
53
53
|
"@noble/hashes": "^1.8.0",
|
|
54
54
|
"antlr4ts": "^0.5.0-alpha.4",
|
|
55
55
|
"assert": "^2.0.0",
|