@malloy-publisher/server 0.10.5 → 0.10.6
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/admin-api-doc.yaml +4 -1
- package/dist/instrumentation.mjs +1 -1
- package/dist/server.mjs +26 -24
- package/package.json +1 -1
- package/dist/cpufeatures-gknxfsk5.node +0 -0
package/dist/admin-api-doc.yaml
CHANGED
|
@@ -234,7 +234,10 @@ paths:
|
|
|
234
234
|
the bytes are rewritten as the catalog's own Parquet, never registered
|
|
235
235
|
in place and never left as rows in the catalog database, so an
|
|
236
236
|
encrypted catalog stays encrypted. One DuckLake transaction:
|
|
237
|
-
a reader sees the old table or the new one.
|
|
237
|
+
a reader sees the old table or the new one. A file the reader refuses
|
|
238
|
+
(not the format it claims, a value it cannot convert) is `400
|
|
239
|
+
INVALID_REQUEST` carrying the reader's own message, with the object
|
|
240
|
+
named by its file name. `201` when the table is new,
|
|
238
241
|
`200` when it replaced one; with `If-None-Match: *` an existing table is
|
|
239
242
|
refused with `412 TABLE_EXISTS`. Synchronous: it answers when the table
|
|
240
243
|
is written.
|
package/dist/instrumentation.mjs
CHANGED
|
@@ -164831,7 +164831,7 @@ var init_telemetry = __esm(() => {
|
|
|
164831
164831
|
});
|
|
164832
164832
|
|
|
164833
164833
|
// package.json
|
|
164834
|
-
var version = "0.10.
|
|
164834
|
+
var version = "0.10.6";
|
|
164835
164835
|
var init_package = () => {};
|
|
164836
164836
|
|
|
164837
164837
|
// src/version.ts
|
package/dist/server.mjs
CHANGED
|
@@ -164832,7 +164832,7 @@ var init_telemetry = __esm(() => {
|
|
|
164832
164832
|
});
|
|
164833
164833
|
|
|
164834
164834
|
// package.json
|
|
164835
|
-
var version = "0.10.
|
|
164835
|
+
var version = "0.10.6";
|
|
164836
164836
|
var init_package = () => {};
|
|
164837
164837
|
|
|
164838
164838
|
// src/version.ts
|
|
@@ -268347,23 +268347,12 @@ var require_bcrypt_pbkdf = __commonJS((exports, module) => {
|
|
|
268347
268347
|
};
|
|
268348
268348
|
});
|
|
268349
268349
|
|
|
268350
|
-
// ../../node_modules/cpu-features/build/Release/cpufeatures.node
|
|
268351
|
-
var require_cpufeatures = __commonJS((exports, module) => {
|
|
268352
|
-
module.exports = __require("./cpufeatures-gknxfsk5.node");
|
|
268353
|
-
});
|
|
268354
|
-
|
|
268355
|
-
// ../../node_modules/cpu-features/lib/index.js
|
|
268356
|
-
var require_lib5 = __commonJS((exports, module) => {
|
|
268357
|
-
var binding = require_cpufeatures();
|
|
268358
|
-
module.exports = binding.getCPUInfo;
|
|
268359
|
-
});
|
|
268360
|
-
|
|
268361
268350
|
// ../../node_modules/ssh2/lib/protocol/constants.js
|
|
268362
268351
|
var require_constants12 = __commonJS((exports, module) => {
|
|
268363
268352
|
var crypto3 = __require("crypto");
|
|
268364
268353
|
var cpuInfo;
|
|
268365
268354
|
try {
|
|
268366
|
-
cpuInfo =
|
|
268355
|
+
cpuInfo = (()=>{throw new Error("Cannot require module "+"cpu-features");})()();
|
|
268367
268356
|
} catch {}
|
|
268368
268357
|
var { bindingAvailable, CIPHER_INFO, MAC_INFO } = require_crypto();
|
|
268369
268358
|
var eddsaSupported = (() => {
|
|
@@ -283006,7 +282995,7 @@ var require_keygen = __commonJS((exports, module) => {
|
|
|
283006
282995
|
});
|
|
283007
282996
|
|
|
283008
282997
|
// ../../node_modules/ssh2/lib/index.js
|
|
283009
|
-
var
|
|
282998
|
+
var require_lib5 = __commonJS((exports, module) => {
|
|
283010
282999
|
var {
|
|
283011
283000
|
AgentProtocol,
|
|
283012
283001
|
BaseAgent,
|
|
@@ -283189,7 +283178,7 @@ function openSshProxy(ssh, target) {
|
|
|
283189
283178
|
var import_ssh2, ALLOW_UNVERIFIED_SSH_HOST_KEY_ENV = "PUBLISHER_ALLOW_UNVERIFIED_SSH_HOST_KEY", TRUTHY_ENV_VALUES, SSH_CONNECT_TIMEOUT_MS = 15000, SSH_KEEPALIVE_INTERVAL_MS = 15000;
|
|
283190
283179
|
var init_proxy = __esm(() => {
|
|
283191
283180
|
init_logger();
|
|
283192
|
-
import_ssh2 = __toESM(
|
|
283181
|
+
import_ssh2 = __toESM(require_lib5(), 1);
|
|
283193
283182
|
TRUTHY_ENV_VALUES = new Set(["1", "true", "yes", "on"]);
|
|
283194
283183
|
});
|
|
283195
283184
|
|
|
@@ -284261,7 +284250,7 @@ var init_connection_config = __esm(() => {
|
|
|
284261
284250
|
});
|
|
284262
284251
|
|
|
284263
284252
|
// ../../node_modules/webidl-conversions/lib/index.js
|
|
284264
|
-
var
|
|
284253
|
+
var require_lib6 = __commonJS((exports, module) => {
|
|
284265
284254
|
var conversions = {};
|
|
284266
284255
|
module.exports = conversions;
|
|
284267
284256
|
function sign(x2) {
|
|
@@ -285818,7 +285807,7 @@ var require_URL_impl = __commonJS((exports) => {
|
|
|
285818
285807
|
|
|
285819
285808
|
// ../../node_modules/whatwg-url/lib/URL.js
|
|
285820
285809
|
var require_URL = __commonJS((exports, module) => {
|
|
285821
|
-
var conversions =
|
|
285810
|
+
var conversions = require_lib6();
|
|
285822
285811
|
var utils = require_utils95();
|
|
285823
285812
|
var Impl = require_URL_impl();
|
|
285824
285813
|
var impl = utils.implSymbol;
|
|
@@ -286010,7 +285999,7 @@ var require_public_api2 = __commonJS((exports) => {
|
|
|
286010
285999
|
});
|
|
286011
286000
|
|
|
286012
286001
|
// ../../node_modules/node-fetch/lib/index.js
|
|
286013
|
-
var
|
|
286002
|
+
var require_lib7 = __commonJS((exports, module) => {
|
|
286014
286003
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
286015
286004
|
function _interopDefault(ex) {
|
|
286016
286005
|
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
|
|
@@ -288483,7 +288472,7 @@ var require_gaxios2 = __commonJS((exports) => {
|
|
|
288483
288472
|
exports.Gaxios = undefined;
|
|
288484
288473
|
var extend_1 = __importDefault(require_extend());
|
|
288485
288474
|
var https_1 = __require("https");
|
|
288486
|
-
var node_fetch_1 = __importDefault(
|
|
288475
|
+
var node_fetch_1 = __importDefault(require_lib7());
|
|
288487
288476
|
var querystring_1 = __importDefault(__require("querystring"));
|
|
288488
288477
|
var is_stream_1 = __importDefault(require_is_stream());
|
|
288489
288478
|
var url_1 = __require("url");
|
|
@@ -298539,7 +298528,7 @@ var require_stream_events = __commonJS((exports, module) => {
|
|
|
298539
298528
|
var require_src140 = __commonJS((exports) => {
|
|
298540
298529
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
298541
298530
|
exports.teenyRequest = exports.RequestError = undefined;
|
|
298542
|
-
var node_fetch_1 =
|
|
298531
|
+
var node_fetch_1 = require_lib7();
|
|
298543
298532
|
var stream_1 = __require("stream");
|
|
298544
298533
|
var uuid = require_dist10();
|
|
298545
298534
|
var agents_1 = require_agents();
|
|
@@ -349861,6 +349850,9 @@ function carriesAuthorSql(def) {
|
|
|
349861
349850
|
if (record.type === "sql_select" || record.node === "genericSQLExpr") {
|
|
349862
349851
|
return true;
|
|
349863
349852
|
}
|
|
349853
|
+
if (record.node === "function_call") {
|
|
349854
|
+
return Object.entries(record).some(([key, child]) => key !== "overload" && walk2(child, depth + 1));
|
|
349855
|
+
}
|
|
349864
349856
|
if (record.type === "table" && typeof record.tablePath === "string" && !CATALOG_TABLE_PATH.test(record.tablePath)) {
|
|
349865
349857
|
return true;
|
|
349866
349858
|
}
|
|
@@ -350204,7 +350196,7 @@ async function buildSameCatalogIntoStorage(params) {
|
|
|
350204
350196
|
const { destinationName, destinationConnection, physicalTableName } = params;
|
|
350205
350197
|
const alias = params.sourceConnection.name || destinationName;
|
|
350206
350198
|
if (params.sourceCarriesAuthorSql !== false) {
|
|
350207
|
-
throw new BadRequestError(`Cannot materialize a source that reads storage destination ` + `'${destinationName}' and carries SQL its author wrote (an .sql() source ` + `or a sql_* expression): a build on the catalog runs only Malloy's own SQL. ` + `
|
|
350199
|
+
throw new BadRequestError(`Cannot materialize a source that reads storage destination ` + `'${destinationName}' and carries SQL its author wrote (an .sql() source ` + `or a sql_* expression) or reads a file or URL as a table: a build on the catalog ` + `runs only Malloy's own SQL over the catalog's tables. Express it that way. ` + `Dropping storage= does not help when the source's own connection is the catalog.`);
|
|
350208
350200
|
}
|
|
350209
350201
|
const { session, dispose, workDir } = createIsolatedBuildSession(`build_${destinationName}`);
|
|
350210
350202
|
try {
|
|
@@ -377213,11 +377205,21 @@ async function loadStorageTable(params) {
|
|
|
377213
377205
|
if (params.format === "xlsx") {
|
|
377214
377206
|
await installAndLoadExtension(session, "excel");
|
|
377215
377207
|
}
|
|
377216
|
-
return await writeTableAs(session, params, reader);
|
|
377208
|
+
return await writeTableAs(session, params, reader, (error) => readerRefusal(error, params.uri));
|
|
377217
377209
|
} finally {
|
|
377218
377210
|
await dispose();
|
|
377219
377211
|
}
|
|
377220
377212
|
}
|
|
377213
|
+
function readerRefusal(error, uri) {
|
|
377214
|
+
if (!(error instanceof Error))
|
|
377215
|
+
return null;
|
|
377216
|
+
if (!/^(Invalid Input|Conversion) Error:/.test(error.message))
|
|
377217
|
+
return null;
|
|
377218
|
+
logInternalFailure("Load refused by the file reader", error, "warn");
|
|
377219
|
+
const fileName = path24.posix.basename(uri);
|
|
377220
|
+
const words2 = error.message.split(/\n\s*LINE \d+:/)[0].split(uri).join(fileName).trim();
|
|
377221
|
+
return new BadRequestError(words2);
|
|
377222
|
+
}
|
|
377221
377223
|
async function copyStorageTable(params) {
|
|
377222
377224
|
const { destinationName, destinationConnection, source } = params;
|
|
377223
377225
|
for (const conn of [destinationConnection, source.connection]) {
|
|
@@ -377250,7 +377252,7 @@ async function copyStorageTable(params) {
|
|
|
377250
377252
|
await dispose();
|
|
377251
377253
|
}
|
|
377252
377254
|
}
|
|
377253
|
-
async function writeTableAs(session, params, from) {
|
|
377255
|
+
async function writeTableAs(session, params, from, refused) {
|
|
377254
377256
|
const { destinationName, schemaName, tableName } = params;
|
|
377255
377257
|
await session.runSQL("SET ducklake_default_data_inlining_row_limit = 0");
|
|
377256
377258
|
const target = [destinationName, schemaName, tableName].map((part) => quoteIdentifier(part, "duckdb")).join(".");
|
|
@@ -377260,7 +377262,7 @@ async function writeTableAs(session, params, from) {
|
|
|
377260
377262
|
if (params.mode === "create" && error instanceof Error && /already exists/i.test(error.message)) {
|
|
377261
377263
|
throw new ConflictError(`Table '${schemaName}.${tableName}' already exists in '${destinationName}'.`);
|
|
377262
377264
|
}
|
|
377263
|
-
throw error;
|
|
377265
|
+
throw refused?.(error) ?? error;
|
|
377264
377266
|
}
|
|
377265
377267
|
await session.runSQL(`CALL ducklake_flush_inlined_data('${escapeSQL(destinationName)}', schema_name => '${escapeSQL(schemaName)}', table_name => '${escapeSQL(tableName)}')`);
|
|
377266
377268
|
const counted = rows(await session.runSQL(`SELECT count(*) AS n FROM ${target}`));
|
package/package.json
CHANGED
|
Binary file
|