@notionhq/apps 0.0.1 → 0.0.3
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 +7 -11
- package/package.json +73 -73
- package/src/cli/build.test.ts +4 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
1. Install [mise](https://mise.jdx.dev/getting-started.html)
|
|
6
6
|
2. Run `mise install`
|
|
7
|
-
3. Run `mise run
|
|
7
|
+
3. Run `mise run setup`
|
|
8
8
|
4. Run `mise run check && mise run test`
|
|
9
9
|
|
|
10
10
|
The SDK requires Node 26 or newer and supports workflow capabilities only:
|
|
@@ -16,15 +16,11 @@ import { createWorkflow } from "@notionhq/apps/workflow";
|
|
|
16
16
|
|
|
17
17
|
## Publishing New Versions
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Publishing is initiated only from the GitHub Actions UI:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
mise run version:apps patch
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Then, push the commit and tag:
|
|
21
|
+
1. Open the [Publish workflow](https://github.com/makenotion/sdk/actions/workflows/publish.yml).
|
|
22
|
+
2. Select **Run workflow** on the `main` branch.
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
The workflow always increments the patch version. It builds, checks, and tests the
|
|
25
|
+
SDK before committing the new version, creating an `apps-v*` GitHub release,
|
|
26
|
+
and publishing `@notionhq/apps` to npm.
|
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
2
|
+
"name": "@notionhq/apps",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "An SDK for building workflow apps for Notion",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"notion-apps": "./dist/cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"src/",
|
|
12
|
+
"docs/",
|
|
13
|
+
"LICENSE.md",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
"./context": {
|
|
19
|
+
"types": "./dist/context.d.ts",
|
|
20
|
+
"default": "./dist/context.js"
|
|
21
|
+
},
|
|
22
|
+
"./error": {
|
|
23
|
+
"types": "./dist/error.d.ts",
|
|
24
|
+
"default": "./dist/error.js"
|
|
25
|
+
},
|
|
26
|
+
"./manifest": {
|
|
27
|
+
"types": "./dist/manifest.d.ts",
|
|
28
|
+
"default": "./dist/manifest.js"
|
|
29
|
+
},
|
|
30
|
+
"./triggers": {
|
|
31
|
+
"types": "./dist/triggers.generated.d.ts",
|
|
32
|
+
"default": "./dist/triggers.generated.js"
|
|
33
|
+
},
|
|
34
|
+
"./workflow": {
|
|
35
|
+
"types": "./dist/workflow.d.ts",
|
|
36
|
+
"default": "./dist/workflow.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "rm -rf dist && pnpm run build:types && pnpm run build:js",
|
|
44
|
+
"build:types": "tsc",
|
|
45
|
+
"build:js": "tsx scripts/build.ts",
|
|
46
|
+
"build:watch": "concurrently --group \"pnpm run build:watch:types\" \"pnpm run build:watch:js\"",
|
|
47
|
+
"build:watch:types": "tsc --watch",
|
|
48
|
+
"build:watch:js": "esbuild --watch --format=esm --outdir=dist --target=node26 --packages=external ./src/**.ts ./src/**/*.ts",
|
|
49
|
+
"generate": "tsx scripts/generate-triggers.ts",
|
|
50
|
+
"generate:check": "tsx scripts/generate-triggers.ts --check",
|
|
51
|
+
"sync:triggers": "tsx scripts/sync-triggers.ts",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"ajv": "^8.17.1",
|
|
57
|
+
"rolldown": "^1.1.5"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/node": "^26.0.0",
|
|
61
|
+
"concurrently": "^9.2.1",
|
|
62
|
+
"esbuild": "^0.27.3",
|
|
63
|
+
"tsx": "^4.20.6",
|
|
64
|
+
"typescript": "^5.9.3",
|
|
65
|
+
"vitest": "^4.0.8"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@notionhq/client": ">=2.2.15"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=26.0.0",
|
|
72
|
+
"pnpm": ">=11.24.0"
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/cli/build.test.ts
CHANGED
|
@@ -8,6 +8,9 @@ import { buildApp } from "./build.js";
|
|
|
8
8
|
|
|
9
9
|
const FIXTURES = fileURLToPath(new URL("../../test/fixtures/", import.meta.url));
|
|
10
10
|
const EXAMPLES = fileURLToPath(new URL("../../examples/", import.meta.url));
|
|
11
|
+
const { version: SDK_VERSION } = JSON.parse(
|
|
12
|
+
fs.readFileSync(fileURLToPath(new URL("../../package.json", import.meta.url)), "utf8"),
|
|
13
|
+
) as { version: string };
|
|
11
14
|
const builtDirectories: string[] = [];
|
|
12
15
|
|
|
13
16
|
function fixture(name: string): string {
|
|
@@ -35,7 +38,7 @@ describe("buildApp", () => {
|
|
|
35
38
|
const { manifest, bundlePath, manifestPath } = await buildApp(example("workflow"));
|
|
36
39
|
|
|
37
40
|
expect(manifest).toEqual({
|
|
38
|
-
sdkVersion:
|
|
41
|
+
sdkVersion: SDK_VERSION,
|
|
39
42
|
databases: [],
|
|
40
43
|
xldbs: [],
|
|
41
44
|
pacers: [],
|