@xyd-js/native 0.0.0 → 0.1.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/index.d.ts +33 -7
- package/index.js +8 -0
- package/package.json +16 -10
- package/xyd-native.darwin-arm64.node +0 -0
- package/xyd-native.darwin-x64.node +0 -0
- package/xyd-native.linux-arm64-gnu.node +0 -0
- package/xyd-native.linux-x64-gnu.node +0 -0
- package/LICENSE +0 -21
package/index.d.ts
CHANGED
|
@@ -44,6 +44,14 @@ export declare function compileMdx(source: string, settingsJson: string, baseDir
|
|
|
44
44
|
*/
|
|
45
45
|
export declare function createWatcher(root: string, opts: WatchOpts, onChange: (err: Error | null, batch: JsChange[]) => void): Watcher
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Parity target: `diffIR(base, head)` from `@xyd-js/opensdk-core`.
|
|
49
|
+
*
|
|
50
|
+
* `js_name` pins the exact export name — napi would otherwise lowercase the
|
|
51
|
+
* trailing acronym to `diffIr`, and the TypeScript callers spell it `diffIR`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function diffIR(baseJson: string, headJson: string): string
|
|
54
|
+
|
|
47
55
|
/** `findIndexPage()` — "" when neither index.md nor index.mdx exists under cwd. */
|
|
48
56
|
export declare function findIndexPage(cwd: string): string
|
|
49
57
|
|
|
@@ -116,19 +124,37 @@ export declare function opencli2go(specJson: string, optionsJson?: string | unde
|
|
|
116
124
|
|
|
117
125
|
export declare function opencli2rust(specJson: string, optionsJson?: string | undefined | null): string
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
/**
|
|
128
|
+
* `specJson` is the parsed OpenCLI document; `optionsJson` is
|
|
129
|
+
* `{ regions?: string[], globalOptionsPerCommand?: boolean }`.
|
|
130
|
+
*/
|
|
131
|
+
export declare function opencliToReferences(specJson: string, optionsJson?: string | undefined | null): string
|
|
132
|
+
|
|
133
|
+
export declare function opensdkDocsDotnet(specJson: string, optionsJson?: string | undefined | null): string
|
|
134
|
+
|
|
135
|
+
export declare function opensdkDocsGo(specJson: string, optionsJson?: string | undefined | null): string
|
|
136
|
+
|
|
137
|
+
export declare function opensdkDocsJava(specJson: string, optionsJson?: string | undefined | null): string
|
|
138
|
+
|
|
139
|
+
export declare function opensdkDocsNode(specJson: string, optionsJson?: string | undefined | null): string
|
|
140
|
+
|
|
141
|
+
export declare function opensdkDocsPython(specJson: string, optionsJson?: string | undefined | null): string
|
|
142
|
+
|
|
143
|
+
export declare function opensdkDocsRuby(specJson: string, optionsJson?: string | undefined | null): string
|
|
144
|
+
|
|
145
|
+
export declare function opensdkGenerateDotnet(specJson: string, optionsJson?: string | undefined | null): string
|
|
120
146
|
|
|
121
|
-
export declare function opensdkGenerateGo(specJson: string): string
|
|
147
|
+
export declare function opensdkGenerateGo(specJson: string, optionsJson?: string | undefined | null): string
|
|
122
148
|
|
|
123
|
-
export declare function opensdkGenerateJava(specJson: string): string
|
|
149
|
+
export declare function opensdkGenerateJava(specJson: string, optionsJson?: string | undefined | null): string
|
|
124
150
|
|
|
125
|
-
export declare function opensdkGenerateNode(specJson: string): string
|
|
151
|
+
export declare function opensdkGenerateNode(specJson: string, optionsJson?: string | undefined | null): string
|
|
126
152
|
|
|
127
|
-
export declare function opensdkGeneratePython(specJson: string): string
|
|
153
|
+
export declare function opensdkGeneratePython(specJson: string, optionsJson?: string | undefined | null): string
|
|
128
154
|
|
|
129
|
-
export declare function opensdkGenerateRuby(specJson: string): string
|
|
155
|
+
export declare function opensdkGenerateRuby(specJson: string, optionsJson?: string | undefined | null): string
|
|
130
156
|
|
|
131
|
-
export declare function opensdkGenerateRust(specJson: string): string
|
|
157
|
+
export declare function opensdkGenerateRust(specJson: string, optionsJson?: string | undefined | null): string
|
|
132
158
|
|
|
133
159
|
/** pluginJsonView core: Reference[] JSON → string[] JSON. */
|
|
134
160
|
export declare function pluginJsonView(referencesJson: string): string
|
package/index.js
CHANGED
|
@@ -706,6 +706,7 @@ module.exports.buildAccessMap = nativeBinding.buildAccessMap
|
|
|
706
706
|
module.exports.classify = nativeBinding.classify
|
|
707
707
|
module.exports.compileMdx = nativeBinding.compileMdx
|
|
708
708
|
module.exports.createWatcher = nativeBinding.createWatcher
|
|
709
|
+
module.exports.diffIR = nativeBinding.diffIR
|
|
709
710
|
module.exports.findIndexPage = nativeBinding.findIndexPage
|
|
710
711
|
module.exports.frontmatterBatch = nativeBinding.frontmatterBatch
|
|
711
712
|
module.exports.getThemeColors = nativeBinding.getThemeColors
|
|
@@ -721,6 +722,13 @@ module.exports.openapi2opencliFromFile = nativeBinding.openapi2opencliFromFile
|
|
|
721
722
|
module.exports.openapi2opensdk = nativeBinding.openapi2opensdk
|
|
722
723
|
module.exports.opencli2go = nativeBinding.opencli2go
|
|
723
724
|
module.exports.opencli2rust = nativeBinding.opencli2rust
|
|
725
|
+
module.exports.opencliToReferences = nativeBinding.opencliToReferences
|
|
726
|
+
module.exports.opensdkDocsDotnet = nativeBinding.opensdkDocsDotnet
|
|
727
|
+
module.exports.opensdkDocsGo = nativeBinding.opensdkDocsGo
|
|
728
|
+
module.exports.opensdkDocsJava = nativeBinding.opensdkDocsJava
|
|
729
|
+
module.exports.opensdkDocsNode = nativeBinding.opensdkDocsNode
|
|
730
|
+
module.exports.opensdkDocsPython = nativeBinding.opensdkDocsPython
|
|
731
|
+
module.exports.opensdkDocsRuby = nativeBinding.opensdkDocsRuby
|
|
724
732
|
module.exports.opensdkGenerateDotnet = nativeBinding.opensdkGenerateDotnet
|
|
725
733
|
module.exports.opensdkGenerateGo = nativeBinding.opensdkGenerateGo
|
|
726
734
|
module.exports.opensdkGenerateJava = nativeBinding.opensdkGenerateJava
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyd-js/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "xyd Rust core (napi) — the one native module embedded into the bun-compiled binary",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -17,19 +17,25 @@
|
|
|
17
17
|
"aarch64-apple-darwin",
|
|
18
18
|
"x86_64-apple-darwin",
|
|
19
19
|
"x86_64-unknown-linux-gnu",
|
|
20
|
-
"aarch64-unknown-linux-gnu"
|
|
21
|
-
"x86_64-unknown-linux-musl",
|
|
22
|
-
"aarch64-unknown-linux-musl",
|
|
23
|
-
"x86_64-pc-windows-msvc"
|
|
20
|
+
"aarch64-unknown-linux-gnu"
|
|
24
21
|
]
|
|
25
22
|
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@napi-rs/cli": "^3.8.2"
|
|
28
|
-
},
|
|
29
23
|
"scripts": {
|
|
30
24
|
"//": "build:native (NOT build) so the default `pnpm build` fan-out skips it until Rust is wired into CI and this package is consumed (plan S5).",
|
|
31
|
-
"build:native": "napi build --platform --release",
|
|
32
|
-
"build:native:debug": "napi build --platform",
|
|
25
|
+
"build:native": "node ../../scripts/ensure-submodules.mjs && napi build --platform --release",
|
|
26
|
+
"build:native:debug": "node ../../scripts/ensure-submodules.mjs && napi build --platform",
|
|
33
27
|
"test": "pnpm build:native && node -e \"const n=require('./index.js'); if(n.classify('docs.json')!=='settings')throw new Error('classify broken'); console.log('ok:', n.hello('xyd'))\""
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@napi-rs/cli": "^3.8.2"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"optionalDependencies": {
|
|
36
|
+
"@xyd-js/native-darwin-arm64": "0.1.0",
|
|
37
|
+
"@xyd-js/native-darwin-x64": "0.1.0",
|
|
38
|
+
"@xyd-js/native-linux-x64-gnu": "0.1.0",
|
|
39
|
+
"@xyd-js/native-linux-arm64-gnu": "0.1.0"
|
|
34
40
|
}
|
|
35
41
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) LiveSession Sp.z.o.o
|
|
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 all
|
|
13
|
-
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 THE
|
|
21
|
-
SOFTWARE.
|