react-on-rails 17.0.0-rc.9 → 17.0.1-rc.0

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/LICENSE.md CHANGED
@@ -1,39 +1,4 @@
1
- # Licensing
2
-
3
- This repository contains code under two different licenses:
4
-
5
- - **Core**: MIT License (applies to most files)
6
- - **Pro**: React on Rails Pro License (applies to specific directories)
7
-
8
- ## License Scope
9
-
10
- ### MIT Licensed Code
11
-
12
- The following directories and all their contents are licensed under the **MIT License** (see full text below):
13
-
14
- - `react_on_rails/` (entire directory, including lib/, spec/, sig/)
15
- - `packages/react-on-rails/` (entire package)
16
- - All other directories in this repository not explicitly listed as Pro-licensed
17
-
18
- ### Pro Licensed Code
19
-
20
- The following directories and all their contents are licensed under the **React on Rails Pro License**:
21
-
22
- - `packages/react-on-rails-pro/` (entire package)
23
- - `packages/react-on-rails-pro-node-renderer/` (entire package)
24
- - `react_on_rails_pro/` (entire directory)
25
-
26
- See [REACT-ON-RAILS-PRO-LICENSE.md](./REACT-ON-RAILS-PRO-LICENSE.md) for complete Pro license terms.
27
-
28
- **Important:** Pro-licensed code is included in this package but requires a valid React on Rails Pro subscription to use. Using Pro features without a valid license violates the React on Rails Pro License.
29
-
30
- ---
31
-
32
- ## MIT License
33
-
34
- This license applies to all MIT-licensed code as defined above.
35
-
36
- Copyright (c) 2017, 2018 Justin Gordon and ShakaCode
1
+ Copyright (c) 2017, 2018 Justin Gordon and ShakaCode
37
2
  Copyright (c) 2015–2025 ShakaCode, LLC
38
3
 
39
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -46,10 +11,6 @@ furnished to do so, subject to the following conditions:
46
11
  The above copyright notice and this permission notice shall be included in
47
12
  all copies or substantial portions of the Software.
48
13
 
49
- ---
50
-
51
- ## Disclaimer
52
-
53
14
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54
15
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55
16
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -57,27 +18,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57
18
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58
19
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
59
20
  SOFTWARE.
