@protobase/cli 0.12.0 → 0.12.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.
@@ -1,6 +1,7 @@
1
1
  import { extensionImports } from "../project/extensions.js";
2
2
  import { sharedModules } from "../project/shared-modules.js";
3
3
  import { viteBundle } from "./vite-bundle.js";
4
+ import { createRequire } from "node:module";
4
5
  import path from "node:path";
5
6
  import { mkdtemp, rm } from "node:fs/promises";
6
7
  import { tmpdir } from "node:os";
@@ -18,17 +19,14 @@ const fieldsEntry = (file, code) => ({
18
19
  resolveId: (id) => id === file ? `\0${file}` : void 0,
19
20
  load: (id) => id === `\0${file}` ? code : void 0
20
21
  });
21
- const sharedFromUi = (uiDir) => ({
22
- name: "protobase-plugin-fields-shared",
23
- enforce: "pre",
24
- resolveId(id, _importer, options) {
25
- if (id === "@protobase/ui" || !sharedModules.includes(id)) return void 0;
26
- return this.resolve(id, path.join(uiDir, "package.json"), {
27
- ...options,
28
- skipSelf: true
29
- });
30
- }
31
- });
22
+ const sharedFromUi = (uiDir) => {
23
+ const require = createRequire(path.join(uiDir, "package.json"));
24
+ return {
25
+ name: "protobase-plugin-fields-shared",
26
+ enforce: "pre",
27
+ resolveId: (id) => id === "@protobase/ui" || !sharedModules.includes(id) ? void 0 : require.resolve(id)
28
+ };
29
+ };
32
30
  const isStorageTypes = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
33
31
  /**
34
32
  * The field types a plugin registers (`definePlugin({ fields })`), each with the storage types it shows (`of`), which
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.12.0";
2
+ var version = "0.12.1";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -34,11 +34,11 @@
34
34
  "dependencies": {
35
35
  "@hono/node-server": "^2.1.3",
36
36
  "@hono/vite-dev-server": "^0.26.1",
37
- "@protobase/layout": "0.12.0",
38
- "@protobase/query": "0.12.0",
39
- "@protobase/schema": "0.12.0",
40
- "@protobase/server": "0.12.0",
41
- "@protobase/ui": "0.12.0",
37
+ "@protobase/layout": "0.12.1",
38
+ "@protobase/query": "0.12.1",
39
+ "@protobase/schema": "0.12.1",
40
+ "@protobase/server": "0.12.1",
41
+ "@protobase/ui": "0.12.1",
42
42
  "@scalar/hono-api-reference": "^0.12.10",
43
43
  "@tailwindcss/vite": "^4.3.3",
44
44
  "@vitejs/plugin-react": "^6.1.2",