@malloy-publisher/create-malloy-package 0.0.20 → 0.0.21
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/index.js +2 -2
- package/package.json +2 -2
- package/templates/index.malloy +9 -5
package/dist/index.js
CHANGED
|
@@ -675,7 +675,7 @@ var MCP_PORT = 4040;
|
|
|
675
675
|
var ALT_PUBLISHER_PORT = PUBLISHER_PORT + 100;
|
|
676
676
|
var ALT_MCP_PORT = MCP_PORT + 100;
|
|
677
677
|
var BIND_HOST = "127.0.0.1";
|
|
678
|
-
var SERVER_VERSION = "0.8.
|
|
678
|
+
var SERVER_VERSION = "0.8.1";
|
|
679
679
|
function startCommandFor(envName) {
|
|
680
680
|
return `npx -y @malloy-publisher/server@${SERVER_VERSION} --server_root . ` + `--config ./publisher.config.json --host ${BIND_HOST} ` + `--watch-env ${envName}`;
|
|
681
681
|
}
|
|
@@ -1414,7 +1414,7 @@ function packageSection(result, envPackages) {
|
|
|
1414
1414
|
];
|
|
1415
1415
|
if (result.packageCreated) {
|
|
1416
1416
|
const base = restBase(result.packageName);
|
|
1417
|
-
lines.push(`\`${result.packageName}/${result.modelFile}\` defines a Malloy source named \`${result.sourceName}\` over local data. Read it for the real source, field, and view names and use them verbatim; never guess them.`, "", result.indexFile === result.modelFile ? `That file is also \`${result.indexFile}\`, this package's published surface: what it \`export\`s is what Publisher lists and what may be queried. Query through it.` : `\`${result.packageName}/${result.indexFile}\` is the package's published surface: it imports that model and \`export\`s \`${result.sourceName}\`. Publisher lists and accepts queries against the surface, so address queries to \`${result.indexFile}\`, not to \`${result.modelFile}\` -- a model off the surface is refused with a 404. Add a source to the \`export\` list to publish it.`, "", `
|
|
1417
|
+
lines.push(`\`${result.packageName}/${result.modelFile}\` defines a Malloy source named \`${result.sourceName}\` over local data. Read it for the real source, field, and view names and use them verbatim; never guess them.`, "", result.indexFile === result.modelFile ? `That file is also \`${result.indexFile}\`, this package's published surface: what it \`export\`s is what Publisher lists and what may be queried. Query through it.` : `\`${result.packageName}/${result.indexFile}\` is the package's published surface: it imports that model and \`export\`s \`${result.sourceName}\`. Publisher lists and accepts queries against the surface, so address queries to \`${result.indexFile}\`, not to \`${result.modelFile}\` -- a model off the surface is refused with a 404. Add a source to the \`export\` list to publish it.`, "", `The package's REST base is:`, "", "```", base, "```", "", "Run one of its views from a script:", "", "```bash", `curl -s -X POST ${base}/models/${result.indexFile}/query \\`, " -H 'content-type: application/json' \\", ` -d '{"query":"run: ${result.sourceName} -> overview"}'`, "```", "", `The VS Code / Cursor Malloy extension resolves the model's relative \`duckdb.table('data/…')\` paths against the EDITOR WORKSPACE root, while Publisher resolves them against the package directory. \`${result.packageName}/malloy-config.json\` (generated, machine-specific absolute path) bridges that for an editor opened at this workspace root; without it, open the editor at \`${result.packageName}/\` itself, or a model Publisher serves fine shows unresolved-table errors in the editor.`, "");
|
|
1418
1418
|
}
|
|
1419
1419
|
if (others.length > 0) {
|
|
1420
1420
|
lines.push(otherPackagesParagraph(result, others, restBase), "");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloy-publisher/create-malloy-package",
|
|
3
3
|
"description": "Scaffold a Malloy Publisher package and a local agent workspace, so one command takes you from nothing to an agent that can query your data.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.21",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"test:e2e": "bun test --timeout 180000 ./tests/e2e"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@malloy-publisher/skills": "^0.1.
|
|
48
|
+
"@malloy-publisher/skills": "^0.1.27",
|
|
49
49
|
"commander": "^12.1.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
package/templates/index.malloy
CHANGED
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
// `export { ... }` is the curation, and it is a real boundary rather than
|
|
8
8
|
// just a listing filter. A source named here is discoverable AND queryable.
|
|
9
9
|
// A source left out still compiles, and other models can import, join and
|
|
10
|
-
// extend it, but a direct query against it is refused with a 404
|
|
11
|
-
//
|
|
10
|
+
// extend it, but a direct query against it is refused with a 404 that says
|
|
11
|
+
// it is not on this surface. (Once a model carries an authorize or
|
|
12
|
+
// access_filter gate, that 404 reads the same as for a source that does not
|
|
13
|
+
// exist, so it cannot be used to find hidden names.) Add a name here to
|
|
12
14
|
// publish it; leave one out to keep it as an internal building block.
|
|
13
15
|
//
|
|
14
|
-
// To curate listings WITHOUT refusing queries,
|
|
15
|
-
// publisher.json
|
|
16
|
-
//
|
|
16
|
+
// To curate listings WITHOUT refusing queries, add "queryableSources": "all"
|
|
17
|
+
// to publisher.json: this file still decides what is listed, and every source
|
|
18
|
+
// stays queryable by name. Its one use is an authorize-gated source kept out
|
|
19
|
+
// of listings that authorized callers still query. See
|
|
20
|
+
// docs/discovery-and-access.md.
|
|
17
21
|
|
|
18
22
|
import "{{modelFile}}"
|
|
19
23
|
|