@malloy-publisher/server 0.18.7 → 0.18.8
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/README.docker.md +18 -18
- package/README.md +2 -2
- package/dist/admin-api-doc.yaml +10 -41
- package/dist/app/api-doc.yaml +292 -136
- package/dist/app/assets/{EnvironmentPage-nfT0sfcF.js → EnvironmentPage-B9eJXM9R.js} +1 -1
- package/dist/app/assets/{HomePage-CLVuGwtd.js → HomePage-CUCq65Mm.js} +1 -1
- package/dist/app/assets/{MainPage-BPN92PmE.js → MainPage-DMCpsSwG.js} +1 -1
- package/dist/app/assets/{ModelPage-BtYHo01_.js → ModelPage-CRpHJTqZ.js} +2 -2
- package/dist/app/assets/{PackagePage-BYTMF_z7.js → PackagePage-CrgssVfP.js} +1 -1
- package/dist/app/assets/PackageSplatRoute-Dh1u1dZ4.js +2 -0
- package/dist/app/assets/{RenderedResult-BkBdGb49.es-BeM14Cw6.js → RenderedResult-DW_0pVGi.es-CQe3gbdA.js} +3 -3
- package/dist/app/assets/{RouteError-O8rWhL-e.js → RouteError-C11mhFOT.js} +1 -1
- package/dist/app/assets/{ThemeEditorPage-BPlQ20Nk.js → ThemeEditorPage-CQdYTEul.js} +1 -1
- package/dist/app/assets/{ToggleButtonGroup-ZFDdg4WD.js → ToggleButtonGroup-CPXIFQqB.js} +1 -1
- package/dist/app/assets/{documentRoutes-D2CHPd13.js → documentRoutes-DarwM5Zm.js} +1 -1
- package/dist/app/assets/{editPageMounted-CK5o2lS_.js → editPageMounted-DmeRc7t9.js} +2 -2
- package/dist/app/assets/{index-BvIvG2Vi.js → index-BNAHVKoh.js} +1 -1
- package/dist/app/assets/{index-Dd4jjg8n.js → index-BX1A_FPA.js} +109 -109
- package/dist/app/assets/{index-w9WgUNKi.js → index-C0mf24Mk.js} +1 -1
- package/dist/app/assets/{index-m8b6Cq0X.js → index-CHCSj9_S.js} +1 -1
- package/dist/app/assets/{index.es-c9W9AVnk.js → index.es-B1q1T-14.js} +10 -10
- package/dist/app/assets/usePackageLinkNavigate-iOWW_Iek.js +1 -0
- package/dist/app/assets/{usePackageRoute-DZUIBpcE.js → usePackageRoute-BNCiKCRB.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/instrumentation.mjs +171 -88
- package/dist/package_load_worker.mjs +1226 -660
- package/dist/server.mjs +5992 -2644
- package/package.json +1 -1
- package/dist/app/assets/PackageSplatRoute-M9_ZKB-f.js +0 -2
- package/dist/app/assets/usePackageLinkNavigate-DFEdCQJt.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as u,r as c}from"./index-BX1A_FPA.js";import{w as e}from"./usePackageRoute-BNCiKCRB.js";function p(t,a,r){const s=u();return c.useCallback((o,i)=>s(e(o,t,a,r),i),[s,t,a,r])}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{A as f,a9 as p}from"./index-BX1A_FPA.js";const $=/^(latest|[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)$/,m="latest",l=e=>$.test(e),g=e=>{const n=e.indexOf("/"),o=n===-1?e:e.slice(0,n);if(l(o))return{segment:o,rest:n===-1?"":e.slice(n+1)}},h=e=>e===void 0||e===m?void 0:e,I=(e,n,o)=>`/${encodeURIComponent(e)}/${encodeURIComponent(n)}${o===void 0?"":`/${encodeURIComponent(o)}`}`,E=(e,n,o,t)=>{if(t===void 0)return e;const i=[`/${encodeURIComponent(n)}/${encodeURIComponent(o)}`,`/${n}/${o}`];for(const s of i){if(e!==s&&!e.startsWith(`${s}/`))continue;const r=e.slice(s.length).replace(/^\//,"");return`${I(n,o,t)}${r===""?"":`/${r}`}`}return e};function R(e={}){const n=f(),o=n.environmentName,t=n.packageName,i=n["*"],s=i===void 0?void 0:g(i),{versions:r,isPending:d,isError:v,refetch:u}=p(o??"",t??"",{enabled:e.always===!0||s!==void 0}),a=r.length>0,c=s&&a?s:void 0;return{environmentName:o,packageName:t,versionSegment:c?.segment,versionId:h(c?.segment),path:c?c.rest:i,versioned:a,deciding:s!==void 0&&d,undecided:s!==void 0&&v,retry:u,writable:!a&&!d&&!v}}export{m as L,I as p,R as u,h as v,E as w};
|
package/dist/app/index.html
CHANGED
|
@@ -16,7 +16,7 @@ SPDX-License-Identifier: MIT
|
|
|
16
16
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
17
17
|
/>
|
|
18
18
|
<title>Malloy Publisher</title>
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
19
|
+
<script type="module" crossorigin src="/assets/index-BX1A_FPA.js"></script>
|
|
20
20
|
<link rel="stylesheet" crossorigin href="/assets/index-DUqldpo0.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
package/dist/instrumentation.mjs
CHANGED
|
@@ -173,7 +173,7 @@ function describeRange(range) {
|
|
|
173
173
|
].filter((part) => part !== undefined);
|
|
174
174
|
return parts.length > 0 ? ` ${parts.join(" and ")}` : "";
|
|
175
175
|
}
|
|
176
|
-
var Mismatch, TRUE_SPELLINGS, FALSE_SPELLINGS, BooleanType, INTEGER, IntegerType, DECIMAL, NumberType, EnumType, ListType, StringType, StructuredType, boolean = () => new BooleanType, integer = (range) => new IntegerType(range), number = (range) => new NumberType(range), oneOf = (values) => new EnumType(values), list = (options) => new ListType(options?.ordered ?? true), string = (options) => new StringType(options?.trim ?? true), structured = () => new StructuredType;
|
|
176
|
+
var Mismatch, TRUE_SPELLINGS, FALSE_SPELLINGS, BooleanType, INTEGER, IntegerType, DECIMAL, NumberType, EnumType, ListType, StringType, StructuredType, boolean = () => new BooleanType, integer = (range) => new IntegerType(range), number = (range) => new NumberType(range), oneOf = (values) => new EnumType(values), list = (options) => new ListType(options?.ordered ?? true), string = (options) => new StringType(options?.trim ?? true, options?.pattern, options?.expected), structured = () => new StructuredType;
|
|
177
177
|
var init_types = __esm(() => {
|
|
178
178
|
Mismatch = class Mismatch extends Error {
|
|
179
179
|
constructor() {
|
|
@@ -287,13 +287,22 @@ var init_types = __esm(() => {
|
|
|
287
287
|
};
|
|
288
288
|
StringType = class StringType extends SettingType {
|
|
289
289
|
trim;
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
pattern;
|
|
291
|
+
expected;
|
|
292
|
+
constructor(trim = true, pattern, expected) {
|
|
292
293
|
super();
|
|
293
294
|
this.trim = trim;
|
|
295
|
+
this.pattern = pattern;
|
|
296
|
+
this.expected = expected ?? "a string";
|
|
294
297
|
}
|
|
295
298
|
fromString(raw) {
|
|
296
|
-
|
|
299
|
+
const value = this.trim ? raw.trim() : raw;
|
|
300
|
+
if (this.pattern && !this.pattern.test(value))
|
|
301
|
+
throw new Mismatch;
|
|
302
|
+
return value;
|
|
303
|
+
}
|
|
304
|
+
allows(value) {
|
|
305
|
+
return typeof value !== "string" || this.pattern === undefined || this.pattern.test(value);
|
|
297
306
|
}
|
|
298
307
|
};
|
|
299
308
|
StructuredType = class StructuredType extends SettingType {
|
|
@@ -328,7 +337,7 @@ var init_access = __esm(() => {
|
|
|
328
337
|
type: boolean(),
|
|
329
338
|
default: false,
|
|
330
339
|
description: "Allow setupSQL on environment-authored DuckDB connections.",
|
|
331
|
-
notes: "Set to `true` to let environment-level `duckdb` connections carry `setupSQL`. Unset, a connection with `setupSQL` is refused at config load, on create and update, and by the connection test. `setupSQL` runs arbitrary DuckDB statements on the server, including writing host files and loading extensions, so enable it only where the people who author connections are trusted with the host. Refused under `
|
|
340
|
+
notes: "Set to `true` to let environment-level `duckdb` connections carry `setupSQL`. Unset, a connection with `setupSQL` is refused at config load, on create and update, and by the connection test. `setupSQL` runs arbitrary DuckDB statements on the server, including writing host files and loading extensions, so enable it only where the people who author connections are trusted with the host. Refused under `PUBLISHER_DUCKDB_EXTENSION_FETCH_POLICY=local-only` either way. Same boolean spellings as `PUBLISHER_ALLOW_UNVERIFIED_SSH_HOST_KEY`; any other value fails config load.",
|
|
332
341
|
aliases: { env: ["PUBLISHER_ALLOW_DUCKDB_SETUP_SQL"] }
|
|
333
342
|
}),
|
|
334
343
|
setting({
|
|
@@ -396,30 +405,6 @@ var init_access = __esm(() => {
|
|
|
396
405
|
env: ["SHUTDOWN_GRACEFUL_CLOSE_TIMEOUT_SECONDS"],
|
|
397
406
|
flags: ["--shutdown_graceful_close_timeout_seconds"]
|
|
398
407
|
}
|
|
399
|
-
}),
|
|
400
|
-
setting({
|
|
401
|
-
key: "workloadLog.store",
|
|
402
|
-
type: oneOf(["off", "on"]),
|
|
403
|
-
default: "off",
|
|
404
|
-
description: "on keeps every access record, with its workload shape, in publisher.db's workload_log table; off only logs it.",
|
|
405
|
-
notes: "`on` or `off`: whether the workload log (materialization v2, T1) is also kept locally, in the `workload_log` table of Publisher's own metadata database (`publisher.db`), beside the log line every query already writes. Off by default: the access record goes to the log either way. Each row is one access record with its workload shape, without the values of `#(secure)` givens. Bounded by `PUBLISHER_WORKLOAD_LOG_RETENTION_DAYS` and `PUBLISHER_WORKLOAD_LOG_MAX_ROWS`, flushed every two seconds, so a process that exits loses at most that interval's records; a failed write drops its batch and never fails a query. See [access-record.md](access-record.md#the-workload-log). Any other value fails startup.",
|
|
406
|
-
aliases: { env: ["PUBLISHER_WORKLOAD_LOG_STORE"] }
|
|
407
|
-
}),
|
|
408
|
-
setting({
|
|
409
|
-
key: "workloadLog.retentionDays",
|
|
410
|
-
type: integer({ min: 1 }),
|
|
411
|
-
default: 30,
|
|
412
|
-
description: "Days the workload log's local store keeps a record.",
|
|
413
|
-
notes: "How many days a row stays in the workload log's local store (`PUBLISHER_WORKLOAD_LOG_STORE=on`); older rows are deleted on each flush. Read only when the store is on.",
|
|
414
|
-
aliases: { env: ["PUBLISHER_WORKLOAD_LOG_RETENTION_DAYS"] }
|
|
415
|
-
}),
|
|
416
|
-
setting({
|
|
417
|
-
key: "workloadLog.maxRows",
|
|
418
|
-
type: integer({ min: 1 }),
|
|
419
|
-
default: 1e6,
|
|
420
|
-
description: "Rows the workload log's local store holds; the oldest go first.",
|
|
421
|
-
notes: "The most rows the workload log's local store (`PUBLISHER_WORKLOAD_LOG_STORE=on`) keeps, whatever their age; past it the oldest are deleted on each flush. Read only when the store is on.",
|
|
422
|
-
aliases: { env: ["PUBLISHER_WORKLOAD_LOG_MAX_ROWS"] }
|
|
423
408
|
})
|
|
424
409
|
];
|
|
425
410
|
});
|
|
@@ -454,21 +439,21 @@ var init_admin = __esm(() => {
|
|
|
454
439
|
default: 600000,
|
|
455
440
|
description: "Ms the admin API keeps a request, its headers and an idle keep-alive open.",
|
|
456
441
|
defaultText: "`600000` (10 min)",
|
|
457
|
-
notes: "How long the admin listener lets a request run before closing its connection. A table
|
|
442
|
+
notes: "How long the admin listener lets a request run before closing its connection. A table PUT or a load answers only when the table is written, so a large table needs longer than the main API's ten minutes; raise this for the caller's largest write, and keep the caller's own timeout above it. Applies to the admin listener alone: the main API and MCP listeners keep ten minutes."
|
|
458
443
|
}),
|
|
459
444
|
setting({
|
|
460
445
|
key: "admin.memoryLimit",
|
|
461
446
|
type: string(),
|
|
462
447
|
default: "1.5GB",
|
|
463
|
-
description: "Most memory one admin table load or
|
|
464
|
-
notes: "The `memory_limit` of the DuckDB session an admin table load or
|
|
448
|
+
description: "Most memory one admin table load or table PUT session may use, as a DuckDB size (1.5GB).",
|
|
449
|
+
notes: "The `memory_limit` of the DuckDB session an admin table load or table PUT runs in, as a flat DuckDB size (`1.5GB`, `512MB`). The session uses the lower of this and `PUBLISHER_DUCKDB_MEMORY_LIMIT`, so a pod whose general limit is smaller is never raised by the default: to give a load more than 1.5GB, raise both. A keyed load and a keyless replace both size their comparison passes to half of the session's effective limit. Validated at startup."
|
|
465
450
|
}),
|
|
466
451
|
setting({
|
|
467
452
|
key: "admin.maxTempDirectorySize",
|
|
468
453
|
type: string(),
|
|
469
454
|
default: "6GiB",
|
|
470
|
-
description: "Most spill one admin table load or
|
|
471
|
-
notes: "The `max_temp_directory_size` of the DuckDB session an admin table load or
|
|
455
|
+
description: "Most spill one admin table load or table PUT session may write, as a DuckDB size (6GiB).",
|
|
456
|
+
notes: "The `max_temp_directory_size` of the DuckDB session an admin table load or table PUT runs in, as a flat DuckDB size (`6GiB`, `20GB`). Keep it under the pod's ephemeral storage. A load or table PUT that outgrows it (or the memory limit) answers `422 LOAD_TOO_LARGE`; a full disk is a `500`. Validated at startup."
|
|
472
457
|
}),
|
|
473
458
|
setting({
|
|
474
459
|
key: "admin.catalogDatabase",
|
|
@@ -544,7 +529,7 @@ var init_launch = __esm(() => {
|
|
|
544
529
|
default: (resolving) => !resolving.isSet("root") && !resolving.isSet("config") && resolving.env("NODE_ENV") !== "test",
|
|
545
530
|
kind: "launch",
|
|
546
531
|
description: "Serve the bundled sample config when the server root has none; on when neither {root} nor {config} is given.",
|
|
547
|
-
notes: "Set to `true` to fall back to the sample config bundled inside the installed package when neither `--config` is passed nor a `publisher.config.json` exists at the server root. The server sets this itself on a zero-flag start (so a bare `npx @malloy-publisher/server` boots the samples); passing `--config` or `--
|
|
532
|
+
notes: "Set to `true` to fall back to the sample config bundled inside the installed package when neither `--config` is passed nor a `publisher.config.json` exists at the server root. The server sets this itself on a zero-flag start (so a bare `npx @malloy-publisher/server` boots the samples); passing `--config` or `--root` leaves it unset. Because the bundled config lives inside the install, relative package locations resolve against the server root in this mode rather than the config's directory.",
|
|
548
533
|
defaultText: "on unless `root` or `config` is given; never in tests",
|
|
549
534
|
aliases: {
|
|
550
535
|
env: ["PUBLISHER_USE_BUNDLED_DEFAULT"],
|
|
@@ -667,10 +652,11 @@ var init_mcp = __esm(() => {
|
|
|
667
652
|
});
|
|
668
653
|
|
|
669
654
|
// src/settings/registry/query.ts
|
|
670
|
-
var query;
|
|
655
|
+
var SNOWFLAKE_APPLICATION_NAME, query;
|
|
671
656
|
var init_query = __esm(() => {
|
|
672
657
|
init_constants();
|
|
673
658
|
init_types();
|
|
659
|
+
SNOWFLAKE_APPLICATION_NAME = /^[A-Za-z][A-Za-z0-9._-]{1,50}$/;
|
|
674
660
|
query = [
|
|
675
661
|
setting({
|
|
676
662
|
key: "query.maxRows",
|
|
@@ -694,7 +680,7 @@ var init_query = __esm(() => {
|
|
|
694
680
|
type: integer({ min: 1 }),
|
|
695
681
|
default: DEFAULT_QUERY_ROW_LIMIT,
|
|
696
682
|
description: "Row limit of a model query that sets none of its own.",
|
|
697
|
-
notes: "Default `LIMIT` applied to model queries that don't include their own. Always ≤ `
|
|
683
|
+
notes: "Default `LIMIT` applied to model queries that don't include their own. Always ≤ `PUBLISHER_QUERY_MAX_ROWS`. `0` is rejected.",
|
|
698
684
|
aliases: { env: ["PUBLISHER_DEFAULT_QUERY_ROW_LIMIT"] }
|
|
699
685
|
}),
|
|
700
686
|
setting({
|
|
@@ -719,7 +705,7 @@ var init_query = __esm(() => {
|
|
|
719
705
|
type: boolean(),
|
|
720
706
|
default: false,
|
|
721
707
|
description: "Attach per-query metadata to every statement.",
|
|
722
|
-
notes: "`on` attaches per-query metadata to every statement, as a leading SQL comment where the connection has no native tag; `off` attaches none.
|
|
708
|
+
notes: "`on` attaches per-query metadata to every statement, as a leading SQL comment where the connection has no native tag; `off` attaches none. Any boolean spelling is read; the deprecated `PUBLISHER_QUERY_METADATA` reads only `on` and `off`. See [query-metadata.md](query-metadata.md).",
|
|
723
709
|
aliases: {
|
|
724
710
|
env: ["PUBLISHER_QUERY_METADATA"],
|
|
725
711
|
today: { reads: "on-off" }
|
|
@@ -733,12 +719,24 @@ var init_query = __esm(() => {
|
|
|
733
719
|
notes: "Per-process cap on open database sessions for each Postgres connection, including one reached through an SSH proxy. Each query uses its own session and closes it; when all are busy a query waits up to 30 s for one, then fails with HTTP 502. Across a fleet the ceiling is roughly this value times the pods serving the environment, so size it against the role's `CONNECTION LIMIT`. Must be a positive integer.",
|
|
734
720
|
aliases: { env: ["PUBLISHER_POSTGRES_POOL_MAX"] }
|
|
735
721
|
}),
|
|
722
|
+
setting({
|
|
723
|
+
key: "snowflake.applicationName",
|
|
724
|
+
type: string({
|
|
725
|
+
trim: false,
|
|
726
|
+
pattern: SNOWFLAKE_APPLICATION_NAME,
|
|
727
|
+
expected: `a letter, then 1 to 50 letters, digits, ".", "-" or "_" (Snowflake's rule), like "Acme_Publisher"`
|
|
728
|
+
}),
|
|
729
|
+
fileForbidden: true,
|
|
730
|
+
noFlag: true,
|
|
731
|
+
description: "Client application name every Snowflake session reports (a Snowflake partner's connection identifier).",
|
|
732
|
+
notes: "The name every Snowflake session Publisher opens reports to Snowflake as its client application (`CLIENT_ENVIRONMENT:APPLICATION` in `SNOWFLAKE.ACCOUNT_USAGE.SESSIONS`). A Snowflake technology partner sets it to the connection string identifier it registered with the Snowflake Partner Network, so Snowflake can attribute the sessions to it. Unset, Publisher sets none and each driver reports its own default. Applied on both Snowflake paths: the snowflake-sdk connection behind live queries and connection tests (`application`), and, in the Docker image, the ADBC driver behind DuckDB-attached Snowflake and `storage=` build passthrough (`adbc.snowflake.sql.client_option.app_name`, set by the driver shim in `packages/server/adbc-shim/`). The ADBC driver puts its own `[ADBC][Go-<version>]` prefix in front of the name, so those sessions report `[ADBC][Go-<driver version>]<name>`. Must start with a letter, followed by 1 to 50 letters, digits, `.`, `-` or `_`, which is snowflake-sdk's rule; anything else fails startup, and the value is not trimmed, so a trailing newline from a secret file fails it too (the shim reads the variable as it is). An environment variable only, with no flag or config-file key: the ADBC driver sees only the process environment, so any other source would tag one path and not the other."
|
|
733
|
+
}),
|
|
736
734
|
setting({
|
|
737
735
|
key: "memory.maxBytes",
|
|
738
736
|
type: integer({ min: 0 }),
|
|
739
737
|
default: 0,
|
|
740
738
|
description: "Process RSS ceiling for the memory governor, in bytes; 0 turns the governor off.",
|
|
741
|
-
notes: "Enables the RSS-based memory governor. When set, the governor samples process RSS every `PUBLISHER_MEMORY_CHECK_INTERVAL_MS` ms and rejects new package loads and queries with HTTP 503 once RSS crosses `PUBLISHER_MEMORY_HIGH_WATER_FRACTION ×
|
|
739
|
+
notes: "Enables the RSS-based memory governor. When set, the governor samples process RSS every `PUBLISHER_MEMORY_CHECK_INTERVAL_MS` ms and rejects new package loads and queries with HTTP 503 once RSS crosses `PUBLISHER_MEMORY_HIGH_WATER_FRACTION × PUBLISHER_MEMORY_MAX_BYTES`, until it drops below `PUBLISHER_MEMORY_LOW_WATER_FRACTION ×`. Unset or `0` disables.",
|
|
742
740
|
defaultText: "`0` (the governor is off)",
|
|
743
741
|
aliases: { env: ["PUBLISHER_MAX_MEMORY_BYTES"] }
|
|
744
742
|
}),
|
|
@@ -747,7 +745,7 @@ var init_query = __esm(() => {
|
|
|
747
745
|
type: number({ above: 0, below: 1 }),
|
|
748
746
|
default: 0.8,
|
|
749
747
|
description: "Share of {memory.maxBytes} at which new package loads are refused.",
|
|
750
|
-
notes: "High-water mark (fraction of `
|
|
748
|
+
notes: "High-water mark (fraction of `PUBLISHER_MEMORY_MAX_BYTES`). Must be in `(0, 1)` and strictly above the low-water mark.",
|
|
751
749
|
aliases: { env: ["PUBLISHER_MEMORY_HIGH_WATER_FRACTION"] }
|
|
752
750
|
}),
|
|
753
751
|
setting({
|
|
@@ -755,7 +753,7 @@ var init_query = __esm(() => {
|
|
|
755
753
|
type: number({ above: 0, below: 1 }),
|
|
756
754
|
default: 0.7,
|
|
757
755
|
description: "Share of {memory.maxBytes} at which loads are admitted again; below the high-water mark.",
|
|
758
|
-
notes: "Low-water mark (fraction of `
|
|
756
|
+
notes: "Low-water mark (fraction of `PUBLISHER_MEMORY_MAX_BYTES`). Hysteresis: back-pressure clears when RSS dips below this value.",
|
|
759
757
|
aliases: { env: ["PUBLISHER_MEMORY_LOW_WATER_FRACTION"] }
|
|
760
758
|
}),
|
|
761
759
|
setting({
|
|
@@ -770,8 +768,8 @@ var init_query = __esm(() => {
|
|
|
770
768
|
key: "memory.backpressureEnabled",
|
|
771
769
|
type: boolean(),
|
|
772
770
|
default: true,
|
|
773
|
-
description: "
|
|
774
|
-
notes: "Set to `false` to
|
|
771
|
+
description: "The memory governor's 503 refusals above the high-water mark; off keeps its sampling and reporting.",
|
|
772
|
+
notes: "Set to `false` to turn off the memory governor's 503 refusals while it keeps sampling RSS and reporting it. For an operator who needs the refusals off, for example while a workload's memory profile is investigated, without a code change.",
|
|
775
773
|
aliases: { env: ["PUBLISHER_MEMORY_BACKPRESSURE"] }
|
|
776
774
|
}),
|
|
777
775
|
setting({
|
|
@@ -796,7 +794,7 @@ var init_query = __esm(() => {
|
|
|
796
794
|
type: integer({ min: 0 }),
|
|
797
795
|
default: DEFAULT_PACKAGE_LOAD_SCHEMA_CACHE_BYTES,
|
|
798
796
|
description: "Serialized schema each package-load worker caches across loads, in bytes; 0 turns it off.",
|
|
799
|
-
notes: "Serialized size of the table and SQL schemas each package-load worker keeps across loads, so a model's repeated and later requests for the same table skip the round trip to the main thread. Least recently used entries go first. Scoped per environment and per connection instance, so editing a connection drops its entries. An explicit refresh (a reload with `?reload=true` or `reload_package`,
|
|
797
|
+
notes: "Serialized size of the table and SQL schemas each package-load worker keeps across loads, so a model's repeated and later requests for the same table skip the round trip to the main thread. Least recently used entries go first. Scoped per environment and per connection instance, so editing a connection drops its entries. An explicit refresh (a reload with `?reload=true` or `reload_package`, or a publish) fetches every table and SQL schema the package reads again, in the connection's own cache too, and every worker drops its old entry; a watch-mode recompile and a boot read the cached schemas. Heap use is a few times the serialized size. `0` disables it; empty takes the default, and a value that is not a byte count stops the server from starting.",
|
|
800
798
|
defaultText: "`16777216` (16 MiB)",
|
|
801
799
|
aliases: { env: ["PACKAGE_LOAD_SCHEMA_CACHE_BYTES"] }
|
|
802
800
|
})
|
|
@@ -824,9 +822,8 @@ var init_provider_names = __esm(() => {
|
|
|
824
822
|
});
|
|
825
823
|
|
|
826
824
|
// src/retrieval/defaults.ts
|
|
827
|
-
var
|
|
825
|
+
var DEFAULT_LLM_TIMEOUT_MS = 30000, DEFAULT_LLM_CONCURRENCY = 4, DEFAULT_LLM_MAX_CALLS_PER_SYNC = 300, DEFAULT_LLM_MAX_CALLS_PER_REQUEST = 20, DIMENSION_VALUE_DEFAULTS;
|
|
828
826
|
var init_defaults = __esm(() => {
|
|
829
|
-
EGRESS_PRESETS = ["default", "full"];
|
|
830
827
|
DIMENSION_VALUE_DEFAULTS = { enabled: true, givens: {} };
|
|
831
828
|
});
|
|
832
829
|
|
|
@@ -910,7 +907,7 @@ var init_retrieval = __esm(() => {
|
|
|
910
907
|
key: "retrieval.embedding.provider",
|
|
911
908
|
type: oneOf(EMBEDDING_PROVIDER_NAMES),
|
|
912
909
|
description: "Embedding provider; unset reads the OpenAI-compatible settings.",
|
|
913
|
-
notes: "Which provider serves embeddings. Unset: an OpenAI-compatible endpoint, set by `retrieval.embedding.baseUrl` and the rest. It decides which other `retrieval.embedding` fields apply: every provider but `openai` needs `model`, `openai-compatible` needs `baseUrl`, and `vertex` needs `projectId` and `location`. A `google` or `vertex` provider never reads `
|
|
910
|
+
notes: "Which provider serves embeddings. Unset: an OpenAI-compatible endpoint, set by `retrieval.embedding.baseUrl` and the rest. It decides which other `retrieval.embedding` fields apply: every provider but `openai` needs `model`, `openai-compatible` needs `baseUrl`, and `vertex` needs `projectId` and `location`. A `google` or `vertex` provider never reads `PUBLISHER_RETRIEVAL_EMBEDDING_MODEL`, `PUBLISHER_RETRIEVAL_EMBEDDING_BASE_URL` or `PUBLISHER_RETRIEVAL_EMBEDDING_DIMENSIONS`, which were only ever the OpenAI-compatible provider's.",
|
|
914
911
|
defaultText: "_unset_ (OpenAI-compatible)",
|
|
915
912
|
aliases: { file: ["retrieval.embedding.provider"] }
|
|
916
913
|
}),
|
|
@@ -940,14 +937,6 @@ var init_retrieval = __esm(() => {
|
|
|
940
937
|
defaultText: "empty",
|
|
941
938
|
aliases: { file: ["retrieval.embedding.documentPrefix"] }
|
|
942
939
|
}),
|
|
943
|
-
setting({
|
|
944
|
-
key: "retrieval.egress.preset",
|
|
945
|
-
type: oneOf(EGRESS_PRESETS),
|
|
946
|
-
description: "No longer read: #(index) alone decides whether a dimension's values reach the embedding provider and LLM. Setting it logs a startup warning.",
|
|
947
|
-
notes: "Retired. An earlier release sent `#(index)` values to the embedding provider and the LLM only under `full`. Now the `#(index)` tag decides, as it does on a hosted index. To keep values on the machine, leave `EMBEDDING_API_KEY` unset, set `retrieval.fcj.valueEmbeddings` to `false` in the package's `publisher.json`, or set `retrieval.dimensionValues.enabled` to `false`. Access predicates (`#(access_filter)`, `#(authorize)`) never leave.",
|
|
948
|
-
defaultText: "_ignored_",
|
|
949
|
-
aliases: { file: ["retrieval.egress.preset"] }
|
|
950
|
-
}),
|
|
951
940
|
setting({
|
|
952
941
|
key: "retrieval.dimensionValues.enabled",
|
|
953
942
|
type: boolean(),
|
|
@@ -1020,7 +1009,7 @@ var init_retrieval = __esm(() => {
|
|
|
1020
1009
|
type: boolean(),
|
|
1021
1010
|
default: false,
|
|
1022
1011
|
description: "Let search_database_schema send a connection's table and column names to the embedding provider.",
|
|
1023
|
-
notes: "Allows `search_database_schema` to send a connection's schema name, table names, column names and column types, plus the agent's search text, to the embedding endpoint for semantic ranking. Never row values. A second switch on top of `
|
|
1012
|
+
notes: "Allows `search_database_schema` to send a connection's schema name, table names, column names and column types, plus the agent's search text, to the embedding endpoint for semantic ranking. Never row values. A second switch on top of `PUBLISHER_RETRIEVAL_EMBEDDING_API_KEY`, which alone covers only your own model text; unset, schema search still works and ranks lexically. Accepts `1`/`true`/`yes`/`on` and `0`/`false`/`no`/`off`. It is read when the tool is called, not at startup, so an unrecognised value does not stop the server: the tool logs a warning and ranks lexically for that call. See \"Semantic ranking for search_database_schema\" below.",
|
|
1024
1013
|
aliases: { env: ["EMBEDDING_INDEX_CONNECTION_SCHEMA"] }
|
|
1025
1014
|
}),
|
|
1026
1015
|
setting({
|
|
@@ -1117,15 +1106,6 @@ var init_server = __esm(() => {
|
|
|
1117
1106
|
notes: "The request header whose value the per-query access record copies as `caller`: the identity the gateway in front of Publisher asserts. Opaque to Publisher; see [access-record.md](access-record.md).",
|
|
1118
1107
|
aliases: { env: ["PUBLISHER_CALLER_HEADER"] }
|
|
1119
1108
|
}),
|
|
1120
|
-
setting({
|
|
1121
|
-
key: "packageVersioning",
|
|
1122
|
-
type: oneOf(["off", "on"]),
|
|
1123
|
-
default: "on",
|
|
1124
|
-
description: "on publishes a package from a location as the version its publisher.json declares; off installs it in place. A transition setting #1381 removes.",
|
|
1125
|
-
notes: "`on` or `off`: whether a publish from a location publishes an immutable [package version](package-versions.md) numbered by its `publisher.json` `version` (a missing or non-semver `version` is then a 400), or installs the package in place as before versions. A transition setting: a future release removes it and requires a `version` ([#1381](https://github.com/malloydata/publisher/issues/1381)). Versions published while it was on keep serving when it is off. Any other value fails startup.",
|
|
1126
|
-
noFlag: true,
|
|
1127
|
-
aliases: { env: ["PUBLISHER_PACKAGE_VERSIONING"] }
|
|
1128
|
-
}),
|
|
1129
1109
|
setting({
|
|
1130
1110
|
key: "versionPromotion",
|
|
1131
1111
|
type: oneOf(["on-publish", "explicit"]),
|
|
@@ -1218,7 +1198,7 @@ var init_storage = __esm(() => {
|
|
|
1218
1198
|
key: "duckdb.memoryLimit",
|
|
1219
1199
|
type: string(),
|
|
1220
1200
|
description: "memory_limit of every DuckDB session, as a DuckDB size (1GB), or off; unset warns at boot.",
|
|
1221
|
-
notes: "DuckDB `memory_limit` applied to **every** DuckDB session and instance Publisher owns, as a flat value (`1GB`, `512MB`) passed to DuckDB verbatim. `off` or unset leaves DuckDB's own default, which is roughly 80% of the container's memory computed **per instance** — so N instances in one process commit N times that share, and the kernel kills the process while each of them still believes it is inside its budget. Measured in a 3 GiB container: three instances each reported a 2.3 GiB limit, 6.9 GiB of committed budget against 3 GiB of real memory. **Sizing:** the divisor is not a number of builds. Count 1 metadata store + 1 serve-shape gate session + 1 environment lookup funnel + one sandbox per loaded package × `
|
|
1201
|
+
notes: "DuckDB `memory_limit` applied to **every** DuckDB session and instance Publisher owns, as a flat value (`1GB`, `512MB`) passed to DuckDB verbatim. `off` or unset leaves DuckDB's own default, which is roughly 80% of the container's memory computed **per instance** — so N instances in one process commit N times that share, and the kernel kills the process while each of them still believes it is inside its budget. Measured in a 3 GiB container: three instances each reported a 2.3 GiB limit, 6.9 GiB of committed budget against 3 GiB of real memory. **Sizing:** the divisor is not a number of builds. Count 1 metadata store + 1 serve-shape gate session + 1 environment lookup funnel + one sandbox per loaded package × `PUBLISHER_PACKAGE_LOAD_WORKERS` (package loads run in `worker_threads`, so same address space and same cgroup) + one per in-flight materialization build, and nothing bounds concurrent builds. Budget roughly (container memory − resident baseline) ÷ that count. DuckDB does not reserve the limit up front, so an idle instance costs far less than its budget — the limit caps what it may reach, and it is the sum of the caps that has to fit. Too low fails a query with a DuckDB out-of-memory error and leaves the process up, which is the intended trade against losing the pod and every package on it. Validated at startup.",
|
|
1222
1202
|
aliases: { env: ["PUBLISHER_DUCKDB_MEMORY_LIMIT"] }
|
|
1223
1203
|
}),
|
|
1224
1204
|
setting({
|
|
@@ -1265,7 +1245,7 @@ var init_storage = __esm(() => {
|
|
|
1265
1245
|
default: false,
|
|
1266
1246
|
fileForbidden: true,
|
|
1267
1247
|
description: "Simulated materialization: an authoring mode that makes no materialization write. A variable or flag only, never the config file.",
|
|
1268
|
-
notes: "Simulated materialization, an authoring mode for a local watch-mode server: it
|
|
1248
|
+
notes: "Simulated materialization, an authoring mode for a local watch-mode server: it plans, simulates the build of, and serves through the real router every materialized source of the packages watch mode mounts in place, over tables that are never created, with rows coming back live: the path report, the summary, the `/status` digest, the access record and the metrics say `mode: simulated`, and each item's facts say what is exact, predicted or knowable only on the host. Direct connections only in this release. While it is on, the server makes no materialization write on any path. Every write route answers 409 `SIMULATION_ACTIVE`: creating a materialization (REST, the CLI and the scheduler), deleting one, dropping a materialized table, a storage destination's table drop and file cleanup, every admin catalog write, deleting or archiving a version, deleting a package that has versions, deleting an environment, changing watch mode at runtime, and binding a manifest (`PATCH …/packages/{pkg}` with a `manifestLocation`, `PUT …/versions/{v}/manifest`). The scheduler does not start and the reclaimer is skipped. No host manifest is bound and no table from this server's run store is rebound: a package or version with a `manifestLocation` serves live with a `simulation-manifest-bound` warning, and its manifest is never fetched. A storage destination entry of type `publisher` is accepted, but no lookup of a destination by name finds it and nothing queries through it. Startup fails (`PUBLISHER_INIT_FAILED`) with it on and `frozenConfig` on, or with no watched environment (`--watch-env`). A variable or flag only: a config file can travel between servers, so the file cannot turn it on. See [materialization.md](materialization.md#simulated-materialization)."
|
|
1269
1249
|
}),
|
|
1270
1250
|
setting({
|
|
1271
1251
|
key: "materialization.schedulerEnabled",
|
|
@@ -1283,16 +1263,6 @@ var init_storage = __esm(() => {
|
|
|
1283
1263
|
notes: "How often the scheduler sweeps for due schedules, in ms. Minimum `1000`. Only read when the scheduler is enabled.",
|
|
1284
1264
|
defaultText: "`60000` (1 min)",
|
|
1285
1265
|
aliases: { env: ["PUBLISHER_MATERIALIZATION_SCHEDULER_INTERVAL_MS"] }
|
|
1286
|
-
}),
|
|
1287
|
-
setting({
|
|
1288
|
-
key: "materialization.schedulerMaxFiresPerTick",
|
|
1289
|
-
type: integer({ min: 1 }),
|
|
1290
|
-
default: 10,
|
|
1291
|
-
description: "Packages the scheduler fires per look.",
|
|
1292
|
-
notes: "Stampede guard: max packages fired per sweep. A capped package fires on a later tick. Must be a positive integer.",
|
|
1293
|
-
aliases: {
|
|
1294
|
-
env: ["PUBLISHER_MATERIALIZATION_SCHEDULER_MAX_FIRES_PER_TICK"]
|
|
1295
|
-
}
|
|
1296
1266
|
})
|
|
1297
1267
|
];
|
|
1298
1268
|
});
|
|
@@ -1361,6 +1331,60 @@ var init_retired = __esm(() => {
|
|
|
1361
1331
|
flags: ["--materialize-gated-sources", "--no-materialize-gated-sources"],
|
|
1362
1332
|
file: "materialize.gatedSources",
|
|
1363
1333
|
now: "it stays off until a security review: a stored table answers past a row-level gate only under its source's own gate"
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
key: "packageVersioning",
|
|
1337
|
+
env: ["PUBLISHER_PACKAGE_VERSIONING"],
|
|
1338
|
+
flags: [],
|
|
1339
|
+
file: "packageVersioning",
|
|
1340
|
+
now: "a publish from a location always publishes the immutable version its publisher.json declares, and a missing or non-semver version is refused (400)"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
key: "materialization.schedulerMaxFiresPerTick",
|
|
1344
|
+
env: ["PUBLISHER_MATERIALIZATION_SCHEDULER_MAX_FIRES_PER_TICK"],
|
|
1345
|
+
flags: ["--materialization-scheduler-max-fires-per-tick"],
|
|
1346
|
+
takesValue: true,
|
|
1347
|
+
file: "materialization.schedulerMaxFiresPerTick",
|
|
1348
|
+
now: "the scheduler fires at most 10 packages per sweep, and a capped package fires on a later one"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
key: "workloadLog.store",
|
|
1352
|
+
env: ["PUBLISHER_WORKLOAD_LOG_STORE"],
|
|
1353
|
+
flags: ["--workload-log-store"],
|
|
1354
|
+
takesValue: true,
|
|
1355
|
+
file: "workloadLog.store",
|
|
1356
|
+
now: "Publisher keeps no local copy of the access records; they go to the log only"
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
key: "workloadLog.retentionDays",
|
|
1360
|
+
env: ["PUBLISHER_WORKLOAD_LOG_RETENTION_DAYS"],
|
|
1361
|
+
flags: ["--workload-log-retention-days"],
|
|
1362
|
+
takesValue: true,
|
|
1363
|
+
file: "workloadLog.retentionDays",
|
|
1364
|
+
now: "Publisher keeps no local copy of the access records; they go to the log only"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
key: "workloadLog.maxRows",
|
|
1368
|
+
env: ["PUBLISHER_WORKLOAD_LOG_MAX_ROWS"],
|
|
1369
|
+
flags: ["--workload-log-max-rows"],
|
|
1370
|
+
takesValue: true,
|
|
1371
|
+
file: "workloadLog.maxRows",
|
|
1372
|
+
now: "Publisher keeps no local copy of the access records; they go to the log only"
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
key: "retrieval.egress.preset",
|
|
1376
|
+
env: ["PUBLISHER_RETRIEVAL_EGRESS_PRESET"],
|
|
1377
|
+
flags: ["--retrieval-egress-preset"],
|
|
1378
|
+
takesValue: true,
|
|
1379
|
+
file: "retrieval.egress",
|
|
1380
|
+
now: "the #(index) tag alone decides whether a dimension's values reach the configured embedding provider and LLM; to keep them on this machine, set retrieval.dimensionValues.enabled to false"
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
key: "retrieval.indexing.maxEntities",
|
|
1384
|
+
env: [],
|
|
1385
|
+
flags: [],
|
|
1386
|
+
file: "retrieval.indexing",
|
|
1387
|
+
now: "the search index has no entity cap"
|
|
1364
1388
|
}
|
|
1365
1389
|
];
|
|
1366
1390
|
});
|
|
@@ -1489,6 +1513,8 @@ class Loader {
|
|
|
1489
1513
|
deprecated = new Set;
|
|
1490
1514
|
unknownFlags = [];
|
|
1491
1515
|
flagsWithoutValue = [];
|
|
1516
|
+
retiredFlags = [];
|
|
1517
|
+
flagsAsValues = [];
|
|
1492
1518
|
valuesAfterSwitches = [];
|
|
1493
1519
|
file = {};
|
|
1494
1520
|
configPath;
|
|
@@ -1551,16 +1577,29 @@ class Loader {
|
|
|
1551
1577
|
filePaths(entry) {
|
|
1552
1578
|
return namesOf(entry).file;
|
|
1553
1579
|
}
|
|
1580
|
+
isFlagName(arg) {
|
|
1581
|
+
return this.byFlag.has(arg) || RETIRED_SETTINGS.some((r) => r.flags.some(namesFlag(arg)));
|
|
1582
|
+
}
|
|
1583
|
+
valueAfter(name, i) {
|
|
1584
|
+
const next = this.argv[i + 1];
|
|
1585
|
+
if (!next)
|
|
1586
|
+
return;
|
|
1587
|
+
if (this.isFlagName(next))
|
|
1588
|
+
this.flagsAsValues.push({ name, value: next });
|
|
1589
|
+
return next;
|
|
1590
|
+
}
|
|
1554
1591
|
readFlags() {
|
|
1555
1592
|
for (let i = 0;i < this.argv.length; i++) {
|
|
1556
1593
|
const name = this.argv[i];
|
|
1557
1594
|
const flag = this.byFlag.get(name);
|
|
1558
1595
|
if (!flag) {
|
|
1559
1596
|
const retired = RETIRED_SETTINGS.find((r) => r.flags.some(namesFlag(name)));
|
|
1560
|
-
if (retired
|
|
1561
|
-
i
|
|
1597
|
+
if (retired) {
|
|
1598
|
+
if (this.readRetiredFlag(retired, name, i))
|
|
1599
|
+
i++;
|
|
1600
|
+
continue;
|
|
1562
1601
|
}
|
|
1563
|
-
if (name.startsWith("-") && name !== "--help" && name !== "-h"
|
|
1602
|
+
if (name.startsWith("-") && name !== "--help" && name !== "-h") {
|
|
1564
1603
|
this.unknownFlags.push(name);
|
|
1565
1604
|
}
|
|
1566
1605
|
continue;
|
|
@@ -1572,7 +1611,7 @@ class Loader {
|
|
|
1572
1611
|
if (next !== undefined && readsAsBoolean(flag.entry, next)) {
|
|
1573
1612
|
this.valuesAfterSwitches.push({ name, flag, next });
|
|
1574
1613
|
}
|
|
1575
|
-
} else if (this.
|
|
1614
|
+
} else if (this.valueAfter(name, i) !== undefined) {
|
|
1576
1615
|
raw = this.argv[i + 1];
|
|
1577
1616
|
i++;
|
|
1578
1617
|
} else {
|
|
@@ -1584,6 +1623,27 @@ class Loader {
|
|
|
1584
1623
|
this.flags.set(flag.entry.key, hits);
|
|
1585
1624
|
}
|
|
1586
1625
|
}
|
|
1626
|
+
readRetiredFlag(retired, name, i) {
|
|
1627
|
+
if (!retired.takesValue) {
|
|
1628
|
+
this.retiredFlags.push({ retired, name });
|
|
1629
|
+
return false;
|
|
1630
|
+
}
|
|
1631
|
+
const joined = name.indexOf("=");
|
|
1632
|
+
if (joined !== -1) {
|
|
1633
|
+
if (name.slice(joined + 1).trim() !== "") {
|
|
1634
|
+
this.retiredFlags.push({ retired, name });
|
|
1635
|
+
}
|
|
1636
|
+
return false;
|
|
1637
|
+
}
|
|
1638
|
+
const value = this.valueAfter(name, i);
|
|
1639
|
+
if (value === undefined) {
|
|
1640
|
+
this.flagsWithoutValue.push(name);
|
|
1641
|
+
return false;
|
|
1642
|
+
}
|
|
1643
|
+
if (value.trim() !== "")
|
|
1644
|
+
this.retiredFlags.push({ retired, name });
|
|
1645
|
+
return true;
|
|
1646
|
+
}
|
|
1587
1647
|
warnAboutFlags() {
|
|
1588
1648
|
const current = [...this.byFlag].filter(([, flag]) => !flag.old).map(([name]) => name);
|
|
1589
1649
|
for (const name of this.unknownFlags) {
|
|
@@ -1597,6 +1657,11 @@ class Loader {
|
|
|
1597
1657
|
message: `${name} has no value after it, so it is ignored.`
|
|
1598
1658
|
});
|
|
1599
1659
|
}
|
|
1660
|
+
for (const { name, value } of this.flagsAsValues) {
|
|
1661
|
+
this.warnings.push({
|
|
1662
|
+
message: `${name} took '${value}' as its value, so ${value} is not read as a flag. If ${name} was meant to have a value of its own, write it after ${name}.`
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1600
1665
|
for (const { name, flag, next } of this.valuesAfterSwitches) {
|
|
1601
1666
|
const on = flag.switches;
|
|
1602
1667
|
const opposite = namesOf(flag.entry).flags.find((other) => !other.old && this.byFlag.get(other.name)?.switches === !on && this.byFlag.get(other.name)?.entry === flag.entry);
|
|
@@ -1607,6 +1672,16 @@ class Loader {
|
|
|
1607
1672
|
}
|
|
1608
1673
|
}
|
|
1609
1674
|
warnAboutRetired() {
|
|
1675
|
+
const isSet = (value) => {
|
|
1676
|
+
if (value === undefined || value === null)
|
|
1677
|
+
return false;
|
|
1678
|
+
if (typeof value === "string")
|
|
1679
|
+
return value.trim() !== "";
|
|
1680
|
+
if (typeof value === "object") {
|
|
1681
|
+
return Object.values(value).some(isSet);
|
|
1682
|
+
}
|
|
1683
|
+
return true;
|
|
1684
|
+
};
|
|
1610
1685
|
const fileHas = (key) => {
|
|
1611
1686
|
let node = this.file;
|
|
1612
1687
|
for (const part of key.split(".")) {
|
|
@@ -1615,12 +1690,12 @@ class Loader {
|
|
|
1615
1690
|
}
|
|
1616
1691
|
node = node[part];
|
|
1617
1692
|
}
|
|
1618
|
-
return
|
|
1693
|
+
return isSet(node);
|
|
1619
1694
|
};
|
|
1620
1695
|
for (const retired of RETIRED_SETTINGS) {
|
|
1621
1696
|
const names = [
|
|
1622
|
-
...retired.env.filter((name) => this.env[name]
|
|
1623
|
-
...this.
|
|
1697
|
+
...retired.env.filter((name) => isSet(this.env[name])),
|
|
1698
|
+
...this.retiredFlags.filter((hit) => hit.retired === retired).map((hit) => hit.name),
|
|
1624
1699
|
...fileHas(retired.file) ? [
|
|
1625
1700
|
`"${retired.file}" in ${this.configPath ?? PUBLISHER_CONFIG_NAME}`
|
|
1626
1701
|
] : []
|
|
@@ -1636,6 +1711,8 @@ class Loader {
|
|
|
1636
1711
|
const read = this.registry.flatMap((entry) => this.filePaths(entry).map(({ path }) => path));
|
|
1637
1712
|
const whole = new Set(this.registry.filter((entry) => entry.kind === "structured").flatMap((entry) => this.filePaths(entry).map(({ path }) => path)));
|
|
1638
1713
|
const file = this.configPath ?? PUBLISHER_CONFIG_NAME;
|
|
1714
|
+
const unfiled = this.registry.filter((entry) => entry.kind === "launch" || entry.fileForbidden).map((entry) => entry.key);
|
|
1715
|
+
const otherNames = (entry) => entry.noFlag ? `a variable only (${derivedEnvName(entry.key)})` : `a variable or a flag only (${derivedEnvName(entry.key)}, ${derivedFlagName(entry.key)})`;
|
|
1639
1716
|
const visit = (node, prefix) => {
|
|
1640
1717
|
for (const [name, value] of Object.entries(node)) {
|
|
1641
1718
|
const key = prefix ? `${prefix}.${name}` : name;
|
|
@@ -1643,7 +1720,7 @@ class Loader {
|
|
|
1643
1720
|
continue;
|
|
1644
1721
|
if (RETIRED_SETTINGS.some((r) => r.file === key))
|
|
1645
1722
|
continue;
|
|
1646
|
-
if (read.some((path) => path.startsWith(`${key}.`)) || RETIRED_SETTINGS.some((r) => r.file.startsWith(`${key}.`))) {
|
|
1723
|
+
if (read.some((path) => path.startsWith(`${key}.`)) || unfiled.some((path) => path.startsWith(`${key}.`)) || RETIRED_SETTINGS.some((r) => r.file.startsWith(`${key}.`))) {
|
|
1647
1724
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
1648
1725
|
visit(value, key);
|
|
1649
1726
|
}
|
|
@@ -1652,13 +1729,13 @@ class Loader {
|
|
|
1652
1729
|
const launch = this.byKey.get(key);
|
|
1653
1730
|
if (launch?.kind === "launch") {
|
|
1654
1731
|
this.warnings.push({
|
|
1655
|
-
message: `"${key}" in ${file} is ignored: it decides which file is read, or must not come from one, so it is
|
|
1732
|
+
message: `"${key}" in ${file} is ignored: it decides which file is read, or must not come from one, so it is ${otherNames(launch)}.`
|
|
1656
1733
|
});
|
|
1657
1734
|
continue;
|
|
1658
1735
|
}
|
|
1659
1736
|
if (launch?.fileForbidden) {
|
|
1660
1737
|
this.warnings.push({
|
|
1661
|
-
message: `"${key}" in ${file} is ignored:
|
|
1738
|
+
message: `"${key}" in ${file} is ignored: it is never read from a config file, so it is ${otherNames(launch)}.`
|
|
1662
1739
|
});
|
|
1663
1740
|
continue;
|
|
1664
1741
|
}
|
|
@@ -167098,6 +167175,12 @@ function lazyInstrument(create) {
|
|
|
167098
167175
|
instrumentResets.push(() => instrument = null);
|
|
167099
167176
|
return () => instrument ??= create();
|
|
167100
167177
|
}
|
|
167178
|
+
function withoutMetrics(fn) {
|
|
167179
|
+
return metricsSuppressed.run(true, fn);
|
|
167180
|
+
}
|
|
167181
|
+
function withMetrics(fn) {
|
|
167182
|
+
return metricsSuppressed.exit(fn);
|
|
167183
|
+
}
|
|
167101
167184
|
function metricsAreSuppressed() {
|
|
167102
167185
|
return metricsSuppressed.getStore() === true;
|
|
167103
167186
|
}
|
|
@@ -167168,7 +167251,7 @@ var init_telemetry = __esm(() => {
|
|
|
167168
167251
|
});
|
|
167169
167252
|
|
|
167170
167253
|
// package.json
|
|
167171
|
-
var version = "0.18.
|
|
167254
|
+
var version = "0.18.8";
|
|
167172
167255
|
var init_package = () => {};
|
|
167173
167256
|
|
|
167174
167257
|
// src/version.ts
|