@reventlessdev/reventless-core 3.0.0-alpha.161 → 3.0.0-alpha.163

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
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 3.0.0-alpha.163 (2026-07-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **admin:** skip over-long Source-C subscriptions on the ApiFragmentRegistry aggregate (deploy [#6](https://github.com/ReventlessDev/reventless-core/issues/6)) ([0977120](https://github.com/ReventlessDev/reventless-core/commit/0977120d5c6cb2331d9384747d136fe99855690e))
11
+
12
+
13
+ # 3.0.0-alpha.162 (2026-07-13)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **admin:** orphan resolvers on the ApiFragmentRegistry aggregate deploy (deploy [#5](https://github.com/ReventlessDev/reventless-core/issues/5)) ([9572344](https://github.com/ReventlessDev/reventless-core/commit/95723443bad8ae8143ceaea209827ee5bd4d0ae5)), closes [#2](https://github.com/ReventlessDev/reventless-core/issues/2)
18
+
19
+
6
20
  # 3.0.0-alpha.161 (2026-07-13)
7
21
 
8
22
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-core",
3
- "version": "3.0.0-alpha.161",
3
+ "version": "3.0.0-alpha.163",
4
4
  "description": "Core package for Reventless framework",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -29,15 +29,15 @@
29
29
  "sury": "11.0.0-alpha.4",
30
30
  "uuid": "^13.0.0",
31
31
  "@reventlessdev/rescript-effect": "0.1.0-alpha.27",
32
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.7",
32
33
  "@reventlessdev/rescript-fast-csv": "1.2.0-alpha.12",
33
- "@reventlessdev/rescript-hash-object": "1.2.0-alpha.11",
34
34
  "@reventlessdev/rescript-node-streams": "1.1.0-alpha.11",
35
- "@reventlessdev/rescript-jest": "1.0.0-alpha.7",
35
+ "@reventlessdev/rescript-hash-object": "1.2.0-alpha.11",
36
36
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
37
37
  "@reventlessdev/rescript-ssh2": "1.1.0-alpha.12",
38
- "@reventlessdev/rescript-uuid": "1.1.0-alpha.15",
39
38
  "@reventlessdev/reventless-infra": "3.0.0-alpha.98",
40
39
  "@reventlessdev/reventless-interop": "3.0.0-alpha.26",
40
+ "@reventlessdev/rescript-uuid": "1.1.0-alpha.15",
41
41
  "@reventlessdev/reventless-spec": "3.0.0-alpha.76"
42
42
  },
43
43
  "devDependencies": {
@@ -132,6 +132,12 @@ let baseFragment = (~cloner: bool) => {
132
132
  // matching SDL fields, AppSync's CreateResolver fails with "Type not found".
133
133
  let (pluginAggregateSubscriptionFields, pluginAggregateSubscriptionSources) =
134
134
  Plugin_SubscriptionSchema.sourceCFields(~mutationEntries=PluginBaseFragment.pluginAggregateMutationEntries)
135
+ // The ApiFragmentRegistry aggregate's mutations go through the same CommandGenerator
136
+ // auto-flow, which creates an `on<field>` subscription resolver per mutation. On the
137
+ // static-push platform (AWS) those resolvers orphan unless the fields are declared in the
138
+ // pushed baseFragment — so generate them here too, symmetric with the Plugin aggregate.
139
+ let (apiFragmentAggregateSubscriptionFields, apiFragmentAggregateSubscriptionSources) =
140
+ Plugin_SubscriptionSchema.sourceCFields(~mutationEntries=apiFragmentRegistryMutationEntries)
135
141
  GraphQL_Stitcher.encode({
136
142
  types: parts.types
137
143
  ->Array.concat(uiFragmentSubscriptionTypes)
@@ -151,8 +157,10 @@ let baseFragment = (~cloner: bool) => {
151
157
  ->Array.concat(uiFragmentMutationFields)
152
158
  ->Array.concat(pluginStatusMutationFields),
153
159
  subscriptions: [uiFragmentSubscriptionField, pluginStatusSubscriptionField]
154
- ->Array.concat(pluginAggregateSubscriptionFields),
160
+ ->Array.concat(pluginAggregateSubscriptionFields)
161
+ ->Array.concat(apiFragmentAggregateSubscriptionFields),
155
162
  subscriptionSources: [uiFragmentSubscriptionSource, pluginStatusSubscriptionSource]
156
- ->Array.concat(pluginAggregateSubscriptionSources),
163
+ ->Array.concat(pluginAggregateSubscriptionSources)
164
+ ->Array.concat(apiFragmentAggregateSubscriptionSources),
157
165
  })
158
166
  }
@@ -93,6 +93,7 @@ function baseFragment(cloner) {
93
93
  let base = GraphQL_FragmentGenerator$ReventlessCore.generate(mutationEntries(cloner), PluginBaseFragment$ReventlessCore.queryEntries);
94
94
  let parts = GraphQL_Stitcher$ReventlessCore.decode(base);
95
95
  let match = Plugin_SubscriptionSchema$ReventlessCore.sourceCFields(PluginBaseFragment$ReventlessCore.pluginAggregateMutationEntries);
96
+ let match$1 = Plugin_SubscriptionSchema$ReventlessCore.sourceCFields(apiFragmentRegistryMutationEntries);
96
97
  return GraphQL_Stitcher$ReventlessCore.encode({
97
98
  types: parts.types.concat(uiFragmentSubscriptionTypes).concat(pluginStatusSubscriptionTypes).concat(Platform_ComponentDefinitionsApi$ReventlessCore.sdlTypes).concat(Platform_UIFragmentsApi$ReventlessCore.sdlTypes).concat(Platform_ApiFragmentsApi$ReventlessCore.sdlTypes),
98
99
  mutations: parts.mutations.concat(uiFragmentMutationFields).concat(pluginStatusMutationFields),
@@ -104,11 +105,11 @@ function baseFragment(cloner) {
104
105
  subscriptions: [
105
106
  uiFragmentSubscriptionField,
106
107
  pluginStatusSubscriptionField
107
- ].concat(match[0]),
108
+ ].concat(match[0]).concat(match$1[0]),
108
109
  subscriptionSources: [
109
110
  uiFragmentSubscriptionSource,
110
111
  pluginStatusSubscriptionSource
111
- ].concat(match[1])
112
+ ].concat(match[1]).concat(match$1[1])
112
113
  });
113
114
  }
114
115
 
@@ -30,8 +30,16 @@ let sourceCFields = (
30
30
  let fields: array<string> = []
31
31
  let sources: array<GraphQL_Stitcher.subscriptionSource> = []
32
32
  let pushField = (fieldName: string) => {
33
- fields->Array.push(` on${fieldName}(id: ID): CommandResult`)
34
- sources->Array.push({GraphQL_Stitcher.field: `on${fieldName}`, mutations: [fieldName]})
33
+ // AppSync caps subscription field names at 50 chars. A mutation whose `on<field>`
34
+ // Source-C subscription would exceed that (e.g. the admin-aggregate-convention
35
+ // `Platform_ApiFragmentRegistry_DeregisterApiFragment` → 52) simply gets NO
36
+ // mutation-triggered subscription — the field is dropped here so the pushed SDL stays
37
+ // valid, and the resolver side (CommandSubscriptionResolvers) applies the same gate so
38
+ // no orphan resolver is created. Plugin mutations are far under the cap and unaffected.
39
+ if `on${fieldName}`->String.length <= Api_Naming.appSyncSubscriptionMaxLen {
40
+ fields->Array.push(` on${fieldName}(id: ID): CommandResult`)
41
+ sources->Array.push({GraphQL_Stitcher.field: `on${fieldName}`, mutations: [fieldName]})
42
+ }
35
43
  }
36
44
  mutationEntries->Array.forEach(entry => {
37
45
  let schema = entry.commandSchema
@@ -1,16 +1,20 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
3
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
4
+ import * as Api_Naming$ReventlessCore from "../../components/Api/Api_Naming.res.mjs";
4
5
 
5
6
  function sourceCFields(mutationEntries) {
6
7
  let fields = [];
7
8
  let sources = [];
8
9
  let pushField = fieldName => {
9
- fields.push(` on` + fieldName + `(id: ID): CommandResult`);
10
- sources.push({
11
- field: `on` + fieldName,
12
- mutations: [fieldName]
13
- });
10
+ if ((`on` + fieldName).length <= Api_Naming$ReventlessCore.appSyncSubscriptionMaxLen) {
11
+ fields.push(` on` + fieldName + `(id: ID): CommandResult`);
12
+ sources.push({
13
+ field: `on` + fieldName,
14
+ mutations: [fieldName]
15
+ });
16
+ return;
17
+ }
14
18
  };
15
19
  mutationEntries.forEach(entry => {
16
20
  let schema = entry.commandSchema;
@@ -77,4 +81,4 @@ export {
77
81
  sourceAFieldsAndTypes,
78
82
  generate,
79
83
  }
80
- /* No side effect */
84
+ /* Api_Naming-ReventlessCore Not a pure module */