@octane-xplat/patches 0.0.1 → 0.9.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 +21 -0
- package/README.md +8 -1
- package/package.json +16 -10
- package/patches/@nativescript-community__octane@0.2.4.patch +25 -0
- package/patches/@nativescript-community__vite-octane@0.2.1.patch +41 -0
- package/patches/@nativescript__core@9.1.2.patch +1415 -0
- package/patches/@nativescript__core@9.1.3-next.2.patch +428 -0
- package/patches/@nativescript__types@9.0.0.patch +93 -0
- package/patches/@nativescript__vite@8.0.13.patch +233 -0
- package/patches/@nativescript__vite@8.0.17.patch +220 -0
- package/patches/@octanejs__tiptap@0.0.51.patch +78 -0
- package/patches/@tsrx__typescript-plugin@0.4.11.patch +11 -0
- package/patches/css@3.0.0.patch +52 -0
- package/patches/linkifyjs@4.3.3.patch +73 -0
- package/patches/octane@0.6.3.patch +1307 -0
- package/index.d.ts +0 -1
- package/index.js +0 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alec Larson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
# @octane-xplat/patches
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package carries the pnpm patch files used by freshly scaffolded
|
|
4
|
+
Octane-xplat apps. It is installed as a pnpm `configDependencies` package so
|
|
5
|
+
the patches are available before regular app dependencies are installed.
|
|
6
|
+
|
|
7
|
+
The canonical patch files and their rationale live in
|
|
8
|
+
`packages/cli/patches/manifest.json`. `pnpm sync:patches` generates this
|
|
9
|
+
package's `patches/` directory from that source. Do not edit the copies here
|
|
10
|
+
by hand.
|
package/package.json
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/patches",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "pnpm config dependency carrying the framework patch files",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"framework",
|
|
7
|
+
"octane",
|
|
8
|
+
"patches",
|
|
9
|
+
"pnpm",
|
|
10
|
+
"xplat"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/octane-xplat/octane-xplat/tree/main/packages/patches",
|
|
5
13
|
"license": "MIT",
|
|
6
14
|
"repository": {
|
|
7
15
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/octane-xplat/octane-xplat
|
|
16
|
+
"url": "https://github.com/octane-xplat/octane-xplat",
|
|
9
17
|
"directory": "packages/patches"
|
|
10
18
|
},
|
|
11
|
-
"homepage": "https://github.com/octane-xplat/octane-xplat/tree/main/packages/patches",
|
|
12
|
-
"main": "./index.js",
|
|
13
|
-
"types": "./index.d.ts",
|
|
14
19
|
"files": [
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
+
"patches"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
diff --git a/dist/driver.js b/dist/driver.js
|
|
2
|
+
index c88828e30337ee566bc1a919940e58b4b0227aba..52cde3f8f8acffcc05a1db8e0fcd90515efc70f6 100644
|
|
3
|
+
--- a/dist/driver.js
|
|
4
|
+
+++ b/dist/driver.js
|
|
5
|
+
@@ -85,6 +85,11 @@ function setProp(node, view, name, value) {
|
|
6
|
+
setRenderItem(view, value ?? null, createNativeScriptRoot);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
+ // `undefined` means "prop not supplied" — skip the write. NativeScript
|
|
10
|
+
+ // native setters coerce it (e.g. editable → ios.userInteractionEnabled =
|
|
11
|
+
+ // NO) leaving dead UI that still has its JS listeners.
|
|
12
|
+
+ if (value === undefined)
|
|
13
|
+
+ return;
|
|
14
|
+
// Core raises `<name>Change` for a script write exactly as for a user
|
|
15
|
+
// edit; a controlled input must not see its own value come back as one.
|
|
16
|
+
const echo = `${name}Change`;
|
|
17
|
+
@@ -482,7 +487,7 @@ function applyCommand(container, command) {
|
|
18
|
+
}
|
|
19
|
+
export const nativeScriptDriver = {
|
|
20
|
+
id: NATIVESCRIPT_RENDERER_ID,
|
|
21
|
+
- capabilities: { text: 'host' },
|
|
22
|
+
+ capabilities: { text: 'host', visibility: true },
|
|
23
|
+
events: {
|
|
24
|
+
classify(name) {
|
|
25
|
+
if (!EVENT_PROP.test(name))
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
diff --git a/dist/server/strategy.js b/dist/server/strategy.js
|
|
2
|
+
index 7d84b37e2ed3a026da5b31c8a11027e0580877b2..f6594a913ba64837135e994cb183add13c6a0530 100644
|
|
3
|
+
--- a/dist/server/strategy.js
|
|
4
|
+
+++ b/dist/server/strategy.js
|
|
5
|
+
@@ -14,7 +14,9 @@ import { purgeTransformCachesForHotUpdate, runHotUpdatePrologue, typescriptServe
|
|
6
|
+
* otherwise the re-fetch can be served from the previous save's transform and
|
|
7
|
+
* the screen ends up one save behind.
|
|
8
|
+
*/
|
|
9
|
+
-const SCRIPT_FILE_RE = /\.(?:[mc]?[jt]sx?)$/i;
|
|
10
|
+
+// `.tsrx` is Octane's component extension — without it the deferred delta is
|
|
11
|
+
+// never emitted and component edits silently never reach the device.
|
|
12
|
+
+const SCRIPT_FILE_RE = /\.(?:[mc]?[jt]sx?|tsrx)$/i;
|
|
13
|
+
export const octaneServerStrategy = {
|
|
14
|
+
...typescriptServerStrategy,
|
|
15
|
+
flavor: 'octane',
|
|
16
|
+
@@ -24,7 +26,7 @@ export const octaneServerStrategy = {
|
|
17
|
+
if (!state)
|
|
18
|
+
return;
|
|
19
|
+
const { root, metrics, emitSummary } = state;
|
|
20
|
+
- const { moduleGraph, verbose, sharedTransformRequest } = deps;
|
|
21
|
+
+ const { moduleGraph, verbose, sharedTransformRequest, wss, isSocketClientOpen } = deps;
|
|
22
|
+
const { file, server } = ctx;
|
|
23
|
+
if (!SCRIPT_FILE_RE.test(file)) {
|
|
24
|
+
emitSummary();
|
|
25
|
+
@@ -71,6 +73,16 @@ export const octaneServerStrategy = {
|
|
26
|
+
const gm = moduleGraph.get(normalizedId);
|
|
27
|
+
if (gm)
|
|
28
|
+
moduleGraph.emitDelta([gm], []);
|
|
29
|
+
+ // The ns:hmr-delta broadcast IS the update delivery for this flavor —
|
|
30
|
+
+ // count open sockets so the always-on summary reflects reality
|
|
31
|
+
+ // instead of reporting recipients=0 for a delivered update.
|
|
32
|
+
+ try {
|
|
33
|
+
+ wss?.clients?.forEach((client) => {
|
|
34
|
+
+ if (isSocketClientOpen?.(client))
|
|
35
|
+
+ metrics.recipients += 1;
|
|
36
|
+
+ });
|
|
37
|
+
+ }
|
|
38
|
+
+ catch { }
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
if (verbose)
|