@powerhousedao/reactor-api 1.20.0 → 1.20.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/CHANGELOG.md CHANGED
@@ -1,64 +1,22 @@
1
- ## 1.20.0 (2025-02-06)
1
+ ## 1.20.2 (2025-02-10)
2
2
 
3
3
  ### 🚀 Features
4
4
 
5
- - **ph-cli:** added commands alias ([6fddb07a](https://github.com/powerhouse-inc/powerhouse/commit/6fddb07a))
6
- - **reactor-local:** watch config file for external packages ([40dc9c3c](https://github.com/powerhouse-inc/powerhouse/commit/40dc9c3c))
7
- - **connect:** improved loading of external packages ([7ea94ee5](https://github.com/powerhouse-inc/powerhouse/commit/7ea94ee5))
8
- - **scalars:** improve sidebar performance ([c7a03809](https://github.com/powerhouse-inc/powerhouse/commit/c7a03809))
9
- - **ph-cli:** enable uninstall command ([#965](https://github.com/powerhouse-inc/powerhouse/pull/965))
10
- - **scalars:** preserve react directives ([b15888e7](https://github.com/powerhouse-inc/powerhouse/commit/b15888e7))
11
- - merge main into dspot-branch ([#769](https://github.com/powerhouse-inc/powerhouse/pull/769))
12
- - **scalars:** add support to include dependent areas ([b0b385d8](https://github.com/powerhouse-inc/powerhouse/commit/b0b385d8))
13
- - **scalars:** generate nanoids by default in id fields ([445ff4bf](https://github.com/powerhouse-inc/powerhouse/commit/445ff4bf))
14
- - **design-system:** update github actions ([b0d86f4c](https://github.com/powerhouse-inc/powerhouse/commit/b0d86f4c))
15
- - **scalars:** add CountryCodeField with configs, tests & base stories ([503b2408](https://github.com/powerhouse-inc/powerhouse/commit/503b2408))
16
- - **scalars:** improve protocols and url field ([6a965cf6](https://github.com/powerhouse-inc/powerhouse/commit/6a965cf6))
17
- - **scalars:** add last styles to SelectField, improve fragments & refactor ([9f03f005](https://github.com/powerhouse-inc/powerhouse/commit/9f03f005))
18
- - **scalars:** add strings styles ([58f38f9a](https://github.com/powerhouse-inc/powerhouse/commit/58f38f9a))
19
- - **scalars:** add EnumField with configs & tests ([31386853](https://github.com/powerhouse-inc/powerhouse/commit/31386853))
20
- - **scalars:** add single/multi select fields with all props & base styles ([e38ef055](https://github.com/powerhouse-inc/powerhouse/commit/e38ef055))
21
- - **scalars:** add tooltip ([e3635ed4](https://github.com/powerhouse-inc/powerhouse/commit/e3635ed4))
22
- - **scalars:** added exports for codegen ([#434](https://github.com/powerhouse-inc/powerhouse/pull/434))
23
- - **scalars:** boolean fields scafolding ([217683de](https://github.com/powerhouse-inc/powerhouse/commit/217683de))
5
+ - **design-system:** add danger zone settings page ([572345bc](https://github.com/powerhouse-inc/powerhouse/commit/572345bc))
24
6
 
25
7
  ### 🩹 Fixes
26
8
 
27
- - **reactor-api:** type error ([df877b9e](https://github.com/powerhouse-inc/powerhouse/commit/df877b9e))
28
- - **scalars:** update pnpm and commit the .yaml ([6152f641](https://github.com/powerhouse-inc/powerhouse/commit/6152f641))
29
- - **reactor-api:** docmodel graphql collisions ([84e633c1](https://github.com/powerhouse-inc/powerhouse/commit/84e633c1))
30
- - **scalars:** try to generate the lock.ymal ([49a69907](https://github.com/powerhouse-inc/powerhouse/commit/49a69907))
31
- - **scalars:** generate the .yaml ([34d8fffd](https://github.com/powerhouse-inc/powerhouse/commit/34d8fffd))
32
- - **scalars:** solving conflict with .yaml file ([3a83b86b](https://github.com/powerhouse-inc/powerhouse/commit/3a83b86b))
33
- - **connect:** docker build ([3b679117](https://github.com/powerhouse-inc/powerhouse/commit/3b679117))
34
- - **scalars:** add the .yaml ([33eecd8c](https://github.com/powerhouse-inc/powerhouse/commit/33eecd8c))
35
- - update docker publish action ([956236a1](https://github.com/powerhouse-inc/powerhouse/commit/956236a1))
36
- - **monorepo:** remove nx cloud id ([2b728067](https://github.com/powerhouse-inc/powerhouse/commit/2b728067))
37
- - **scalars:** update pnpm-lock.yaml ([787f0962](https://github.com/powerhouse-inc/powerhouse/commit/787f0962))
38
- - **design-system:** added missing deps after rebase ([04f00323](https://github.com/powerhouse-inc/powerhouse/commit/04f00323))
39
- - **switchboard-gui:** restore prev vite version ([57273e5d](https://github.com/powerhouse-inc/powerhouse/commit/57273e5d))
40
- - **scalars:** update pnpm-lock.yaml ([d0ace5e5](https://github.com/powerhouse-inc/powerhouse/commit/d0ace5e5))
41
- - **scalars:** fix snapshot tests after conflict resolution ([0fbe8a20](https://github.com/powerhouse-inc/powerhouse/commit/0fbe8a20))
42
- - **scalars:** code improvements in Radio and Radio Group components ([bd05bd49](https://github.com/powerhouse-inc/powerhouse/commit/bd05bd49))
43
- - **scalars:** missing dependency ([ef058160](https://github.com/powerhouse-inc/powerhouse/commit/ef058160))
9
+ - **reactor-api:** sanitize document model name before using it as __typename ([adcca457](https://github.com/powerhouse-inc/powerhouse/commit/adcca457))
44
10
 
45
11
  ### 🧱 Updated Dependencies
46
12
 
47
- - Updated document-model-libs to 1.131.0
48
- - Updated document-drive to 1.17.0
49
- - Updated document-model to 2.19.0
50
- - Updated @powerhousedao/scalars to 1.22.0
13
+ - Updated document-model-libs to 1.131.2
14
+ - Updated document-drive to 1.17.2
51
15
 
52
16
  ### ❤️ Thank You
53
17
 
54
- - acaldas
55
- - alejandrocabriales
56
- - Frank
57
- - Guillermo Puente @gpuente
58
- - Guillermo Puente Sandoval @gpuente
59
- - nestor
60
- - ryanwolhuter
61
- - Yasiel Cabrera
18
+ - ryanwolhuter @ryanwolhuter
19
+ - Wouter Kampmann
62
20
 
63
21
  ## 1.2.0 (2024-10-29)
64
22
 
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ import { ApolloServerPluginInlineTraceDisabled } from '@apollo/server/plugin/dis
12
12
  import bodyParser from 'body-parser';
13
13
  import cors from 'cors';
14
14
  import { buildSubgraphSchema } from '@apollo/subgraph';
15
+ import { pascalCase } from 'change-case';
15
16
  import { GraphQLError as GraphQLError$1, parse } from 'graphql';
16
17
  import { actions } from 'document-model-libs/document-drive';
17
18
  import z3, { z as z$1, ZodError as ZodError$1 } from 'zod';
@@ -14979,7 +14980,7 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
14979
14980
  const documentModels = documentDriveServer.getDocumentModels();
14980
14981
  let dmSchema = "";
14981
14982
  documentModels.forEach(({ documentModel: documentModel2 }) => {
14982
- const dmSchemaName = documentModel2.name.replaceAll(" ", "");
14983
+ const dmSchemaName = pascalCase(documentModel2.name.replaceAll("/", " "));
14983
14984
  let tmpDmSchema = `
14984
14985
  ${documentModel2.specifications.map(
14985
14986
  (specification) => specification.state.global.schema.replaceAll("scalar DateTime", "").replaceAll(/input (.*?) {[\s\S]*?}/g, "")
@@ -26107,6 +26108,9 @@ var DriveSubgraph = class extends Subgraph {
26107
26108
  );
26108
26109
  const globalState = document.state.global;
26109
26110
  if (!globalState) throw new Error("Document not found");
26111
+ const typeName = pascalCase(
26112
+ (dm?.documentModel.name || "").replaceAll("/", " ")
26113
+ );
26110
26114
  const response = {
26111
26115
  ...document,
26112
26116
  id,
@@ -26117,7 +26121,7 @@ var DriveSubgraph = class extends Subgraph {
26117
26121
  inputText: typeof op.input === "string" ? op.input : JSON.stringify(op.input)
26118
26122
  })),
26119
26123
  initialState: document.initialState.state.global,
26120
- __typename: dm?.documentModel.name
26124
+ __typename: typeName
26121
26125
  };
26122
26126
  return response;
26123
26127
  },