@idlizer/arktscgen 2.1.10-arktscgen-5 → 2.1.10-arktscgen-7

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.
Files changed (51) hide show
  1. package/build/libarkts-copy/generator/options.json5 +24 -47
  2. package/build/libarkts-copy/native/meson.build +29 -13
  3. package/build/libarkts-copy/native/meson_options.txt +9 -3
  4. package/build/libarkts-copy/native/mingw.cross +2 -0
  5. package/build/libarkts-copy/native/src/{bridges.cc → bridges.cpp} +31 -92
  6. package/build/libarkts-copy/native/src/{common.cc → common.cpp} +240 -107
  7. package/build/libarkts-copy/native/src/common.h +22 -22
  8. package/build/libarkts-copy/native/src/{memoryTracker.cc → memoryTracker.cpp} +45 -32
  9. package/build/libarkts-copy/package.json +13 -11
  10. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +10 -63
  11. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +9 -3
  12. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +10 -7
  13. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +14 -5
  14. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +19 -1
  15. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +4 -0
  16. package/build/libarkts-copy/src/arkts-api/index.ts +0 -2
  17. package/build/libarkts-copy/src/arkts-api/node-cache.ts +12 -3
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +1 -1
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/OverloadDeclaration.ts +29 -0
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +4 -4
  21. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +0 -16
  22. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +1 -1
  23. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +9 -9
  24. package/build/libarkts-copy/src/arkts-api/plugins.ts +113 -15
  25. package/build/libarkts-copy/src/arkts-api/static/global.ts +1 -4
  26. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +5 -5
  27. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +2 -1
  28. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +11 -43
  29. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +41 -9
  30. package/build/libarkts-copy/src/arkts-api/visitor.ts +4 -25
  31. package/build/libarkts-copy/src/checkSdk.ts +1 -1
  32. package/build/libarkts-copy/src/index.ts +1 -2
  33. package/build/libarkts-copy/src/memo-node-cache.ts +143 -0
  34. package/build/libarkts-copy/src/plugin-utils.ts +72 -40
  35. package/build/libarkts-copy/src/reexport-for-generated.ts +3 -1
  36. package/build/libarkts-copy/src/tracer.ts +2 -2
  37. package/build/libarkts-copy/src/utils.ts +10 -14
  38. package/build/libarkts-copy/tsconfig.json +0 -3
  39. package/lib/index.js +5517 -10446
  40. package/package.json +9 -7
  41. package/templates/{bridges.cc → bridges.cpp} +1 -1
  42. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +0 -45
  43. package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +0 -23
  44. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +0 -1250
  45. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +0 -125
  46. package/build/libarkts-copy/src/ts-api/index.ts +0 -27
  47. package/build/libarkts-copy/src/ts-api/static/enums.ts +0 -18
  48. package/build/libarkts-copy/src/ts-api/types.ts +0 -1075
  49. package/build/libarkts-copy/src/ts-api/utilities/private.ts +0 -292
  50. package/build/libarkts-copy/src/ts-api/utilities/public.ts +0 -55
  51. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +0 -139
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idlizer/arktscgen",
3
- "version": "2.1.10-arktscgen-5",
3
+ "version": "2.1.10-arktscgen-7",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "bin": "lib/index.js",
@@ -18,7 +18,7 @@
18
18
  "license": "Apache-2.0",
19
19
  "keywords": [],
20
20
  "dependencies": {
21
- "@idlizer/core": "2.1.10-arktscgen-5",
21
+ "@idlizer/core": "2.1.10-arktscgen-7",
22
22
  "@types/node": "^18.0.0",
23
23
  "commander": "^10.0.0",
24
24
  "typescript": "^4.9.5"
@@ -32,17 +32,19 @@
32
32
  "@types/json5": "^2.2.0",
33
33
  "@types/node": "^18.0.0",
34
34
  "json5": "^2.2.3",
35
- "source-map-support": "^0.5.21"
35
+ "source-map-support": "^0.5.21",
36
+ "rimraf": "^6.0.1"
36
37
  },
