33 Star 12 Fork 15

Nikolay Igotti/idlize

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
package.json 18.14 KB
一键复制 编辑 原始数据 按行查看 历史
{
"name": "@azanat/idlize",
"version": "1.3.16+devel",
"description": "",
"main": "lib/index.js",
"bin": "lib/index.js",
"files": [
"lib/*.js",
"stdlib.d.ts",
"whitelist.json",
"peer_lib/**/*",
"templates/**/*",
"webidl2.js/dist/**/*",
"webidl2.js/package.json",
"predefined/**/*"
],
"workspaces": [
"webidl2.js",
"demos/*"
],
"license": "Apache-2.0",
"keywords": [],
"dependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
"@types/node": "^18.0.0",
"@types/webidl2": "file:webidl2.js/types",
"commander": "^10.0.0",
"comment-parser": "^1.4.1",
"cross-env": "^7.0.3",
"minimist": "^1.2.8",
"node-addon-api": "^8.0.0",
"node-api-headers": "^1.1.0",
"typescript": "^4.9.5",
"webidl2": "file:webidl2.js"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.0",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"chai": "^4.3.6",
"eslint": "^8.13.0",
"eslint-plugin-unused-imports": "^2.0.0",
"mocha": "^9.2.2",
"rollup": "^4.24.4",
"source-map-support": "^0.5.21"
},
"scripts": {
"download:sdk": "node ./download-sdk.mjs",
"upload": "npm run compile && npm run webidl2 && node tools/publish.mjs --tag next",
"webidl2": "cd ./webidl2.js && npm i && npm run build",
"setup-out": "node tools/setup/setup.mjs",
"compile": "npm run download:sdk && rollup -c",
"clean": "rimraf build dist lib generated native/build* native/lib* native/cross* native/NativeBridge* native/ace* out",
"run": "npm run compile && node . --dts2idl --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/global --input-file common.d.ts --verify-idl --common-to-attributes --docs=opt",
"run:all": "npm run compile && node . --dts2peer --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/arkui,./interface_sdk-js/api/global --verify-idl --common-to-attributes --docs=opt",
"run:xml": "npm run compile && node . --generator-target ohos --dts2peer --input-dir ./interface_sdk-js/api --input-file @ohos.xml.d.ts --output-dir ./out/xml --verify-idl --common-to-attributes --docs=none",
"run2dts": "npm run compile && node . --idl2dts --input-dir ./idl",
"dts2skoala": "npm run compile && node . --dts2skoala --input-dir ./tests/mini_skoala/build/ ",
"idl2peer:target": "node --stack_trace_limit=200 . --api-version 99 --dts2peer --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/global --output-dir ./out/ts-peers/generated",
"idl2peer:arkoala": "npm run idl2peer:target -- --generator-target arkoala --arkoala-destination out/ts-peers/generated/sig",
"idl2peer:libace": "npm run idl2peer:target -- --generator-target libace --libace-destination out/ts-peers/generated/libace",
"idl2peer:compile": "npm run compile && npm run idl2peer:libace && npm run idl2peer:arkoala && cd out/ts-peers && tsc -p . && rollup -c",
"tracker": "npm run compile && node . --dts2peer --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/global --output-dir ./doc --generator-target tracker --tracker-status ./doc/COMPONENTS_STATUS.md",
"dts2peer:all": "npm run compile && npm run dts2peer:libace && npm run dts2peer:arkoala",
"dts2peer": "npm run compile && node . --api-version 99 --dts2peer --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/global --output-dir ./out/ts-peers/generated --need-interfaces",
"lint": "npm run compile && node . --linter --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/global --input-file common.d.ts --output-dir linter --linter-whitelist whitelist.json",
"lint:all": "npm run compile && node . --linter --input-dir ./interface_sdk-js/api/@internal/component/ets/,./interface_sdk-js/api/global --output-dir out/linter --linter-whitelist whitelist.json",
"lint:test": "rimraf out/linter && npm run lint:all ; cat out/linter/histogram.txt",
"check:peers": "npm run setup-out -- --out out/ts-peers --template ts_peers && npm run idl2peer:compile",
"check:subset": "npm run compile && npm run setup-out -- --out out/ts-subset --template ts_subset && node . --api-version 99 --dts2peer --input-dir ./tests/subset/ets/,./tests/subset/resource --output-dir ./out/ts-subset/generated && cp -r tests/subset out/ts-subset/generated/tests && cd out/ts-subset && tsc -p .",
"check:subset:run": "npm run rollup:host:subset && npm run compile:native-node-host-ts-subset && node out/ts-subset/lib/main.js",
"check:peers:idl": "npm run setup-out -- --out out/ts-peers --template ts_peers && npm run idl2peer:compile && npm run compile:native-node-host-full && node tools/check-headers.mjs && node out/ts-peers/lib/main.js",
"check:peers:run": "npm run check:peers:idl",
"check:peers:roundtrip": "npm run compile && npm run setup-out -- --out=out/ts-peers --template=ts_peers && node . --dts2idl --input-dir ./interface_sdk-js/api/@internal/component/ets/ --output-dir ./out/idl --verify-idl --common-to-attributes --docs=none && node . --idl2dts --input-dir ./out/idl --output-dir ./out/dts && node --stack_trace_limit=200 . --api-version 99 --dts2peer --input-dir ./out/dts/ --output-dir ./out/ts-peers/generated && npm run compile:native-node-host-full && cd ./out/ts-peers && tsc -p . && rollup -c && node lib/main.js",
"test:subset": "npm run check:subset && mocha ./out/ts-subset/build/tests/subset/unit/",
"check:subset:fuzz": "npm run compile && npm run check:subset && node . --dts2test --input-dir ./tests/subset/ets --output-dir ./out/ts-subset/generated/fuzz && npm run compile:native-node-host-ts-subset && tsc -p ./out/ts-subset && node ./out/ts-subset/generated/fuzz",
"check:peers:native": "npm run dts2peer:all && npm run compile:native-node-host-full",
"check:arkts:subset:tsc": "npm run compile && npm run setup-out -- --out out/arkts-subset-tsc --template arkts_subset_tsc && npm run make:arkts:subset:tsc && cd out/arkts-subset-tsc && npm run compile",
"configure:native-node-host-java-subset": "cd ./native && meson setup -Dsource_set=java-subset -Devents_test=false build-node-host-java-subset",
"compile:native-node-host-java-subset": "npm run configure:native-node-host-java-subset && cd native && meson compile --verbose -C build-node-host-java-subset && meson install -C build-node-host-java-subset",
"configure:native-node-host-ts-subset": "cd ./native && meson setup -Dsource_set=ts-subset build-node-host-ts-subset",
"compile:native-node-host-ts-subset": "npm run configure:native-node-host-ts-subset && cd native && meson compile --verbose -C build-node-host-ts-subset && meson install -C build-node-host-ts-subset",
"configure:native-node-host-arkts-subset": "cd ./native && meson setup -Dsource_set=arkts-subset build-node-host-arkts-subset",
"compile:native-node-host-arkts-subset": "npm run configure:native-node-host-arkts-subset && cd native && meson compile --verbose -C build-node-host-arkts-subset && meson install -C build-node-host-arkts-subset",
"configure:native-node-host-full": "cd ./native && meson setup -Dsource_set=ts-peers build-node-host-full",
"compile:native-node-host-full": "npm run configure:native-node-host-full && cd native && meson compile --verbose -C build-node-host-full && meson install -C build-node-host-full",
"sanity": "npm run check:subset:run && npm run check:peers:run && npm run run:all && npm run lint:test && npm run make:arkts:idl",
"panda:sdk:install": "npm run panda:sdk:install --prefix external/incremental/tools/panda",
"make:arkts": "npm run compile && node . --api-version 99 --dts2peer --need-interfaces --input-dir ./tests/subset/ets --output-dir ./out/arkts-subset/generated --language arkts",
"make:arkts:idl": "npm run compile && node . --api-version 99 --dts2peer --need-interfaces --input-dir ./tests/arkts-subset/ets,./tests/arkts-subset/resource --output-dir ./out/arkts-subset/generated --language arkts",
"make:arkts:subset:tsc": "npm run compile && node . --api-version 99 --dts2peer --need-interfaces --only-integrated --input-dir ./tests/arkts-subset/ets/,./tests/arkts-subset/resource --arkoala-destination ./out/arkts-subset-tsc/generated --generator-target arkoala --language=arkts",
"make:arkts:peers": "npm run compile && node . --api-version 99 --dts2peer --need-interfaces --input-dir ./interface_sdk-js/api/@internal/component/ets/ --output-dir ./out/arkts-peers/generated --language arkts",
"compile:arkts": "bash ./external/incremental/tools/panda/arkts/arktsc --arktsconfig ./arktsconfig-subset.json --ets-module --extension sts --list-files",
"compile:arkts:compat": "cd ./external/incremental/compat/ && npm run compile:arkts",
"compile:arkts:common": "cd ./external/incremental/common/ && npm run compile:arkts",
"compile:arkts:runtime": "cd ./external/incremental/runtime/ && npm run compile:arkts && echo ATTENTION: the runtime is compiled without unmemoization here!",
"compile:arkts:interop": "cd ./external/interop/ && npm run compile:arkts && echo ATTENTION: an interop is compiled without unmemoization here!",
"compile:arkts:peers": "bash ./external/incremental/tools/panda/arkts/arktsc --arktsconfig ./arktsconfig-peers.json --ets-module --extension sts --list-files --compiler-memory-size=1073741824",
"compile:arkts:subset": "npm run make:arkts && npm run compile:arkts",
"compile:arkts:idl:subset": "npm run make:arkts:idl && npm run compile:arkts",
"compile:arkts:subset:main": "bash ./external/incremental/tools/panda/arkts/arktsc --arktsconfig ./arktsconfig-subset-main.json --extension sts --list-files",
"make:compile:arkts:peers": "npm run make:arkts:peers && npm run compile:arkts:peers",
"run:arkts-link-interfaces": "bash ./external/incremental/tools/panda/arkts/arklink --output ./out/abc-subset/sig/arkoala-arkts/arkui/src/generated/dts_interfaces.abc -- `find ./out/abc-subset/sig/arkoala-arkts/arkui/src/generated/ -name *Interfaces.abc`",
"compile:all:arkts": "npm run compile:arkts:subset && npm run compile:native-node-host-arkts-subset && npm run compile:arkts:compat && npm run compile:arkts:common && npm run compile:arkts:runtime && npm run compile:arkts:interop && npm run compile:arkts:subset:main && npm run link:incremental --prefix ./external/incremental/runtime && cp ./external/incremental/runtime/build/incremental.abc ./out/abc-subset/sig/arkoala-arkts/arkui/src/generated",
"compile:all:arkts:idl": "npm run compile:arkts:idl:subset && npm run compile:native-node-host-arkts-subset && npm run compile:arkts:compat && npm run compile:arkts:common && npm run compile:arkts:runtime && npm run compile:arkts:interop && npm run compile:arkts:subset:main",
"execute:panda": "ACE_LIBRARY_PATH=./native/build-node-host-arkts-subset LD_LIBRARY_PATH=./native bash ./external/incremental/tools/panda/arkts/ark --ark-entry-point ETSGLOBAL::main --ark-boot-files ./external/incremental/compat/build/abc/arkts/index.abc:./out/abc-subset:./external/interop/build/abc:./external/incremental/runtime/build/abc:./external/incremental/compat/build/abc:./external/incremental/common/build/abc ./out/abc-subset/sig/arkoala-arkts/arkui/src/generated/main.abc --driver-log info && echo 'Workaround: make sure compat/src/arkts/index.ts abc goes first until index.ETSGLOBAL issues is reolved'",
"run:panda": "npm run compile:all:arkts && npm run execute:panda",
"run:panda:idl": "npm run compile:all:arkts:idl && npm run execute:panda",
"run:panda:peers": "npm run make:compile:arkts:peers",
"compile:java": "npm run compile && node . --api-version 99 --dts2peer --input-dir ./tests/java-subset/ets/,./tests/java-subset/resource --output-dir ./out/java-subset/generated --language java --need-interfaces && npm run compile:native-node-host-java-subset && bash -c \"find ./out/java-subset/generated/sig/arkoala/framework/java/src/org/koalaui/arkoala/ -name *.java > ./out/java-subset/generated/sig/arkoala/framework/java/src/org/koalaui/arkoala/files.list\" && javac -sourcepath ./out/java-subset/generated/sig/arkoala/framework/java/src -d ./out/java-subset/bin @./out/java-subset/generated/sig/arkoala/framework/java/src/org/koalaui/arkoala/files.list",
"run:java": "npm run compile:java && npm run compile:native-node-host-java-subset && ACE_LIBRARY_PATH=./native java -Djava.library.path=./native -cp ./out/java-subset/bin org.koalaui.arkoala.Main",
"run:java:concurrent": "npm run compile:java && npm run compile:native-node-host-java-subset && java -Djava.library.path=./native -cp ./out/java-subset/bin org.koalaui.arkoala.Concurrent",
"compile:dummy-panda": "npm run compile:java && npm run rollup:host:subset && cross-env mode=subset rollup -c rollup.config.dummy-panda.mjs",
"run:dummy-panda:java": "npm run compile:java && npm run compile:native-node-host-java-subset && java -Djava.library.path=./native -cp ./out/java-subset/bin org.koalaui.arkoala.Application",
"run:dummy-panda:panda": "rimraf build && npm run make:arkts && bash ./external/incremental/tools/panda/arkts/arktsc --arktsconfig ./arktsconfig-application.json && npm run compile:native-node-host-arkts-subset && LD_LIBRARY_PATH=./native PANDA_LIB_PATH=./out/abc-subset/sig/arkoala-arkts/arkui/src/generated/ bash ./external/incremental/tools/panda/arkts/ark --ark-boot-files ./out/abc-subset/sig/arkoala-arkts/arkui/src/generated ./out/abc-subset/sig/arkoala-arkts/arkui/src/generated/Application.abc",
"run:app:java": "npm run compile:dummy-panda && ACE_LIBRARY_PATH=./native node lib/loader.js java",
"run:app:panda": "cross-env mode=subset rollup -c rollup.config.dummy-panda.mjs && npm run compile:all:arkts:idl && PANDA_HOME=./external/incremental/tools/panda/node_modules/@panda/sdk ACE_LIBRARY_PATH=./native node lib/loader.js panda",
"run:es2panda": "npm run compile && npm run compile:dummy-panda && node lib/loader.js es2panda",
"compile:native-ohos-subset-arm32": "npm run check:subset && node ./native/nativeBuild.mjs subset arm32",
"compile:native-ohos-subset-arm64": "npm run check:subset && node ./native/nativeBuild.mjs subset arm64",
"compile:native-ohos-full-arm32": "npm run check:peers && node ./native/nativeBuild.mjs full arm32",
"compile:native-ohos-full-arm64": "npm run check:peers && node ./native/nativeBuild.mjs full arm64",
"run:ohos-subset-arm32:perf": "npm run compile:native-ohos-subset-arm32 && node ./ohos-app/runPerf.mjs subset arm32 mock",
"run:ohos-subset-arm64:perf": "npm run compile:native-ohos-subset-arm64 && node ./ohos-app/runPerf.mjs subset arm64 mock",
"run:ohos-full-arm32:perf": "npm run compile:native-ohos-full-arm32 && node ./ohos-app/runPerf.mjs full arm32 mock",
"compile:native-ohos-subset-arm64:v8": "npm run check:subset && node ./native/nativeBuild.mjs subset arm64 v8",
"run:ohos-subset-arm64:perf:v8": "npm run compile:native-ohos-subset-arm64:v8 && node ohos-v8/runPerfOnV8.mjs subset",
"rollup:ohos:full:arm64": "npm run check:peers && cross-env mode=peers isOhos=true arch=arm64 rollup -c rollup.config.components.mjs",
"rollup:ohos:full:arm32": "npm run check:peers && cross-env mode=peers isOhos=true arch=arm rollup -c rollup.config.components.mjs",
"rollup:ohos:subset:arm64": "npm run check:subset && cross-env mode=subset isOhos=true arch=arm64 rollup -c rollup.config.components.mjs",
"rollup:ohos:subset:arm32": "npm run check:subset && cross-env mode=subset isOhos=true arch=arm rollup -c rollup.config.components.mjs",
"rollup:host:subset": "npm run check:subset && cd out/ts-subset && rollup -c",
"rollup:host:full": "npm run check:peers && cd out/ts-peers && rollup -c",
"configure:cj:native": "cd ./native && meson setup -Dsource_set=cangjie-subset -Devents_test=false -Dcallbacks_test=false build-cangjie-native-dummy",
"compile:cj:native": "npm run configure:cj:native && cd native && meson compile --verbose -C build-cangjie-native-dummy",
"run:cj": "npm run compile && node . --api-version 99 --dts2peer --need-interfaces --input-dir ./tests/cangjie-subset/ --output-dir ./out/cangjie-subset/generated --language cangjie && npm run compile:cj:native && LD_LIBRARY_PATH=./native/build-cangjie-native-dummy:$LD_LIBRARY_PATH && ACE_LIBRARY_PATH=./native/build-cangjie-native-dummy cjpm run",
"run:peers:call_log": "npm run check:peers:run && cd ./peer_lib/call_log && meson setup build && cd ./build && meson compile && ./run_call_log",
"cj": "npm run compile:cj:native && LD_LIBRARY_PATH=./native/build-cangjie-native-dummy:$LD_LIBRARY_PATH && ACE_LIBRARY_PATH=./native/build-cangjie-native-dummy cjpm run",
"external": "cd external && npm i && cd arkoala/tools/peer-generator && npm i && npm run --prefix ../../arkui-common interface-sdk:download",
"generate:ts": "npm run external && cd external/arkoala/tools/peer-generator && npm run generate:ts:current",
"generate:arkts": "npm run external && cd external/arkoala/tools/peer-generator && npm run generate:arkts:current",
"generate:all": "npm run external && cd external/arkoala/tools/peer-generator && npm run generate:all:current",
"arkoala:ts": "npm run generate:ts && npm run compile --prefix external/arkoala/arkui",
"arkoala:ts:native:arm32": "npm run generate:ts && npm run compile:native-hzvm-ohos-arm32 --prefix external/arkoala/framework",
"arkoala:ts:native:arm64": "npm run generate:ts && npm run compile:native-hzvm-ohos-arm64 --prefix external/arkoala/framework",
"arkoala:har": "npm run generate:ts && cd external && npm run arkoala:har",
"arkoala:har-arm32": "npm run generate:ts && cd external && npm run arkoala:har-arm32",
"sig:arkts:subset:clean": "cd ./external/arkoala-arkts/arkui && rm -rf src/generated/ && rm -rf build/ && rm -rf unmemoized/",
"sig:arkts:subset:copy": "npm run make:arkts:idl && cp -r ./out/arkts-subset/generated/sig/arkoala-arkts/arkui/src/generated/ ./external/arkoala-arkts/arkui/src/",
"sig:arkts:subset:compile": "cd external/arkoala-arkts/arkui && npm run compile:arkts:unmemoized",
"sig:arkts:subset:all": "npm run sig:arkts:subset:clean && npm run sig:arkts:subset:copy && npm run sig:arkts:subset:compile"
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nikolay-igotti/idlize.git
[email protected]:nikolay-igotti/idlize.git
nikolay-igotti
idlize
idlize
master

搜索帮助