@octane-xplat/build 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +4 -2
- package/dist/add-worker.js +66 -0
- package/dist/build-worker.js +276 -0
- package/dist/compatibility-check.js +153 -0
- package/dist/compatibility-data/compatibility.js +106 -0
- package/dist/compatibility-data/compatibility.json +305 -0
- package/dist/compatibility.js +229 -0
- package/dist/css-layers.js +63 -0
- package/dist/css-platform.js +230 -0
- package/dist/css-platform.types.d.ts +11 -0
- package/dist/dev-inspector.web.js +125 -0
- package/dist/dev-log-client.web.js +79 -0
- package/dist/dev-log-server.js +13 -0
- package/dist/doctor-checks.js +317 -0
- package/dist/doctor-tool.js +27 -0
- package/dist/env.js +3 -0
- package/dist/fmt-plan.js +149 -0
- package/dist/fonts-worker.js +31 -0
- package/dist/fonts.js +614 -0
- package/dist/inline-stylesheets.js +37 -0
- package/dist/linux/config.js +43 -0
- package/dist/linux/host/bridge-selftest.linux.js +255 -0
- package/dist/linux/host/gjs-host.js +1412 -0
- package/dist/linux/package.js +176 -0
- package/dist/linux-gtk/vite.d.ts +23 -0
- package/dist/linux-gtk/vite.js +194 -0
- package/dist/macos/config.js +141 -0
- package/dist/macos/doctor-checks.js +58 -0
- package/dist/macos/executables.js +39 -0
- package/dist/macos/jsc-host/runtime.js +134 -0
- package/dist/macos/native.js +287 -0
- package/dist/macos/runtime-package.js +30 -0
- package/dist/macos/tab-item.js +62 -0
- package/dist/macos/vite.d.ts +21 -0
- package/dist/macos/vite.js +111 -0
- package/dist/markdown.js +11 -0
- package/dist/mason-engine.js +20 -0
- package/dist/mcp/contracts/actions.js +133 -0
- package/dist/mcp/dev-bridge.js +363 -0
- package/dist/mcp/dev-socket.js +161 -0
- package/dist/mcp/dev-stack.js +134 -0
- package/dist/mcp/inspection/dom.web.js +46 -0
- package/dist/native-regex.js +123 -0
- package/dist/package-manager.js +106 -0
- package/dist/package-root.js +48 -0
- package/dist/patches.js +356 -0
- package/dist/route-config.js +53 -0
- package/dist/route-data.js +42 -0
- package/dist/route-generator.js +514 -0
- package/dist/route-path.js +29 -0
- package/dist/route-source.js +67 -0
- package/dist/targets.js +38 -0
- package/dist/tsconfig-envs.js +287 -0
- package/dist/tsrx-leaf.js +57 -0
- package/dist/typecheck-globals/macos.d.ts +21 -0
- package/dist/typecheck-globals/native.d.ts +26 -0
- package/dist/ui/src/markdown/markdown-ast.js +33 -0
- package/dist/ui/src/markdown/markdown-character-references.js +79 -0
- package/dist/ui/src/markdown/markdown-parse.js +1930 -0
- package/dist/ui/src/markdown/markdown-plugins.js +564 -0
- package/dist/ui/src/markdown/markdown-url.js +17 -0
- package/dist/updates-worker.js +34 -0
- package/dist/upgrade-worker.js +63 -0
- package/dist/vite.d.ts +85 -0
- package/dist/vite.js +628 -0
- package/dist/workshop-worker.js +181 -0
- package/package.json +72 -5
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Keep public declarations separate from PostCSS implementation imports: consumers
|
|
2
|
+
// can resolve a different compatible PostCSS patch through Vite.
|
|
3
|
+
import type { CssPlatform } from './css-platform.types.js'
|
|
4
|
+
|
|
5
|
+
export type { CssPlatform } from './css-platform.types.js'
|
|
6
|
+
|
|
7
|
+
import type { Plugin, UserConfig } from 'vite'
|
|
8
|
+
|
|
9
|
+
/** Select platform CSS siblings and compile build-time `@platform` blocks.
|
|
10
|
+
* CSS suffixes replace the unsuffixed file; explicit platform filenames stay
|
|
11
|
+
* exact. Native presets include this automatically; web apps add
|
|
12
|
+
* `xplatCss('web')` to their Vite plugins. Defaults to `web`. */
|
|
13
|
+
export function xplatCss(platform?: CssPlatform): Plugin
|
|
14
|
+
|
|
15
|
+
/** Select platform implementations for explicit TSRX paths in a custom
|
|
16
|
+
* compiler or test setup. Standard platform presets and xplatBoundary include it.
|
|
17
|
+
* Vite 8 dependency optimization defaults to each environment's resolved extension
|
|
18
|
+
* order. Explicit optimizeDeps.rolldownOptions.resolve.extensions take precedence. */
|
|
19
|
+
export function xplatTsrx(
|
|
20
|
+
platform?:
|
|
21
|
+
| 'web'
|
|
22
|
+
| 'ios'
|
|
23
|
+
| 'android'
|
|
24
|
+
| 'macos'
|
|
25
|
+
| 'windows'
|
|
26
|
+
| 'linux'
|
|
27
|
+
| 'gtk'
|
|
28
|
+
| 'visionos'
|
|
29
|
+
| 'native',
|
|
30
|
+
): Plugin
|
|
31
|
+
|
|
32
|
+
export const nativeExtensions: string[]
|
|
33
|
+
|
|
34
|
+
/** Selects platform implementations for unsuffixed explicit `.tsrx` imports.
|
|
35
|
+
* Declaration-only contracts require a target implementation.
|
|
36
|
+
* Includes xplatTsrx and its platform-aware dependency optimization defaults.
|
|
37
|
+
* Fails `vite build` when a platform-suffixed module foreign to the target
|
|
38
|
+
* is reachable in the graph (e.g. a `.web` leaf pulled into a mobile
|
|
39
|
+
* bundle transitively — lint catches direct imports, this catches the
|
|
40
|
+
* transitive path). Warns once per module in dev. */
|
|
41
|
+
export function xplatBoundary(
|
|
42
|
+
platform?:
|
|
43
|
+
| 'web'
|
|
44
|
+
| 'ios'
|
|
45
|
+
| 'android'
|
|
46
|
+
| 'macos'
|
|
47
|
+
| 'windows'
|
|
48
|
+
| 'linux'
|
|
49
|
+
| 'gtk'
|
|
50
|
+
| 'visionos'
|
|
51
|
+
| 'native',
|
|
52
|
+
): Plugin
|
|
53
|
+
|
|
54
|
+
/** `define` entries implementing the `process.env.NODE_ENV` npm convention —
|
|
55
|
+
* upstream octane deps read it bare and assume the consumer bundler
|
|
56
|
+
* statically rewrites the member expression. Only the literal
|
|
57
|
+
* `process.env.NODE_ENV` read is covered; `process.env.FOO` or whole-object
|
|
58
|
+
* `process` reads still fail on runtimes without a `process` global. */
|
|
59
|
+
export function xplatNodeEnvDefine(mode: string): Record<string, string>
|
|
60
|
+
|
|
61
|
+
/** Development-action bridge (MCP). Dev-server middleware: the app announces
|
|
62
|
+
* its action registry and polls for invocations under /__xplat_dev__/; the
|
|
63
|
+
* MCP server discovers the endpoint through a same-uid session file under
|
|
64
|
+
* node_modules/.cache/xplat/dev-bridge/ and authenticates with the per-server
|
|
65
|
+
* token the plugin injects through a dev-only define. apply:'serve' — never
|
|
66
|
+
* part of a production build. Included automatically by xplatNative; web
|
|
67
|
+
* configs add it to `plugins` alongside xplatBoundary. */
|
|
68
|
+
export function xplatDevBridge(options?: { appRoot?: string }): Plugin
|
|
69
|
+
|
|
70
|
+
export interface XplatNativeOptions {
|
|
71
|
+
/** Extra optimizeDeps.exclude entries — app-shipped @nativescript plugins. */
|
|
72
|
+
deps?: string[]
|
|
73
|
+
/** Renderer rules override — defaults cover src/ + linked package source. */
|
|
74
|
+
rules?: unknown[]
|
|
75
|
+
/** App-specific config merged in last (plugins, server, …). */
|
|
76
|
+
extra?: UserConfig
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Full native (iOS/Android) Vite config — the shared preset. Resolves the
|
|
80
|
+
* app's own vite/vite-octane/octane toolchain (async because it loads
|
|
81
|
+
* through the app's node_modules). */
|
|
82
|
+
export function xplatNative(
|
|
83
|
+
env: { mode: string } | string,
|
|
84
|
+
opts?: XplatNativeOptions,
|
|
85
|
+
): Promise<UserConfig>
|