@protobase/cli 0.54.3 → 0.54.4

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,7 +1,7 @@
1
1
  import { bundleProtobaseVersion } from "../version/project-version.js";
2
2
  import { buildIcons } from "./app-icons.js";
3
- import { bundleLayout, bundleMigrations, bundleNodeModules, manifestFile } from "../bundle/manifest.js";
4
3
  import { protobaseFolder } from "../project/protobase-folder.js";
4
+ import { bundleLayout, bundleMigrations, bundleNodeModules, manifestFile } from "../bundle/manifest.js";
5
5
  import { buildBundlePlugins } from "./bundle-plugins.js";
6
6
  import { copyMigrations } from "./bundle-migrations.js";
7
7
  import { buildConfigBundle } from "./config-bundle.js";
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.54.3";
2
+ var version = "0.54.4";
3
3
  //#endregion
4
4
  export { version };
@@ -1,7 +1,7 @@
1
1
  import { projectPackages } from "../version/project-packages.js";
2
2
  import { uiPackageDir } from "../project/admin-app.js";
3
3
  import { layoutCheck } from "../build/layout-check.js";
4
- import { extensionImports, extensionStyles } from "../project/extensions.js";
4
+ import { extensionImports, projectStyles } from "../project/extensions.js";
5
5
  import { devHost } from "./loopback.js";
6
6
  import { frameHeaders } from "../serve/static-site.js";
7
7
  import { projectUiPlugin } from "../project/project-ui.js";
@@ -67,7 +67,7 @@ const createAppServer = (options, plugins) => {
67
67
  projectUiPlugin(options.projectDir, options.extensions),
68
68
  ...bundled ? [bundledImports(projectDirs)] : [],
69
69
  extensionImports(options.projectDir, options.extensions),
70
- extensionStyles(options.extensions),
70
+ projectStyles(options.projectDir, options.extensions),
71
71
  layoutCheck(),
72
72
  react(),
73
73
  tailwindcss()
@@ -1,4 +1,5 @@
1
1
  import { adminAppDir } from "./admin-app.js";
2
+ import { protobaseFolder } from "./protobase-folder.js";
2
3
  import { existsSync, realpathSync } from "node:fs";
3
4
  import path from "node:path";
4
5
  //#region src/project/extensions.ts
@@ -34,13 +35,19 @@ const extensionImports = (projectDir, extensions) => ({
34
35
  }
35
36
  });
36
37
  const appStyles = path.join(path.dirname(adminAppDir), "styles.css");
37
- const extensionStyles = (extensions) => ({
38
- name: "protobase-extension-styles",
38
+ const projectSources = (projectDir, extensions) => [
39
+ `@source ${JSON.stringify(projectDir)};`,
40
+ `@source not ${JSON.stringify(path.join(projectDir, "dist"))};`,
41
+ `@source not ${JSON.stringify(path.join(projectDir, protobaseFolder))};`,
42
+ ...extensions.map((extension) => `@source ${JSON.stringify(extension.dir)};`)
43
+ ];
44
+ const projectStyles = (projectDir, extensions) => ({
45
+ name: "protobase-project-styles",
39
46
  enforce: "pre",
40
47
  transform: (code, id) => {
41
- if (extensions.length === 0 || id.replace(/\?.*$/, "") !== appStyles) return void 0;
42
- return `${code}\n${extensions.map((extension) => `@source ${JSON.stringify(extension.dir)};`).join("\n")}\n`;
48
+ if (id.replace(/\?.*$/, "") !== appStyles) return void 0;
49
+ return `${code}\n${projectSources(projectDir, extensions).join("\n")}\n`;
43
50
  }
44
51
  });
45
52
  //#endregion
46
- export { extensionConfigFile, extensionImports, extensionStyles, extensionUiFile, resolveExtensions };
53
+ export { extensionConfigFile, extensionImports, extensionUiFile, projectStyles, resolveExtensions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.54.3",
3
+ "version": "0.54.4",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,12 +42,12 @@
42
42
  "dependencies": {
43
43
  "@better-auth/core": "^1.7.12",
44
44
  "@hono/node-server": "^2.1.3",
45
- "@protobase/config": "0.54.3",
46
- "@protobase/layout": "0.54.3",
47
- "@protobase/query": "0.54.3",
48
- "@protobase/schema": "0.54.3",
49
- "@protobase/server": "0.54.3",
50
- "@protobase/ui": "0.54.3",
45
+ "@protobase/config": "0.54.4",
46
+ "@protobase/layout": "0.54.4",
47
+ "@protobase/query": "0.54.4",
48
+ "@protobase/schema": "0.54.4",
49
+ "@protobase/server": "0.54.4",
50
+ "@protobase/ui": "0.54.4",
51
51
  "@react-email/render": "^2.1.0",
52
52
  "@scalar/hono-api-reference": "^0.12.10",
53
53
  "@tailwindcss/vite": "^4.3.3",