@malloy-publisher/create-malloy-package 0.0.8 → 0.0.10

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -32,6 +32,15 @@ var SAFE_NAME_RE = /^(?!\.\.?$)(?!\.)[A-Za-z0-9._-]+$/;
32
32
  var MAX_FILENAME = 255;
33
33
  var MAX_PACKAGE_NAME = MAX_FILENAME - ".malloy".length;
34
34
  function validatePackageName(name) {
35
+ if (name === "." || name === "..") {
36
+ throw new ScaffoldError(`"${name}" is not a package name, and this tool cannot scaffold a ` + `package into the directory you are already in.
37
+
38
+ ` + `To create a package, name it — it goes in a new subdirectory:
39
+ ` + ` create-malloy-package sales
40
+
41
+ ` + `To set this directory up as a Publisher workspace without ` + `creating a package, pass no name at all:
42
+ ` + ` create-malloy-package`);
43
+ }
35
44
  if (!SAFE_NAME_RE.test(name)) {
36
45
  throw new ScaffoldError(`Invalid package name "${preview(name)}": use letters, digits, "-", ` + `"_", or "." and do not start with ".".`);
37
46
  }
@@ -665,7 +674,7 @@ var MCP_PORT = 4040;
665
674
  var ALT_PUBLISHER_PORT = PUBLISHER_PORT + 100;
666
675
  var ALT_MCP_PORT = MCP_PORT + 100;
667
676
  var BIND_HOST = "127.0.0.1";
668
- var SERVER_VERSION = "0.2.0";
677
+ var SERVER_VERSION = "0.2.2";
669
678
  function startCommandFor(envName) {
670
679
  return `npx -y @malloy-publisher/server@${SERVER_VERSION} --server_root . ` + `--config ./publisher.config.json --host ${BIND_HOST} ` + `--watch-env ${envName}`;
671
680
  }
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.8",
4
+ "version": "0.0.10",
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.9",
48
+ "@malloy-publisher/skills": "^0.1.12",
49
49
  "commander": "^12.1.0"
50
50
  },
51
51
  "devDependencies": {