@notionhq/custom-blocks-dev-shell 0.1.16 → 0.1.17

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/dist/index.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Workers local shell</title>
7
- <script type="module" crossorigin src="/assets/index-3yGtnx4Z.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-D-pOONlZ.css">
7
+ <script type="module" crossorigin src="/assets/index-DAvvMKe4.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-D6k7cuWn.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -29,7 +29,6 @@ const TYPE_ALIASES = {
29
29
  */
30
30
  const WORKER_PREFIX = "worker_";
31
31
  export function materializeWorkerSchemaDataSources(manifest, dataDir) {
32
- mkdirSync(dataDir, { recursive: true });
33
32
  // One descriptor per data source key: databases first (source of truth for
34
33
  // anything they back), then inline block schemas for keys no database
35
34
  // provides.
@@ -63,6 +62,12 @@ export function materializeWorkerSchemaDataSources(manifest, dataDir) {
63
62
  });
64
63
  }
65
64
  }
65
+ // A worker with no data sources gets no src/data/ at all — the folder would
66
+ // only suggest the shell expects files there.
67
+ if (descriptors.size === 0) {
68
+ return;
69
+ }
70
+ mkdirSync(dataDir, { recursive: true });
66
71
  for (const [key, descriptor] of descriptors) {
67
72
  // The key is the worker's contract and lands verbatim in the file's
68
73
  // `key`; the filename is ours, so path-hostile characters (`/`, `..`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/custom-blocks-dev-shell",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Local preview shell for Notion custom block workers.",
5
5
  "license": "MIT",
6
6
  "repository": {