@cognite/dune 0.4.1 → 0.4.2

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/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # @cognite/dune
2
+
3
+ Build and deploy React apps to [Cognite Data Fusion](https://docs.cognite.com/).
4
+
5
+ ## Quick start
6
+
7
+ Scaffold a new app — AI skills are pulled automatically:
8
+
9
+ ```bash
10
+ npx @cognite/dune create
11
+ ```
12
+
13
+ This prompts for your app name, org, project, and cluster, then generates a fully configured React + TypeScript project.
14
+
15
+ ## Authentication
16
+
17
+ Wrap your app in `DuneAuthProvider` to get an authenticated `CogniteClient` from Fusion's iframe handshake:
18
+
19
+ ```tsx
20
+ import { DuneAuthProvider, useDune } from '@cognite/dune/auth';
21
+
22
+ function App() {
23
+ const { sdk, isLoading } = useDune();
24
+ if (isLoading) return <div>Loading...</div>;
25
+ return <MyApp sdk={sdk} />;
26
+ }
27
+
28
+ export default function Root() {
29
+ return (
30
+ <DuneAuthProvider>
31
+ <App />
32
+ </DuneAuthProvider>
33
+ );
34
+ }
35
+ ```
36
+
37
+ For apps running inside the new Fusion app host, use `AppSdkAuthProvider` instead — it authenticates via the `@cognite/app-sdk` Comlink handshake.
38
+
39
+ ## Deployment
40
+
41
+ Deploy interactively via browser OAuth:
42
+
43
+ ```bash
44
+ npx @cognite/dune deploy:interactive
45
+ ```
46
+
47
+ For CI, set your client secret as an environment variable and run:
48
+
49
+ ```bash
50
+ pnpm deploy
51
+ ```
52
+
53
+ Deployment targets are configured in `app.json` at the project root.
54
+
55
+ ## AI skills
56
+
57
+ Skills guide your AI agent (Claude Code, Cursor, etc.) through Dune-specific tasks like adding auth, building chat UIs, or reviewing code. They are pulled automatically on `npx @cognite/dune create` and can be synced later:
58
+
59
+ ```bash
60
+ npx @cognite/dune skills pull
61
+ ```
62
+
63
+ Browse available skills at [cognitedata/dune-skills](https://github.com/cognitedata/dune-skills).
64
+
65
+ ## Requirements
66
+
67
+ - Node.js ≥ 18
68
+ - React ≥ 18 (optional peer dependency — only needed for auth components)
@@ -23,7 +23,7 @@ to: '<%= useCurrentDir ? "" : ((directoryName || name) + "/") %>package.json'
23
23
  "dependencies": {
24
24
  "@cognite/aura": "^0.1.5",
25
25
  "@cognite/sdk": "^10.3.0",
26
- "@cognite/dune": "^0.3.7",
26
+ "@cognite/dune": "^0.4.2",
27
27
  <% if (infra === 'appsApi') { -%>
28
28
  "@cognite/app-sdk": "^0.3.0",
29
29
  <% } -%>
package/dist/cli/cli.js CHANGED
@@ -58,6 +58,6 @@ function registerSkillsCommand(parent) {
58
58
 
59
59
  // cli/cli.ts
60
60
  var program = new Command();
61
- program.name("dune").description("Build and deploy React apps to Cognite Data Fusion").version("0.4.1");
61
+ program.name("dune").description("Build and deploy React apps to Cognite Data Fusion").version("0.4.2");
62
62
  registerSkillsCommand(program);
63
63
  program.parse();
package/package.json CHANGED
@@ -1,16 +1,7 @@
1
1
  {
2
2
  "name": "@cognite/dune",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Build and deploy React apps to Cognite Data Fusion",
5
- "keywords": [
6
- "cognite",
7
- "dune",
8
- "cdf",
9
- "fusion",
10
- "react",
11
- "scaffold",
12
- "deploy"
13
- ],
14
5
  "license": "Apache-2.0",
15
6
  "author": "Cognite",
16
7
  "repository": {