Skip to content

Commit d98ac67

Browse files
committed
refactor: manifest imports
1 parent 1c7a70e commit d98ac67

32 files changed

Lines changed: 901 additions & 401 deletions

File tree

apps/dev-playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@types/react-syntax-highlighter": "^15.5.13",
3838
"@vitejs/plugin-react": "^5.0.4",
3939
"dotenv": "^16.0.0",
40-
"tsdown": "^0.15.7",
40+
"tsdown": "^0.20.3",
4141
"tsx": "^4.20.6",
4242
"vite": "npm:rolldown-vite@7.1.14"
4343
},

docs/docs/development/project-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The AppKit `server()` plugin automatically serves:
6363
"@types/react": "^19.0.0",
6464
"@types/react-dom": "^19.0.0",
6565
"@vitejs/plugin-react": "^5.1.1",
66-
"tsdown": "^0.15.7",
66+
"tsdown": "^0.20.3",
6767
"tsx": "^4.19.0",
6868
"typescript": "~5.6.0",
6969
"vite": "^7.2.4"

docs/docs/plugins/plugin-management.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sidebar_position: 6
66

77
AppKit includes a CLI for managing plugins. All commands are available under `npx @databricks/appkit plugin`.
88

9+
**Manifest convention:** A plugin directory may contain either `manifest.json` or a compiled `manifest.js` (or `manifest.cjs`). The CLI discovers both; sync, list, and validate accept either. The **add-resource** command only edits `manifest.json` in place (if your plugin uses only `manifest.js`, add resources by editing the source that produces it).
10+
911
## Create a plugin
1012

1113
Scaffold a new plugin interactively:
@@ -20,7 +22,7 @@ The wizard walks you through:
2022
- **Resources**: Which Databricks resources the plugin needs (SQL Warehouse, Secret, etc.) and whether each is required or optional
2123
- **Optional fields**: Author, version, license
2224

23-
The command generates a complete plugin scaffold with `manifest.json`, TypeScript class, and barrel exports — ready to register in your app.
25+
The command generates a complete plugin scaffold with `manifest.json` and a TypeScript plugin class that imports the manifest directly — ready to register in your app.
2426

2527
## Sync plugin manifests
2628

@@ -75,7 +77,7 @@ npx @databricks/appkit plugin list --json
7577

7678
## Add a resource to a plugin
7779

78-
Interactively add a new resource requirement to an existing plugin manifest:
80+
Interactively add a new resource requirement to an existing plugin manifest. **Requires `manifest.json`** in the plugin directory (the command edits it in place; it does not modify `manifest.js`):
7981

8082
```bash
8183
npx @databricks/appkit plugin add-resource

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"plop": "^4.0.4",
6363
"publint": "^0.3.15",
6464
"release-it": "^19.1.0",
65-
"tsdown": "^0.15.7",
65+
"tsdown": "^0.20.3",
6666
"tsx": "^4.20.6",
6767
"turbo": "^2.6.1",
6868
"typescript": "^5.6.0",

packages/appkit-ui/tsdown.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ export default defineConfig([
99
platform: "browser",
1010
minify: false,
1111
dts: {
12-
resolve: true,
12+
resolver: "oxc",
1313
},
1414
copy: [
1515
{
1616
from: "src/react/styles/globals.css",
17-
to: "dist/styles.css",
17+
to: "dist",
18+
rename: "styles.css",
1819
},
1920
],
2021
clean: false,

packages/appkit/src/connectors/lakebase/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
createLakebasePool as createLakebasePoolBase,
33
type LakebasePoolConfig,
44
} from "@databricks/lakebase";
5-
import type pg from "pg";
5+
import type { Pool } from "pg";
66
import { createLogger } from "@/logging/logger";
77

88
/**
@@ -12,9 +12,7 @@ import { createLogger } from "@/logging/logger";
1212
* @param config - Lakebase pool configuration
1313
* @returns PostgreSQL pool with appkit integration
1414
*/
15-
export function createLakebasePool(
16-
config?: Partial<LakebasePoolConfig>,
17-
): pg.Pool {
15+
export function createLakebasePool(config?: Partial<LakebasePoolConfig>): Pool {
1816
const logger = createLogger("connectors:lakebase");
1917

2018
return createLakebasePoolBase({

packages/appkit/src/plugins/analytics/analytics.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ import {
1414
} from "../../context";
1515
import { createLogger } from "../../logging/logger";
1616
import { Plugin, toPlugin } from "../../plugin";
17+
import type { PluginManifest } from "../../registry";
1718
import { queryDefaults } from "./defaults";
18-
import { analyticsManifest } from "./manifest";
19+
import manifest from "./manifest.json";
1920
import { QueryProcessor } from "./query";
2021
import type {
2122
AnalyticsQueryResponse,
@@ -29,7 +30,7 @@ export class AnalyticsPlugin extends Plugin {
2930
name = "analytics";
3031

3132
/** Plugin manifest declaring metadata and resource requirements */
32-
static manifest = analyticsManifest;
33+
static manifest = manifest as PluginManifest;
3334

3435
protected static description = "Analytics plugin for data analysis";
3536
protected declare config: IAnalyticsConfig;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from "./analytics";
2-
export * from "./manifest";
32
export * from "./types";

packages/appkit/src/plugins/analytics/manifest.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from "./lakebase";
2-
export * from "./manifest";
32
export * from "./types";

0 commit comments

Comments
 (0)