@cognite/dune 0.1.2 → 0.2.1

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 (39) hide show
  1. package/_templates/app/new/config/biome.json.ejs.t +54 -0
  2. package/_templates/app/new/config/components.json.ejs.t +28 -0
  3. package/_templates/app/new/config/tailwind.config.js.ejs.t +15 -0
  4. package/_templates/app/new/{tsconfig.json.ejs.t → config/tsconfig.json.ejs.t} +4 -1
  5. package/_templates/app/new/config/vite.config.ts.ejs.t +27 -0
  6. package/_templates/app/new/cursor/data-modeling.mdc.ejs.t +1996 -0
  7. package/_templates/app/new/cursor/mcp.json.ejs.t +15 -0
  8. package/_templates/app/new/cursor/rules.mdc.ejs.t +12 -0
  9. package/_templates/app/new/root/PRD.md.ejs.t +5 -0
  10. package/_templates/app/new/{package.json.ejs.t → root/package.json.ejs.t} +12 -3
  11. package/_templates/app/new/{App.test.tsx.ejs.t → src/App.test.tsx.ejs.t} +5 -5
  12. package/_templates/app/new/{App.tsx.ejs.t → src/App.tsx.ejs.t} +2 -3
  13. package/_templates/app/new/src/lib/utils.ts.ejs.t +10 -0
  14. package/_templates/app/new/{main.tsx.ejs.t → src/main.tsx.ejs.t} +2 -0
  15. package/_templates/app/new/src/styles.css.ejs.t +25 -0
  16. package/bin/auth/authentication-flow.js +89 -0
  17. package/bin/auth/callback-server.js +181 -0
  18. package/bin/auth/certificate-manager.js +81 -0
  19. package/bin/auth/client-credentials.js +240 -0
  20. package/bin/auth/oauth-client.js +92 -0
  21. package/bin/cli.js +45 -5
  22. package/bin/deploy-command.js +246 -0
  23. package/bin/deploy-interactive-command.js +382 -0
  24. package/bin/utils/crypto.js +35 -0
  25. package/dist/deploy/index.d.ts +7 -0
  26. package/dist/deploy/index.js +43 -1
  27. package/dist/vite/index.js +1 -1
  28. package/package.json +3 -2
  29. package/src/deploy/application-deployer.ts +38 -0
  30. package/src/deploy/deploy.ts +8 -0
  31. package/src/vite/fusion-open-plugin.ts +1 -1
  32. package/_templates/app/new/biome.json.ejs.t +0 -25
  33. package/_templates/app/new/vite.config.ts.ejs.t +0 -15
  34. /package/_templates/app/new/{tsconfig.node.json.ejs.t → config/tsconfig.node.json.ejs.t} +0 -0
  35. /package/_templates/app/new/{vitest.config.ts.ejs.t → config/vitest.config.ts.ejs.t} +0 -0
  36. /package/_templates/app/new/{vitest.setup.ts.ejs.t → config/vitest.setup.ts.ejs.t} +0 -0
  37. /package/_templates/app/new/{app.json.ejs.t → root/app.json.ejs.t} +0 -0
  38. /package/_templates/app/new/{gitignore.ejs.t → root/gitignore.ejs.t} +0 -0
  39. /package/_templates/app/new/{index.html.ejs.t → root/index.html.ejs.t} +0 -0
@@ -0,0 +1,54 @@
1
+ ---
2
+ to: <%= name %>/biome.json
3
+ ---
4
+ {
5
+ "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
6
+ "organizeImports": {
7
+ "enabled": true
8
+ },
9
+ "linter": {
10
+ "enabled": true,
11
+ "rules": {
12
+ "recommended": true,
13
+ "suspicious": {
14
+ "noExplicitAny": "off"
15
+ },
16
+ "style": {
17
+ "noNonNullAssertion": "off"
18
+ },
19
+ "complexity": {
20
+ "noForEach": "off"
21
+ }
22
+ }
23
+ },
24
+ "formatter": {
25
+ "enabled": true,
26
+ "indentStyle": "space",
27
+ "indentWidth": 2,
28
+ "lineWidth": 100
29
+ },
30
+ "javascript": {
31
+ "formatter": {
32
+ "quoteStyle": "double",
33
+ "trailingCommas": "es5",
34
+ "semicolons": "always"
35
+ }
36
+ },
37
+ "json": {
38
+ "formatter": {
39
+ "enabled": true
40
+ }
41
+ },
42
+ "files": {
43
+ "ignore": [
44
+ "node_modules",
45
+ "dist",
46
+ "build",
47
+ ".next",
48
+ "coverage",
49
+ "*.min.js",
50
+ "pnpm-lock.yaml"
51
+ ]
52
+ }
53
+ }
54
+
@@ -0,0 +1,28 @@
1
+ ---
2
+ to: <%= name %>/components.json
3
+ ---
4
+ {
5
+ "$schema": "https://ui.shadcn.com/schema.json",
6
+ "style": "new-york",
7
+ "rsc": false,
8
+ "tsx": true,
9
+ "tailwind": {
10
+ "config": "tailwind.config.js",
11
+ "css": "src/styles.css",
12
+ "baseColor": "zinc",
13
+ "cssVariables": true,
14
+ "prefix": ""
15
+ },
16
+ "iconLibrary": "lucide",
17
+ "aliases": {
18
+ "components": "@/components",
19
+ "utils": "@/lib/utils",
20
+ "ui": "@/components/ui",
21
+ "lib": "@/lib",
22
+ "hooks": "@/hooks"
23
+ },
24
+ "registries": {
25
+ "@aura": "https://cognitedata.github.io/aura/r/{name}.json"
26
+ }
27
+ }
28
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ to: <%= name %>/tailwind.config.js
3
+ ---
4
+ /** @type {import('tailwindcss').Config} */
5
+ export default {
6
+ content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
7
+ theme: {
8
+ extend: {},
9
+ },
10
+ plugins: [],
11
+ registries: {
12
+ "@aura": "https://cognitedata.github.io/aura/r/{name}.json",
13
+ },
14
+ };
15
+
@@ -25,7 +25,10 @@ to: <%= name %>/tsconfig.json
25
25
 
26
26
  /* Testing */
27
27
  "types": ["vitest/globals", "@testing-library/jest-dom"],
28
- "baseUrl": "."
28
+ "baseUrl": ".",
29
+ "paths": {
30
+ "@/*": ["./src/*"]
31
+ }
29
32
  },
30
33
  "include": ["src"],
31
34
  "references": [{ "path": "./tsconfig.node.json" }]
@@ -0,0 +1,27 @@
1
+ ---
2
+ to: <%= name %>/vite.config.ts
3
+ ---
4
+ import path from "node:path";
5
+ import react from "@vitejs/plugin-react";
6
+ import tailwindcss from "@tailwindcss/vite";
7
+ import { defineConfig } from "vite";
8
+ import mkcert from "vite-plugin-mkcert";
9
+
10
+ import { fusionOpenPlugin } from "@cognite/dune/vite";
11
+
12
+ export default defineConfig({
13
+ base: "./",
14
+ plugins: [react(), mkcert(), fusionOpenPlugin(), tailwindcss()],
15
+ resolve: {
16
+ alias: {
17
+ "@": path.resolve(__dirname, "./src"),
18
+ },
19
+ },
20
+ server: {
21
+ port: 3001,
22
+ },
23
+ worker: {
24
+ format: "es",
25
+ },
26
+ });
27
+