mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
A version written into a manifest is written into every manifest that wants it, which is how eslint came to exist in a hundred and four forms across this estate and how a package came to resolve twice at run time. The catalog moves the number out of the manifest: a manifest names the package, the workspace names the version. Four are held below their latest because the newer release cannot be used, and the reason is recorded rather than the version alone: @noble/hashes 2 renamed every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels 3 points its types condition at the bundle.
Insights VS Code Extension Playground
This is a playground to test Insights integration within a VS Code extension's webview.
How to run
- Open this directory (
packages/browser/playground/vscode-extension) in a separate VS Code window. - Open a terminal and run
pnpm install. - Press
F5to open a new Extension Development Host window. - In the new window, open the Command Palette (
Cmd+Shift+PorCtrl+Shift+P) and search for "Start Insights Playground". - Run the command to open the webview.
- You can interact with the input and button to send events to Insights.
Configuration
Running with a local @hanzo/insights build
By default, the playground is configured to use a local build of @hanzo/insights. In src/extension.js, the runningLocally constant is set to true. This will load array.full.js from the packages/browser/dist directory.
To use the production snippet from the Insights CDN, you will need to set runningLocally to false.
Environment Variables
The Insights project key and API host are loaded from a .env file in the root of the @hanzo/insights repository.
- If you don't already have one, create a
.envfile at the root of the@hanzo/insightsproject. - Add your Insights Project Key to the
.envfile:IfINSIGHTS_PROJECT_API_KEY=<your-project-key> INSIGHTS_API_HOST=<your-api-host>INSIGHTS_API_HOSTis not set, it will default tohttp://localhost:8010.