@malloy-publisher/sdk 0.0.55 → 0.0.59

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/sdk",
3
3
  "description": "Malloy Publisher SDK",
4
- "version": "0.0.55",
4
+ "version": "0.0.59",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -17,6 +17,9 @@
17
17
  }
18
18
  },
19
19
  "style": "./dist/malloy-explorer.css",
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
20
23
  "scripts": {
21
24
  "build": "bun generate-api-types && bunx vite build",
22
25
  "postbuild": "cp ../../node_modules/@malloydata/malloy-explorer/dist/malloy-explorer.css ./dist/malloy-explorer.css",
@@ -20,16 +20,10 @@ import {
20
20
  MutableNotebookList,
21
21
  NotebookStorageProvider,
22
22
  } from "./MutableNotebook";
23
+ import { useParams } from "react-router-dom";
23
24
 
24
- export interface AnalyzePackageButtonProps {
25
- projectName: string;
26
- packageName: string;
27
- }
28
-
29
- export function AnalyzePackageButton({
30
- projectName,
31
- packageName,
32
- }: AnalyzePackageButtonProps) {
25
+ export function AnalyzePackageButton() {
26
+ const { projectName, packageName } = useParams();
33
27
  const [workbookName, setWorkbookName] = React.useState("");
34
28
  const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
35
29
  const [newDialogOpen, setNewDialogOpen] = React.useState(false);
@@ -69,6 +63,9 @@ export function AnalyzePackageButton({
69
63
  setWorkbookName("");
70
64
  };
71
65
 
66
+ if (!projectName || !packageName) {
67
+ return null;
68
+ }
72
69
  return (
73
70
  <>
74
71
  <Button
package/vite.config.ts CHANGED
@@ -9,6 +9,7 @@ export default ({ mode }) => {
9
9
  define: {
10
10
  // This is REQUIRED for React and other libraries to eliminate debug code
11
11
  "process.env.NODE_ENV": JSON.stringify(mode),
12
+ "process.env.NODE_DEBUG": "false",
12
13
  // Custom defines for your own code (optional)
13
14
  __DEV__: JSON.stringify(mode !== "production"),
14
15
  __PROD__: JSON.stringify(mode === "production"),