60
-
61
- ---
62
-
63
- ## React on Rails Pro License
64
-
65
- For Pro-licensed code (as defined in the "License Scope" section above), see:
66
- [REACT-ON-RAILS-PRO-LICENSE.md](./REACT-ON-RAILS-PRO-LICENSE.md)
67
-
68
- **Key Points:**
69
-
70
- - Pro features require a valid React on Rails Pro subscription for production use
71
- - Free use is permitted for educational, personal, and non-production purposes
72
- - Modifying MIT-licensed interface files is permitted under MIT terms
73
- - However, using those modifications to access Pro features without a valid license violates the Pro License
74
-
75
- ### License Validation Mechanisms
76
-
77
- **License validation mechanisms** include but are not limited to:
78
-
79
- - Runtime checks for valid Pro subscriptions
80
- - Authentication systems in `react_on_rails/lib/react_on_rails/utils.rb` and Pro TypeScript modules
81
- - The `react_on_rails_pro?` method and `rorPro` field generation
82
-
83
- While MIT-licensed code may be modified under MIT terms, using such modifications to access Pro features without a valid license violates the React on Rails Pro License.
@@ -25,7 +25,7 @@ interface Registries {
25
25
  * Base client object type that includes all core ReactOnRails methods except Pro-specific ones.
26
26
  * Derived from ReactOnRailsInternal by omitting Pro-only methods.
27
27
  */
28
- export type BaseClientObjectType = Omit<ReactOnRailsInternal, 'getOrWaitForComponent' | 'getOrWaitForStore' | 'getOrWaitForStoreGenerator' | 'reactOnRailsStoreLoaded' | 'streamServerRenderedReactComponent' | 'serverRenderRSCReactComponent' | 'addAsyncPropsCapabilityToComponentProps' | 'getOrCreateAsyncPropsManager'>;
28
+ export type BaseClientObjectType = Omit<ReactOnRailsInternal, 'getOrWaitForComponent' | 'getOrWaitForStore' | 'getOrWaitForStoreGenerator' | 'reactOnRailsStoreLoaded' | 'isServerStreamingSupported' | 'streamServerRenderedReactComponent' | 'serverRenderRSCReactComponent' | 'addAsyncPropsCapabilityToComponentProps' | 'getOrCreateAsyncPropsManager'>;
29
29
  export declare function createBaseClientObject(registries: Registries, currentObject?: BaseClientObjectType | null): BaseClientObjectType;
30
30
  export {};
31
31
  //# sourceMappingURL=client.d.ts.map
@@ -14,6 +14,7 @@ const PRO_ONLY_METHODS = [
14
14
  'getOrWaitForStore',
15
15
  'getOrWaitForStoreGenerator',
16
16
  'reactOnRailsStoreLoaded',
17
+ 'isServerStreamingSupported',
17
18
  'streamServerRenderedReactComponent',
18
19
  'serverRenderRSCReactComponent',
19
20
  'addAsyncPropsCapabilityToComponentProps',
@@ -53,6 +53,7 @@ export declare function createCoreCapability(registries: Registries): {
53
53
  getOrWaitForStore(): Promise<Store>;
54
54
  getOrWaitForStoreGenerator(): Promise<StoreGenerator>;
55
55
  reactOnRailsStoreLoaded(): Promise<void>;
56
+ isServerStreamingSupported(): boolean;
56
57
  streamServerRenderedReactComponent(...args: any[]): any;
57
58
  serverRenderRSCReactComponent(...args: any[]): any;
58
59
  addAsyncPropsCapabilityToComponentProps(...args: any[]): any;
@@ -184,6 +184,9 @@ export function createCoreCapability(registries) {
184
184
  reactOnRailsStoreLoaded() {
185
185
  throw new Error('reactOnRailsStoreLoaded requires the react-on-rails-pro package.');
186
186
  },
187
+ isServerStreamingSupported() {
188
+ throw new Error('isServerStreamingSupported requires the react-on-rails-pro package.');
189
+ },
187
190
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
188
191
  streamServerRenderedReactComponent(...args) {
189
192
  void args;
@@ -471,6 +471,10 @@ export interface ReactOnRailsInternal extends ReactOnRails {
471
471
  * Used by server rendering by Rails
472
472
  */
473
473
  serverRenderReactComponent(options: RenderParams): null | string | Promise<string>;
474
+ /**
475
+ * Used by Rails to select progressive streaming only when the installed React DOM server supports it.
476
+ */
477
+ isServerStreamingSupported(): boolean;
474
478
  /**
475
479
  * Used by server rendering by Rails
476
480
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "17.0.0-rc.9",
3
+ "version": "17.0.1-rc.0",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "lib/ReactOnRails.full.js",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "Rails"
19
19
  ],
20
20
  "author": "justin@shakacode.com",
21
- "license": "SEE LICENSE IN LICENSE.md",
21
+ "license": "MIT",
22
22
  "exports": {
23
23
  ".": {
24
24
  "default": "./lib/ReactOnRails.full.js"
@@ -69,6 +69,7 @@
69
69
  "react-dom": ">= 16"
70
70
  },
71
71
  "files": [
72
+ "LICENSE.md",
72
73
  "README.md",
73
74
  "lib/**/*.js",
74
75
  "lib/**/*.cjs",
@@ -88,7 +89,8 @@
88
89
  "build": "pnpm run clean && tsc",
89
90
  "build-watch": "pnpm run clean && tsc --watch",
90
91
  "clean": "rm -rf ./lib",
91
- "test": "jest tests",
92
+ "test": "pnpm run test:package-license && jest tests",
93
+ "test:package-license": "node scripts/check-package-license.mjs",
92
94
  "type-check": "tsc --noEmit --noErrorTruncation"
93
95
  }
94
96
  }