@malloydata/malloy 0.0.384 → 0.0.385

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.
@@ -77,32 +77,24 @@ function extractCompiledConnections(node) {
77
77
  return out;
78
78
  }
79
79
  /**
80
- * Add a bare `{is: typeName}` compiled entry for each registered connection
81
- * type not already represented in `compiledConnections`. Only runs when the
82
- * POJO sets `includeDefaultConnections: true`. Property values (including
83
- * reference-shaped defaults like DuckDB's `{config: 'rootDirectory'}`) are
84
- * *not* filled in here that is the job of the async lookup resolver.
80
+ * For each registered connection type T, add a bare `{is: T}` compiled
81
+ * entry named T unless one already exists under that name. Only runs when
82
+ * the POJO sets `includeDefaultConnections: true`. Property values
83
+ * (including reference-shaped defaults like DuckDB's
84
+ * `{config: 'rootDirectory'}`) are filled in later by the async lookup
85
+ * resolver, not here.
85
86
  *
86
- * Skip rules:
87
- * - Type already in use: some existing entry has `is: typeName`.
88
- * - Name already taken: some existing entry is *named* `typeName`, even
89
- * if its `is` points elsewhere. This protects a user who writes
90
- * `{duckdb: {is: 'postgres', ...}}` naming an entry after a type but
91
- * pointing at a different backend from being clobbered.
87
+ * The skip is purely name-based: the `is` of a user entry is irrelevant.
88
+ * `{duckdb: {is: 'postgres'}}` shadows the duckdb phantom (slot taken);
89
+ * `{dankdb: {is: 'duckdb'}}` does not (slot `duckdb` is still free, and
90
+ * both end up reachable). This name-only rule is the contract hosts rely
91
+ * on e.g. the VS Code connections sidebar advertises defaults by name,
92
+ * and the runtime must resolve them under those same names.
92
93
  *
93
94
  * Mutates `compiledConnections` in place.
94
95
  */
95
96
  function fabricateMissingConnections(compiledConnections) {
96
- const presentTypes = new Set();
97
- for (const entry of Object.values(compiledConnections)) {
98
- const isNode = entry.entries['is'];
99
- if ((isNode === null || isNode === void 0 ? void 0 : isNode.kind) === 'value' && typeof isNode.value === 'string') {
100
- presentTypes.add(isNode.value);
101
- }
102
- }
103
97
  for (const typeName of (0, registry_1.getRegisteredConnectionTypes)()) {
104
- if (presentTypes.has(typeName))
105
- continue;
106
98
  if (compiledConnections[typeName])
107
99
  continue;
108
100
  compiledConnections[typeName] = {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MALLOY_VERSION = "0.0.384";
1
+ export declare const MALLOY_VERSION = "0.0.385";
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.384';
5
+ exports.MALLOY_VERSION = '0.0.385';
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.384",
3
+ "version": "0.0.385",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -51,9 +51,9 @@
51
51
  "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"
52
52
  },
53
53
  "dependencies": {
54
- "@malloydata/malloy-filter": "0.0.384",
55
- "@malloydata/malloy-interfaces": "0.0.384",
56
- "@malloydata/malloy-tag": "0.0.384",
54
+ "@malloydata/malloy-filter": "0.0.385",
55
+ "@malloydata/malloy-interfaces": "0.0.385",
56
+ "@malloydata/malloy-tag": "0.0.385",
57
57
  "@noble/hashes": "^1.8.0",
58
58
  "antlr4ts": "^0.5.0-alpha.4",
59
59
  "assert": "^2.0.0",