37
38
  "scripts": {
39
+ "clean": "rimraf lib build",
38
40
  "compile:core": "npm run --prefix ../core compile",
39
41
  "compile:self": "rollup -c",
40
42
  "compile": "npm run compile:core && npm run compile:self",
41
- "external:test": "npm run --prefix ../external/ui2abc/libarkts run:current",
42
- "external:clean": "rimraf ../external/ui2abc/libarkts/generated",
43
- "external:generate": "npm run compile && node . --panda-sdk-path ../external/incremental/tools/panda/node_modules/@panda/sdk/ --output-dir ../external/ui2abc/ --options-file ../external/ui2abc/libarkts/generator/options.json5 --debug --no-initialize",
43
+ "external:test": "npm run --prefix ../external/libarkts run:current",
44
+ "external:clean": "rimraf ../external/libarkts/generated",
45
+ "external:generate": "npm run compile && node . --panda-sdk-path ../external/incremental/tools/panda/node_modules/@panda/sdk/ --output-dir ../external/ui2abc/ --options-file ../external/libarkts/generator/options.json5 --debug --no-initialize",
44
46
  "all": "npm run compile && npm run external:clean && npm run external:generate && npm run external:test",
45
- "prepack": "npm run compile && mkdir -p ./build && cp -r ../external/ui2abc/libarkts ./build/libarkts-copy",
47
+ "prepack": "npm run compile && mkdir -p ./build && cp -r ../external/libarkts ./build/libarkts-copy",
46
48
  "postpack": "rimraf ./build/libarkts-copy",
47
49
  "test:pack": "node ./tools/main.mjs test-pack",
48
50
  "test:all": "npm run all && npm run test:pack",
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
2
+ * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
3
3
  * Licensed under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License.
5
5
  * You may obtain a copy of the License at
@@ -1,45 +0,0 @@
1
- /*
2
- * Copyright (c) 2024 Huawei Device Co., Ltd.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
-
16
- import { Program } from '../../../generated';
17
- import { traceGlobal } from '../../tracer';
18
-
19
- export function dumpProgramInfo(program: Program) {
20
- traceGlobal(() => `Program info:`);
21
- traceGlobal(() => `\tAbsoluteName: ${program.absoluteName}`);
22
- traceGlobal(() => `\tFileName: ${program.fileName}`);
23
- traceGlobal(() => `\tFileNameWithExtension: ${program.fileNameWithExtension}`);
24
- traceGlobal(() => `\tModuleName: ${program.moduleName}`);
25
- traceGlobal(() => `\tModulePrefix: ${program.modulePrefix}`);
26
- traceGlobal(() => `\tRelativeFilePath: ${program.relativeFilePath}`);
27
- traceGlobal(() => `\tResolvedFilePath: ${program.resolvedFilePath}`);
28
- traceGlobal(() => `\tSourceFileFolder: ${program.sourceFileFolder}`);
29
- traceGlobal(() => `\tSourceFilePath: ${program.sourceFilePath}`);
30
- }
31
-
32
- export function dumpProgramSrcFormatted(program: Program, recursive: boolean, withLines: boolean = true) {
33
- const lines = program.ast.dumpSrc();
34
- console.log(`// file: ${program.absoluteName}`);
35
- if (withLines) {
36
- console.log(
37
- lines
38
- .split('\n')
39
- .map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`)
40
- .join('\n')
41
- );
42
- } else {
43
- console.log(lines);
44
- }
45
- }
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright (c) 2025 Huawei Device Co., Ltd.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
-
16
- import { KNativePointer } from '@koalaui/interop';
17
- import { ArktsObject } from './ArktsObject';
18
-
19
- export class DiagnosticKind extends ArktsObject {
20
- constructor(peer: KNativePointer) {
21
- super(peer);
22
- }
23
- }