create-octane-xplat 0.18.0 → 0.20.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/README.md +2 -144
- package/compatibility.json +97 -19
- package/compatibility.ts +141 -72
- package/dist/compatibility.js +66 -26
- package/dist/index.js +127 -64
- package/dist/package-manager.js +62 -0
- package/dist/scaffold.js +377 -127
- package/index.ts +256 -154
- package/library-template/AGENTS.md +6 -4
- package/library-template/README.md +22 -18
- package/library-template/bunfig +4 -0
- package/library-template/package.json +115 -18
- package/library-template/patches/@nativescript-community__octane@0.2.5.patch +1018 -0
- package/library-template/patches/@nativescript-community__sqlite-bridge@4.1.1.patch +30 -0
- package/library-template/patches/@nativescript-community__vite-octane@0.2.1.patch +72 -0
- package/library-template/patches/@nativescript__core@9.1.3.patch +1280 -0
- package/library-template/patches/@nativescript__doctor@2.0.18.patch +13 -0
- package/library-template/patches/@nativescript__vite@8.0.20.patch +2019 -0
- package/library-template/patches/@octane-xplat__nativescript-mason-core@1.0.0-beta.7.patch +65 -0
- package/library-template/patches/@octanejs__tiptap@0.0.62.patch +12 -0
- package/library-template/patches/@sveltejs__acorn-typescript@1.0.13.patch +16 -0
- package/library-template/patches/css@3.0.0.patch +52 -0
- package/library-template/patches/octane@0.16.3.patch +1479 -0
- package/library-template/src/Badge.tsx +7 -6
- package/library-template/src/Badge.web.tsx +7 -6
- package/library-template/src/Welcome.stories.tsx +12 -0
- package/library-template/src/normalizeBadgeLabel.ts +1 -1
- package/library-template/src/props.ts +11 -11
- package/library-template/tests/normalizeBadgeLabel.test.ts +1 -1
- package/library-template/tests/packed-consumer.mjs +140 -123
- package/library-template/tsconfig.envs.json +1 -0
- package/library-template/tsconfig.json +1 -0
- package/library-template/tsconfig.types.json +15 -1
- package/library-template/tsrx-typegen.json +1 -1
- package/library-template/workshop.config.ts +3 -0
- package/package-manager.ts +93 -0
- package/package.json +70 -58
- package/scaffold.ts +1056 -526
- package/template/.agents/skills/xplat/SKILL.md +6 -6
- package/template/.agents/skills/xplat/references/components.md +1 -1
- package/template/.agents/skills/xplat/references/navigation.md +1 -1
- package/template/.agents/skills/xplat/references/styling.md +14 -14
- package/template/AGENTS.md +10 -10
- package/template/bunfig +4 -0
- package/template/gitignore +1 -0
- package/template/nativescript.config.ts +13 -16
- package/template/package.json +119 -10
- package/template/patches/@nativescript-community__octane@0.2.5.patch +1018 -0
- package/template/patches/@nativescript-community__sqlite-bridge@4.1.1.patch +30 -0
- package/template/patches/@nativescript-community__vite-octane@0.2.1.patch +72 -0
- package/template/patches/@nativescript__core@9.1.3.patch +1280 -0
- package/template/patches/@nativescript__doctor@2.0.18.patch +13 -0
- package/template/patches/@nativescript__vite@8.0.20.patch +2019 -0
- package/template/patches/@octane-xplat__nativescript-mason-core@1.0.0-beta.7.patch +65 -0
- package/template/patches/@octanejs__tiptap@0.0.62.patch +12 -0
- package/template/patches/@sveltejs__acorn-typescript@1.0.13.patch +16 -0
- package/template/patches/css@3.0.0.patch +52 -0
- package/template/patches/octane@0.16.3.patch +1479 -0
- package/template/src/App.tsrx +77 -42
- package/template/src/Welcome.stories.tsx +22 -0
- package/template/src/app.spec.tsrx +169 -163
- package/template/src/app.web.test.tsx +18 -13
- package/template/src/failure-reporting.spec.ts +3 -3
- package/template/src/main.ts +14 -13
- package/template/src/main.tsrx +2 -0
- package/template/src/main.web.tsrx +5 -5
- package/template/src/native-runtime.spec.ts +13 -11
- package/template/src/test-setup.web.ts +9 -8
- package/template/src/test.ts +6 -6
- package/template/tsconfig.json +17 -1
- package/template/vite.config.native.mts +1 -2
- package/template/vite.config.ts +29 -23
- package/template/vitest.config.mts +18 -18
- package/template/vitest.web.config.mts +7 -7
- package/template/workshop.config.ts +3 -0
- package/library-template/pnpm-workspace.yaml +0 -171
- package/template/pnpm-workspace.yaml +0 -192
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
diff --git a/platforms/ios/NSSqliteBridge.xcframework/ios-arm64/Headers/module.modulemap b/platforms/ios/NSSqliteBridge.xcframework/ios-arm64/Headers/module.modulemap
|
|
2
|
+
deleted file mode 100644
|
|
3
|
+
index 5c114bd2d94ff8e574cb6c09f5df6a85345ce2b5..0000000000000000000000000000000000000000
|
|
4
|
+
--- a/platforms/ios/NSSqliteBridge.xcframework/ios-arm64/Headers/module.modulemap
|
|
5
|
+
+++ /dev/null
|
|
6
|
+
@@ -1,4 +0,0 @@
|
|
7
|
+
-module NSSqlite {
|
|
8
|
+
- header "NSSqliteBridge.h"
|
|
9
|
+
- export *
|
|
10
|
+
-}
|
|
11
|
+
diff --git a/platforms/ios/NSSqliteBridge.xcframework/ios-arm64_x86_64-maccatalyst/Headers/module.modulemap b/platforms/ios/NSSqliteBridge.xcframework/ios-arm64_x86_64-maccatalyst/Headers/module.modulemap
|
|
12
|
+
deleted file mode 100644
|
|
13
|
+
index 5c114bd2d94ff8e574cb6c09f5df6a85345ce2b5..0000000000000000000000000000000000000000
|
|
14
|
+
--- a/platforms/ios/NSSqliteBridge.xcframework/ios-arm64_x86_64-maccatalyst/Headers/module.modulemap
|
|
15
|
+
+++ /dev/null
|
|
16
|
+
@@ -1,4 +0,0 @@
|
|
17
|
+
-module NSSqlite {
|
|
18
|
+
- header "NSSqliteBridge.h"
|
|
19
|
+
- export *
|
|
20
|
+
-}
|
|
21
|
+
diff --git a/platforms/ios/NSSqliteBridge.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap b/platforms/ios/NSSqliteBridge.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap
|
|
22
|
+
deleted file mode 100644
|
|
23
|
+
index 5c114bd2d94ff8e574cb6c09f5df6a85345ce2b5..0000000000000000000000000000000000000000
|
|
24
|
+
--- a/platforms/ios/NSSqliteBridge.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap
|
|
25
|
+
+++ /dev/null
|
|
26
|
+
@@ -1,4 +0,0 @@
|
|
27
|
+
-module NSSqlite {
|
|
28
|
+
- header "NSSqliteBridge.h"
|
|
29
|
+
- export *
|
|
30
|
+
-}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
diff --git a/dist/server/strategy.js b/dist/server/strategy.js
|
|
2
|
+
index 7d84b37e2ed3a026da5b31c8a11027e0580877b2..1943f7c05e47d95950212789f84d5b7725da9ac9 100644
|
|
3
|
+
--- a/dist/server/strategy.js
|
|
4
|
+
+++ b/dist/server/strategy.js
|
|
5
|
+
@@ -14,17 +14,26 @@ 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
|
+
+ matchesFile(id) {
|
|
17
|
+
+ // Shared sources have workspace/@fs identities rather than /src IDs.
|
|
18
|
+
+ // Source-root gating remains in runHotUpdatePrologue; dependency and
|
|
19
|
+
+ // type/test files must not enter executable transaction batches.
|
|
20
|
+
+ const clean = id.replace(/[?#].*$/, '');
|
|
21
|
+
+ return SCRIPT_FILE_RE.test(clean) && !/(?:^|\/)(?:node_modules|__tests__|__mocks__)(?:\/|$)|\.(?:spec|test)\.[^/]+$|\.d\.(?:ts|mts|cts)$/i.test(clean);
|
|
22
|
+
+ },
|
|
23
|
+
deferDeltaBroadcast: true,
|
|
24
|
+
async handleHotUpdate(ctx, deps) {
|
|
25
|
+
const state = await runHotUpdatePrologue(ctx, deps);
|
|
26
|
+
if (!state)
|
|
27
|
+
return;
|
|
28
|
+
const { root, metrics, emitSummary } = state;
|
|
29
|
+
- const { moduleGraph, verbose, sharedTransformRequest } = deps;
|
|
30
|
+
+ const { moduleGraph, verbose, sharedTransformRequest, wss, isSocketClientOpen } = deps;
|
|
31
|
+
const { file, server } = ctx;
|
|
32
|
+
if (!SCRIPT_FILE_RE.test(file)) {
|
|
33
|
+
emitSummary();
|
|
34
|
+
@@ -37,9 +46,9 @@ export const octaneServerStrategy = {
|
|
35
|
+
.normalize(path.relative(root, file))
|
|
36
|
+
.split(path.sep)
|
|
37
|
+
.join('/');
|
|
38
|
+
- const normalizedId = moduleGraph.normalizeGraphId(rel);
|
|
39
|
+
+ const normalizedId = moduleGraph.normalizeGraphId(file);
|
|
40
|
+
if (!moduleGraph.get(normalizedId)) {
|
|
41
|
+
- moduleGraph.upsert(rel, `/* octane-hmr ${Date.now()} */`, [], {
|
|
42
|
+
+ moduleGraph.upsert(normalizedId, `/* octane-hmr ${Date.now()} */`, [], {
|
|
43
|
+
emitDeltaOnInsert: true,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
@@ -51,7 +60,8 @@ export const octaneServerStrategy = {
|
|
47
|
+
label: 'octane',
|
|
48
|
+
});
|
|
49
|
+
try {
|
|
50
|
+
- const fresh = await sharedTransformRequest(rel, 30000);
|
|
51
|
+
+ const transformId = path.relative(root, file).startsWith('..' + path.sep) ? '/@fs/' + file.replace(/\\/g, '/') : rel;
|
|
52
|
+
+ const fresh = await sharedTransformRequest(transformId, 30000);
|
|
53
|
+
if (fresh?.code) {
|
|
54
|
+
const viteModule = server.moduleGraph.getModuleById(file);
|
|
55
|
+
const deps = viteModule
|
|
56
|
+
@@ -71,6 +81,16 @@ export const octaneServerStrategy = {
|
|
57
|
+
const gm = moduleGraph.get(normalizedId);
|
|
58
|
+
if (gm)
|
|
59
|
+
moduleGraph.emitDelta([gm], []);
|
|
60
|
+
+ // The ns:hmr-delta broadcast IS the update delivery for this flavor —
|
|
61
|
+
+ // count open sockets so the always-on summary reflects reality
|
|
62
|
+
+ // instead of reporting recipients=0 for a delivered update.
|
|
63
|
+
+ try {
|
|
64
|
+
+ wss?.clients?.forEach((client) => {
|
|
65
|
+
+ if (isSocketClientOpen?.(client))
|
|
66
|
+
+ metrics.recipients += 1;
|
|
67
|
+
+ });
|
|
68
|
+
+ }
|
|
69
|
+
+ catch { }
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
if (verbose)
|