@bobbykim/manguito-cms-api 0.4.1 → 0.4.2

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.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  persistParagraphField,
8
8
  resolveRelationBareIds,
9
9
  resolveRelationField
10
- } from "./chunk-4F2CRXPG.mjs";
10
+ } from "./chunk-4Y4G564P.mjs";
11
11
 
12
12
  // src/paths.ts
13
13
  function normalizePrefix(prefix) {
@@ -2706,7 +2706,7 @@ function registerUserRoutes(app, db, requirePermission, requireHierarchy) {
2706
2706
  import { sql as sql5 } from "drizzle-orm";
2707
2707
  var API_VERSION = (() => {
2708
2708
  try {
2709
- return "0.4.1";
2709
+ return "0.4.2";
2710
2710
  } catch {
2711
2711
  return "0.0.0";
2712
2712
  }
@@ -2752,6 +2752,9 @@ function registerConfigRoute(app, config, registry, db) {
2752
2752
 
2753
2753
  // src/routes/admin/schema.ts
2754
2754
  import { sql as sql6 } from "drizzle-orm";
2755
+ function liveFields(fields) {
2756
+ return fields.filter((f) => f.removed !== true);
2757
+ }
2755
2758
  function registerSchemaRoute(app, registry, db) {
2756
2759
  app.get("/admin/api/schema", (c) => {
2757
2760
  const content_types = Object.values(registry.content_types).map((ct) => ({
@@ -2760,19 +2763,19 @@ function registerSchemaRoute(app, registry, db) {
2760
2763
  only_one: ct.only_one,
2761
2764
  ui: ct.ui,
2762
2765
  system_fields: ct.system_fields,
2763
- fields: ct.fields
2766
+ fields: liveFields(ct.fields)
2764
2767
  }));
2765
2768
  const taxonomy_types = Object.values(registry.taxonomy_types).map((tt) => ({
2766
2769
  name: tt.name,
2767
2770
  label: tt.label,
2768
2771
  system_fields: tt.system_fields,
2769
- fields: tt.fields
2772
+ fields: liveFields(tt.fields)
2770
2773
  }));
2771
2774
  const paragraph_types = Object.values(registry.paragraph_types).map((pt) => ({
2772
2775
  name: pt.name,
2773
2776
  label: pt.label,
2774
2777
  system_fields: pt.system_fields,
2775
- fields: pt.fields
2778
+ fields: liveFields(pt.fields)
2776
2779
  }));
2777
2780
  const enum_types = Object.values(registry.enum_types).map((et) => ({
2778
2781
  name: et.name,
@@ -3268,7 +3271,7 @@ function createCmsApp(options) {
3268
3271
  const gqlOptions = options.graphql;
3269
3272
  let gqlHandler = null;
3270
3273
  let initError = null;
3271
- const ready = import("./handler-7LVYEU5C.mjs").then(({ createGraphQLHandler }) => {
3274
+ const ready = import("./handler-45O5OX2C.mjs").then(({ createGraphQLHandler }) => {
3272
3275
  gqlHandler = createGraphQLHandler(registry, graphqlRepos, fieldKeyMaps, programmaticResolver, db, gqlOptions);
3273
3276
  }).catch((err) => {
3274
3277
  initError = err;