@alloy-js/java 0.20.0-dev.0 → 0.20.0-dev.2
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/dist/src/builtins/index.js +2 -1
- package/dist/src/builtins/index.js.map +1 -0
- package/dist/src/builtins/util.js +2 -1
- package/dist/src/builtins/util.js.map +1 -0
- package/dist/src/components/Annotation.js +2 -1
- package/dist/src/components/Annotation.js.map +1 -0
- package/dist/src/components/ArgumentList.js +2 -1
- package/dist/src/components/ArgumentList.js.map +1 -0
- package/dist/src/components/Class.d.ts.map +1 -1
- package/dist/src/components/Class.js +5 -4
- package/dist/src/components/Class.js.map +1 -0
- package/dist/src/components/Constructor.js +2 -1
- package/dist/src/components/Constructor.js.map +1 -0
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +8 -2
- package/dist/src/components/Declaration.js.map +1 -0
- package/dist/src/components/Enum.d.ts.map +1 -1
- package/dist/src/components/Enum.js +5 -4
- package/dist/src/components/Enum.js.map +1 -0
- package/dist/src/components/ExtendsClause.js +2 -1
- package/dist/src/components/ExtendsClause.js.map +1 -0
- package/dist/src/components/ImplementsClause.js +2 -1
- package/dist/src/components/ImplementsClause.js.map +1 -0
- package/dist/src/components/ImportStatement.js +2 -1
- package/dist/src/components/ImportStatement.js.map +1 -0
- package/dist/src/components/Interface.d.ts.map +1 -1
- package/dist/src/components/Interface.js +5 -4
- package/dist/src/components/Interface.js.map +1 -0
- package/dist/src/components/LexicalScope.d.ts +8 -0
- package/dist/src/components/LexicalScope.d.ts.map +1 -0
- package/dist/src/components/LexicalScope.js +24 -0
- package/dist/src/components/LexicalScope.js.map +1 -0
- package/dist/src/components/MavenProject.js +2 -1
- package/dist/src/components/MavenProject.js.map +1 -0
- package/dist/src/components/Method.js +2 -1
- package/dist/src/components/Method.js.map +1 -0
- package/dist/src/components/Modifiers.js +2 -1
- package/dist/src/components/Modifiers.js.map +1 -0
- package/dist/src/components/Name.js +2 -1
- package/dist/src/components/Name.js.map +1 -0
- package/dist/src/components/NamedArgumentList.js +2 -1
- package/dist/src/components/NamedArgumentList.js.map +1 -0
- package/dist/src/components/ObjectDeclaration.js +2 -1
- package/dist/src/components/ObjectDeclaration.js.map +1 -0
- package/dist/src/components/PackageDirectory.d.ts.map +1 -1
- package/dist/src/components/PackageDirectory.js +5 -3
- package/dist/src/components/PackageDirectory.js.map +1 -0
- package/dist/src/components/Parameters.js +2 -1
- package/dist/src/components/Parameters.js.map +1 -0
- package/dist/src/components/ProjectDirectory.js +2 -1
- package/dist/src/components/ProjectDirectory.js.map +1 -0
- package/dist/src/components/Reference.js +2 -1
- package/dist/src/components/Reference.js.map +1 -0
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js +5 -4
- package/dist/src/components/SourceFile.js.map +1 -0
- package/dist/src/components/TypeArguments.js +2 -1
- package/dist/src/components/TypeArguments.js.map +1 -0
- package/dist/src/components/TypeParameters.js +2 -1
- package/dist/src/components/TypeParameters.js.map +1 -0
- package/dist/src/components/Value.js +2 -1
- package/dist/src/components/Value.js.map +1 -0
- package/dist/src/components/Variable.js +2 -1
- package/dist/src/components/Variable.js.map +1 -0
- package/dist/src/components/index.js +2 -1
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/stc/index.js +2 -1
- package/dist/src/components/stc/index.js.map +1 -0
- package/dist/src/create-library.d.ts.map +1 -1
- package/dist/src/create-library.js +5 -6
- package/dist/src/create-library.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -0
- package/dist/src/name-policy.js +2 -1
- package/dist/src/name-policy.js.map +1 -0
- package/dist/src/symbols/index.d.ts +1 -0
- package/dist/src/symbols/index.d.ts.map +1 -1
- package/dist/src/symbols/index.js +3 -1
- package/dist/src/symbols/index.js.map +1 -0
- package/dist/src/symbols/java-lexical-scope.d.ts +6 -0
- package/dist/src/symbols/java-lexical-scope.d.ts.map +1 -0
- package/dist/src/symbols/java-lexical-scope.js +8 -0
- package/dist/src/symbols/java-lexical-scope.js.map +1 -0
- package/dist/src/symbols/java-output-symbol.d.ts +4 -2
- package/dist/src/symbols/java-output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/java-output-symbol.js +15 -3
- package/dist/src/symbols/java-output-symbol.js.map +1 -0
- package/dist/src/symbols/java-package-scope.d.ts +2 -0
- package/dist/src/symbols/java-package-scope.d.ts.map +1 -1
- package/dist/src/symbols/java-package-scope.js +6 -1
- package/dist/src/symbols/java-package-scope.js.map +1 -0
- package/dist/src/symbols/java-project-scope.js +3 -2
- package/dist/src/symbols/java-project-scope.js.map +1 -0
- package/dist/src/symbols/reference.js +4 -3
- package/dist/src/symbols/reference.js.map +1 -0
- package/dist/src/symbols/scopes.js +2 -1
- package/dist/src/symbols/scopes.js.map +1 -0
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +13 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/test/annotation.test.js +2 -1
- package/dist/test/annotation.test.js.map +1 -0
- package/dist/test/class.test.js +2 -1
- package/dist/test/class.test.js.map +1 -0
- package/dist/test/constructor.test.js +6 -5
- package/dist/test/constructor.test.js.map +1 -0
- package/dist/test/enum.test.js +2 -1
- package/dist/test/enum.test.js.map +1 -0
- package/dist/test/externals.test.js +5 -7
- package/dist/test/externals.test.js.map +1 -0
- package/dist/test/interface.test.js +2 -1
- package/dist/test/interface.test.js.map +1 -0
- package/dist/test/maven.test.js +8 -10
- package/dist/test/maven.test.js.map +1 -0
- package/dist/test/method.test.js +5 -4
- package/dist/test/method.test.js.map +1 -0
- package/dist/test/package.test.js +2 -1
- package/dist/test/package.test.js.map +1 -0
- package/dist/test/reference.test.js +2 -1
- package/dist/test/reference.test.js.map +1 -0
- package/dist/test/type-arguments.test.js +2 -1
- package/dist/test/type-arguments.test.js.map +1 -0
- package/dist/test/utils.js +10 -3
- package/dist/test/utils.js.map +1 -0
- package/dist/test/values.test.js +2 -1
- package/dist/test/values.test.js.map +1 -0
- package/dist/test/variables.test.js +5 -4
- package/dist/test/variables.test.js.map +1 -0
- package/dist/test/vitest.setup.d.ts +2 -0
- package/dist/test/vitest.setup.d.ts.map +1 -0
- package/dist/test/vitest.setup.js +2 -0
- package/dist/test/vitest.setup.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/components/Class.tsx +4 -3
- package/src/components/Declaration.tsx +7 -1
- package/src/components/Enum.tsx +4 -3
- package/src/components/Interface.tsx +4 -3
- package/src/components/LexicalScope.tsx +31 -0
- package/src/components/PackageDirectory.tsx +3 -1
- package/src/components/SourceFile.tsx +2 -4
- package/src/create-library.ts +2 -4
- package/src/index.ts +1 -0
- package/src/symbols/index.ts +1 -0
- package/src/symbols/java-lexical-scope.ts +9 -0
- package/src/symbols/java-output-symbol.ts +24 -3
- package/src/symbols/java-package-scope.ts +6 -0
- package/src/symbols/java-project-scope.ts +1 -1
- package/src/symbols/reference.ts +2 -2
- package/src/utils.ts +17 -0
- package/temp/api.json +290 -3
- package/test/constructor.test.tsx +7 -7
- package/test/externals.test.tsx +3 -7
- package/test/maven.test.tsx +6 -11
- package/test/method.test.tsx +5 -5
- package/test/utils.tsx +2 -2
- package/test/variables.test.tsx +5 -5
- package/test/vitest.setup.ts +1 -0
- package/tsconfig.json +1 -0
- package/tsdoc-metadata.json +1 -1
- package/vitest.config.ts +3 -0
- package/dist/test/vitest.d.js +0 -1
- package/test/vitest.d.ts +0 -10
package/temp/api.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.52.
|
|
4
|
+
"toolVersion": "7.52.9",
|
|
5
5
|
"schemaVersion": 1011,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -2350,6 +2350,103 @@
|
|
|
2350
2350
|
"endIndex": 2
|
|
2351
2351
|
}
|
|
2352
2352
|
},
|
|
2353
|
+
{
|
|
2354
|
+
"kind": "Class",
|
|
2355
|
+
"canonicalReference": "@alloy-js/java!JavaLexicalScope:class",
|
|
2356
|
+
"docComment": "",
|
|
2357
|
+
"excerptTokens": [
|
|
2358
|
+
{
|
|
2359
|
+
"kind": "Content",
|
|
2360
|
+
"text": "export declare class JavaLexicalScope extends "
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"kind": "Reference",
|
|
2364
|
+
"text": "OutputScope",
|
|
2365
|
+
"canonicalReference": "@alloy-js/core!OutputScope:class"
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"kind": "Content",
|
|
2369
|
+
"text": " "
|
|
2370
|
+
}
|
|
2371
|
+
],
|
|
2372
|
+
"fileUrlPath": "src/symbols/java-lexical-scope.ts",
|
|
2373
|
+
"releaseTag": "Public",
|
|
2374
|
+
"isAbstract": false,
|
|
2375
|
+
"name": "JavaLexicalScope",
|
|
2376
|
+
"preserveMemberOrder": false,
|
|
2377
|
+
"members": [
|
|
2378
|
+
{
|
|
2379
|
+
"kind": "Property",
|
|
2380
|
+
"canonicalReference": "@alloy-js/java!JavaLexicalScope.declarationSpaces:member",
|
|
2381
|
+
"docComment": "",
|
|
2382
|
+
"excerptTokens": [
|
|
2383
|
+
{
|
|
2384
|
+
"kind": "Content",
|
|
2385
|
+
"text": "static readonly declarationSpaces: "
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
"kind": "Content",
|
|
2389
|
+
"text": "string[]"
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
"kind": "Content",
|
|
2393
|
+
"text": ";"
|
|
2394
|
+
}
|
|
2395
|
+
],
|
|
2396
|
+
"isReadonly": true,
|
|
2397
|
+
"isOptional": false,
|
|
2398
|
+
"releaseTag": "Public",
|
|
2399
|
+
"name": "declarationSpaces",
|
|
2400
|
+
"propertyTypeTokenRange": {
|
|
2401
|
+
"startIndex": 1,
|
|
2402
|
+
"endIndex": 2
|
|
2403
|
+
},
|
|
2404
|
+
"isStatic": true,
|
|
2405
|
+
"isProtected": false,
|
|
2406
|
+
"isAbstract": false
|
|
2407
|
+
},
|
|
2408
|
+
{
|
|
2409
|
+
"kind": "Property",
|
|
2410
|
+
"canonicalReference": "@alloy-js/java!JavaLexicalScope#symbols:member",
|
|
2411
|
+
"docComment": "",
|
|
2412
|
+
"excerptTokens": [
|
|
2413
|
+
{
|
|
2414
|
+
"kind": "Content",
|
|
2415
|
+
"text": "get symbols(): "
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"kind": "Content",
|
|
2419
|
+
"text": "import(\"@alloy-js/core\")."
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
"kind": "Reference",
|
|
2423
|
+
"text": "OutputSpace",
|
|
2424
|
+
"canonicalReference": "@alloy-js/core!OutputSpace:type"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"kind": "Content",
|
|
2428
|
+
"text": ";"
|
|
2429
|
+
}
|
|
2430
|
+
],
|
|
2431
|
+
"isReadonly": true,
|
|
2432
|
+
"isOptional": false,
|
|
2433
|
+
"releaseTag": "Public",
|
|
2434
|
+
"name": "symbols",
|
|
2435
|
+
"propertyTypeTokenRange": {
|
|
2436
|
+
"startIndex": 1,
|
|
2437
|
+
"endIndex": 3
|
|
2438
|
+
},
|
|
2439
|
+
"isStatic": false,
|
|
2440
|
+
"isProtected": false,
|
|
2441
|
+
"isAbstract": false
|
|
2442
|
+
}
|
|
2443
|
+
],
|
|
2444
|
+
"extendsTokenRange": {
|
|
2445
|
+
"startIndex": 1,
|
|
2446
|
+
"endIndex": 2
|
|
2447
|
+
},
|
|
2448
|
+
"implementsTokenRanges": []
|
|
2449
|
+
},
|
|
2353
2450
|
{
|
|
2354
2451
|
"kind": "TypeAlias",
|
|
2355
2452
|
"canonicalReference": "@alloy-js/java!JavaOutputScope:type",
|
|
@@ -2424,6 +2521,28 @@
|
|
|
2424
2521
|
"kind": "Content",
|
|
2425
2522
|
"text": "string"
|
|
2426
2523
|
},
|
|
2524
|
+
{
|
|
2525
|
+
"kind": "Content",
|
|
2526
|
+
"text": ", spaces: "
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
"kind": "Reference",
|
|
2530
|
+
"text": "OutputSpace",
|
|
2531
|
+
"canonicalReference": "@alloy-js/core!OutputSpace:type"
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
"kind": "Content",
|
|
2535
|
+
"text": "[] | "
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"kind": "Reference",
|
|
2539
|
+
"text": "OutputSpace",
|
|
2540
|
+
"canonicalReference": "@alloy-js/core!OutputSpace:type"
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"kind": "Content",
|
|
2544
|
+
"text": " | undefined"
|
|
2545
|
+
},
|
|
2427
2546
|
{
|
|
2428
2547
|
"kind": "Content",
|
|
2429
2548
|
"text": ", options?: "
|
|
@@ -2451,15 +2570,85 @@
|
|
|
2451
2570
|
"isOptional": false
|
|
2452
2571
|
},
|
|
2453
2572
|
{
|
|
2454
|
-
"parameterName": "
|
|
2573
|
+
"parameterName": "spaces",
|
|
2455
2574
|
"parameterTypeTokenRange": {
|
|
2456
2575
|
"startIndex": 3,
|
|
2457
|
-
"endIndex":
|
|
2576
|
+
"endIndex": 7
|
|
2577
|
+
},
|
|
2578
|
+
"isOptional": false
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
"parameterName": "options",
|
|
2582
|
+
"parameterTypeTokenRange": {
|
|
2583
|
+
"startIndex": 8,
|
|
2584
|
+
"endIndex": 9
|
|
2458
2585
|
},
|
|
2459
2586
|
"isOptional": true
|
|
2460
2587
|
}
|
|
2461
2588
|
]
|
|
2462
2589
|
},
|
|
2590
|
+
{
|
|
2591
|
+
"kind": "Method",
|
|
2592
|
+
"canonicalReference": "@alloy-js/java!JavaOutputSymbol#copy:member(1)",
|
|
2593
|
+
"docComment": "",
|
|
2594
|
+
"excerptTokens": [
|
|
2595
|
+
{
|
|
2596
|
+
"kind": "Content",
|
|
2597
|
+
"text": "copy(): "
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"kind": "Reference",
|
|
2601
|
+
"text": "JavaOutputSymbol",
|
|
2602
|
+
"canonicalReference": "@alloy-js/java!JavaOutputSymbol:class"
|
|
2603
|
+
},
|
|
2604
|
+
{
|
|
2605
|
+
"kind": "Content",
|
|
2606
|
+
"text": ";"
|
|
2607
|
+
}
|
|
2608
|
+
],
|
|
2609
|
+
"isStatic": false,
|
|
2610
|
+
"returnTypeTokenRange": {
|
|
2611
|
+
"startIndex": 1,
|
|
2612
|
+
"endIndex": 2
|
|
2613
|
+
},
|
|
2614
|
+
"releaseTag": "Public",
|
|
2615
|
+
"isProtected": false,
|
|
2616
|
+
"overloadIndex": 1,
|
|
2617
|
+
"parameters": [],
|
|
2618
|
+
"isOptional": false,
|
|
2619
|
+
"isAbstract": false,
|
|
2620
|
+
"name": "copy"
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
"kind": "Property",
|
|
2624
|
+
"canonicalReference": "@alloy-js/java!JavaOutputSymbol.memberSpaces:member",
|
|
2625
|
+
"docComment": "",
|
|
2626
|
+
"excerptTokens": [
|
|
2627
|
+
{
|
|
2628
|
+
"kind": "Content",
|
|
2629
|
+
"text": "static memberSpaces: "
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
"kind": "Content",
|
|
2633
|
+
"text": "readonly [\"static\", \"instance\"]"
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
"kind": "Content",
|
|
2637
|
+
"text": ";"
|
|
2638
|
+
}
|
|
2639
|
+
],
|
|
2640
|
+
"isReadonly": false,
|
|
2641
|
+
"isOptional": false,
|
|
2642
|
+
"releaseTag": "Public",
|
|
2643
|
+
"name": "memberSpaces",
|
|
2644
|
+
"propertyTypeTokenRange": {
|
|
2645
|
+
"startIndex": 1,
|
|
2646
|
+
"endIndex": 2
|
|
2647
|
+
},
|
|
2648
|
+
"isStatic": true,
|
|
2649
|
+
"isProtected": false,
|
|
2650
|
+
"isAbstract": false
|
|
2651
|
+
},
|
|
2463
2652
|
{
|
|
2464
2653
|
"kind": "Property",
|
|
2465
2654
|
"canonicalReference": "@alloy-js/java!JavaOutputSymbol#package:member",
|
|
@@ -2581,6 +2770,36 @@
|
|
|
2581
2770
|
"name": "JavaPackageScope",
|
|
2582
2771
|
"preserveMemberOrder": false,
|
|
2583
2772
|
"members": [
|
|
2773
|
+
{
|
|
2774
|
+
"kind": "Property",
|
|
2775
|
+
"canonicalReference": "@alloy-js/java!JavaPackageScope.declarationSpaces:member",
|
|
2776
|
+
"docComment": "",
|
|
2777
|
+
"excerptTokens": [
|
|
2778
|
+
{
|
|
2779
|
+
"kind": "Content",
|
|
2780
|
+
"text": "static readonly declarationSpaces: "
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
"kind": "Content",
|
|
2784
|
+
"text": "readonly [\"symbols\"]"
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
"kind": "Content",
|
|
2788
|
+
"text": ";"
|
|
2789
|
+
}
|
|
2790
|
+
],
|
|
2791
|
+
"isReadonly": true,
|
|
2792
|
+
"isOptional": false,
|
|
2793
|
+
"releaseTag": "Public",
|
|
2794
|
+
"name": "declarationSpaces",
|
|
2795
|
+
"propertyTypeTokenRange": {
|
|
2796
|
+
"startIndex": 1,
|
|
2797
|
+
"endIndex": 2
|
|
2798
|
+
},
|
|
2799
|
+
"isStatic": true,
|
|
2800
|
+
"isProtected": false,
|
|
2801
|
+
"isAbstract": false
|
|
2802
|
+
},
|
|
2584
2803
|
{
|
|
2585
2804
|
"kind": "Property",
|
|
2586
2805
|
"canonicalReference": "@alloy-js/java!JavaPackageScope#kind:member",
|
|
@@ -2610,6 +2829,41 @@
|
|
|
2610
2829
|
"isStatic": false,
|
|
2611
2830
|
"isProtected": false,
|
|
2612
2831
|
"isAbstract": false
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
"kind": "Property",
|
|
2835
|
+
"canonicalReference": "@alloy-js/java!JavaPackageScope#symbols:member",
|
|
2836
|
+
"docComment": "",
|
|
2837
|
+
"excerptTokens": [
|
|
2838
|
+
{
|
|
2839
|
+
"kind": "Content",
|
|
2840
|
+
"text": "get symbols(): "
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
"kind": "Content",
|
|
2844
|
+
"text": "import(\"@alloy-js/core\")."
|
|
2845
|
+
},
|
|
2846
|
+
{
|
|
2847
|
+
"kind": "Reference",
|
|
2848
|
+
"text": "OutputSpace",
|
|
2849
|
+
"canonicalReference": "@alloy-js/core!OutputSpace:type"
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
"kind": "Content",
|
|
2853
|
+
"text": ";"
|
|
2854
|
+
}
|
|
2855
|
+
],
|
|
2856
|
+
"isReadonly": true,
|
|
2857
|
+
"isOptional": false,
|
|
2858
|
+
"releaseTag": "Public",
|
|
2859
|
+
"name": "symbols",
|
|
2860
|
+
"propertyTypeTokenRange": {
|
|
2861
|
+
"startIndex": 1,
|
|
2862
|
+
"endIndex": 3
|
|
2863
|
+
},
|
|
2864
|
+
"isStatic": false,
|
|
2865
|
+
"isProtected": false,
|
|
2866
|
+
"isAbstract": false
|
|
2613
2867
|
}
|
|
2614
2868
|
],
|
|
2615
2869
|
"extendsTokenRange": {
|
|
@@ -6059,6 +6313,39 @@
|
|
|
6059
6313
|
"parameters": [],
|
|
6060
6314
|
"name": "useJavaNamePolicy"
|
|
6061
6315
|
},
|
|
6316
|
+
{
|
|
6317
|
+
"kind": "Function",
|
|
6318
|
+
"canonicalReference": "@alloy-js/java!useLexicalScope:function(1)",
|
|
6319
|
+
"docComment": "",
|
|
6320
|
+
"excerptTokens": [
|
|
6321
|
+
{
|
|
6322
|
+
"kind": "Content",
|
|
6323
|
+
"text": "export declare function useLexicalScope(): "
|
|
6324
|
+
},
|
|
6325
|
+
{
|
|
6326
|
+
"kind": "Reference",
|
|
6327
|
+
"text": "JavaLexicalScope",
|
|
6328
|
+
"canonicalReference": "@alloy-js/java!JavaLexicalScope:class"
|
|
6329
|
+
},
|
|
6330
|
+
{
|
|
6331
|
+
"kind": "Content",
|
|
6332
|
+
"text": " | undefined"
|
|
6333
|
+
},
|
|
6334
|
+
{
|
|
6335
|
+
"kind": "Content",
|
|
6336
|
+
"text": ";"
|
|
6337
|
+
}
|
|
6338
|
+
],
|
|
6339
|
+
"fileUrlPath": "src/utils.ts",
|
|
6340
|
+
"returnTypeTokenRange": {
|
|
6341
|
+
"startIndex": 1,
|
|
6342
|
+
"endIndex": 3
|
|
6343
|
+
},
|
|
6344
|
+
"releaseTag": "Public",
|
|
6345
|
+
"overloadIndex": 1,
|
|
6346
|
+
"parameters": [],
|
|
6347
|
+
"name": "useLexicalScope"
|
|
6348
|
+
},
|
|
6062
6349
|
{
|
|
6063
6350
|
"kind": "Function",
|
|
6064
6351
|
"canonicalReference": "@alloy-js/java!usePackage:function(1)",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { code,
|
|
1
|
+
import { code, refkey } from "@alloy-js/core";
|
|
2
2
|
import { d } from "@alloy-js/core/testing";
|
|
3
3
|
import { expect, it } from "vitest";
|
|
4
4
|
import * as jv from "../src/components/index.js";
|
|
@@ -7,13 +7,13 @@ import { assertFileContents, testRender, toSourceText } from "./utils.js";
|
|
|
7
7
|
it("works", () => {
|
|
8
8
|
const res = toSourceText(
|
|
9
9
|
<>
|
|
10
|
-
<Declaration name="TestClass">
|
|
10
|
+
<jv.Declaration name="TestClass">
|
|
11
11
|
{code`
|
|
12
12
|
public class TestClass {
|
|
13
13
|
${(<jv.Constructor public name="TestClass" />)}
|
|
14
14
|
}
|
|
15
15
|
`}
|
|
16
|
-
</Declaration>
|
|
16
|
+
</jv.Declaration>
|
|
17
17
|
</>,
|
|
18
18
|
);
|
|
19
19
|
|
|
@@ -29,13 +29,13 @@ it("works", () => {
|
|
|
29
29
|
it("takes name from class", () => {
|
|
30
30
|
const res = toSourceText(
|
|
31
31
|
<>
|
|
32
|
-
<Declaration name="TestClass">
|
|
32
|
+
<jv.Declaration name="TestClass">
|
|
33
33
|
{code`
|
|
34
34
|
public class TestClass {
|
|
35
35
|
${(<jv.Constructor public />)}
|
|
36
36
|
}
|
|
37
37
|
`}
|
|
38
|
-
</Declaration>
|
|
38
|
+
</jv.Declaration>
|
|
39
39
|
</>,
|
|
40
40
|
);
|
|
41
41
|
|
|
@@ -61,7 +61,7 @@ it("declares parameters", () => {
|
|
|
61
61
|
</jv.SourceFile>
|
|
62
62
|
<jv.PackageDirectory package="imports">
|
|
63
63
|
<jv.SourceFile path="TestClass.java">
|
|
64
|
-
<Declaration name="TestClass">
|
|
64
|
+
<jv.Declaration name="TestClass">
|
|
65
65
|
{code`
|
|
66
66
|
public class TestClass {
|
|
67
67
|
${(
|
|
@@ -75,7 +75,7 @@ it("declares parameters", () => {
|
|
|
75
75
|
)}
|
|
76
76
|
}
|
|
77
77
|
`}
|
|
78
|
-
</Declaration>
|
|
78
|
+
</jv.Declaration>
|
|
79
79
|
</jv.SourceFile>
|
|
80
80
|
</jv.PackageDirectory>
|
|
81
81
|
</>,
|
package/test/externals.test.tsx
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Output,
|
|
2
|
-
import { d } from "@alloy-js/core/testing";
|
|
1
|
+
import { Output, StatementList } from "@alloy-js/core";
|
|
3
2
|
import { expect, it } from "vitest";
|
|
4
3
|
import * as jv from "../src/components/index.js";
|
|
5
4
|
import { createLibrary } from "../src/index.js";
|
|
6
|
-
import { findFile } from "./utils.js";
|
|
7
5
|
|
|
8
6
|
it("uses import from external library", () => {
|
|
9
7
|
const testLib = createLibrary({
|
|
@@ -16,7 +14,7 @@ it("uses import from external library", () => {
|
|
|
16
14
|
},
|
|
17
15
|
});
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
expect(
|
|
20
18
|
<Output externals={[testLib]}>
|
|
21
19
|
<jv.PackageDirectory package="me.test.code">
|
|
22
20
|
<jv.SourceFile path="TestImport.java">
|
|
@@ -36,9 +34,7 @@ it("uses import from external library", () => {
|
|
|
36
34
|
</jv.SourceFile>
|
|
37
35
|
</jv.PackageDirectory>
|
|
38
36
|
</Output>,
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
expect(findFile(res, "TestImport.java").contents).toBe(d`
|
|
37
|
+
).toRenderTo(`
|
|
42
38
|
package me.test.code;
|
|
43
39
|
|
|
44
40
|
import me.test.testlib.models.TestModel;
|
package/test/maven.test.tsx
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Output
|
|
2
|
-
import { it } from "vitest";
|
|
1
|
+
import { Output } from "@alloy-js/core";
|
|
2
|
+
import { expect, it } from "vitest";
|
|
3
3
|
import { ProjectDirectory } from "../src/components/index.js";
|
|
4
4
|
import { MavenProjectConfig } from "../src/index.js";
|
|
5
|
-
import { assertFileContents } from "./utils.jsx";
|
|
6
5
|
|
|
7
6
|
it("generates barebones pom.xml file", () => {
|
|
8
7
|
const projectConfig: MavenProjectConfig = {
|
|
@@ -12,16 +11,14 @@ it("generates barebones pom.xml file", () => {
|
|
|
12
11
|
javaVersion: 8,
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
expect(
|
|
16
15
|
<Output>
|
|
17
16
|
<ProjectDirectory
|
|
18
17
|
name="TestMavenProject"
|
|
19
18
|
mavenProjectConfig={projectConfig}
|
|
20
19
|
></ProjectDirectory>
|
|
21
20
|
</Output>,
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
assertFileContents(res, {
|
|
21
|
+
).toRenderTo({
|
|
25
22
|
"pom.xml": `
|
|
26
23
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
27
24
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
@@ -122,16 +119,14 @@ it("generates complex configuration", () => {
|
|
|
122
119
|
},
|
|
123
120
|
};
|
|
124
121
|
|
|
125
|
-
|
|
122
|
+
expect(
|
|
126
123
|
<Output>
|
|
127
124
|
<ProjectDirectory
|
|
128
125
|
name="TestMavenProject"
|
|
129
126
|
mavenProjectConfig={projectConfig}
|
|
130
127
|
></ProjectDirectory>
|
|
131
128
|
</Output>,
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
assertFileContents(res, {
|
|
129
|
+
).toRenderTo({
|
|
135
130
|
"pom.xml": `
|
|
136
131
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
137
132
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
package/test/method.test.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { code,
|
|
1
|
+
import { code, refkey } from "@alloy-js/core";
|
|
2
2
|
import { d } from "@alloy-js/core/testing";
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import * as jv from "../src/components/index.js";
|
|
@@ -152,7 +152,7 @@ it("declares parameters", () => {
|
|
|
152
152
|
</jv.SourceFile>
|
|
153
153
|
<jv.PackageDirectory package="imports">
|
|
154
154
|
<jv.SourceFile path="Test.java">
|
|
155
|
-
<Declaration name="Test">
|
|
155
|
+
<jv.Declaration name="Test">
|
|
156
156
|
{code`
|
|
157
157
|
public class Test {
|
|
158
158
|
${(
|
|
@@ -169,7 +169,7 @@ it("declares parameters", () => {
|
|
|
169
169
|
)}
|
|
170
170
|
}
|
|
171
171
|
`}
|
|
172
|
-
</Declaration>
|
|
172
|
+
</jv.Declaration>
|
|
173
173
|
</jv.SourceFile>
|
|
174
174
|
</jv.PackageDirectory>
|
|
175
175
|
</>,
|
|
@@ -203,7 +203,7 @@ it("defines generics", () => {
|
|
|
203
203
|
</jv.SourceFile>
|
|
204
204
|
<jv.PackageDirectory package="imports">
|
|
205
205
|
<jv.SourceFile path="Test.java">
|
|
206
|
-
<Declaration name="Test">
|
|
206
|
+
<jv.Declaration name="Test">
|
|
207
207
|
{code`
|
|
208
208
|
public class Test {
|
|
209
209
|
${(
|
|
@@ -217,7 +217,7 @@ it("defines generics", () => {
|
|
|
217
217
|
)}
|
|
218
218
|
}
|
|
219
219
|
`}
|
|
220
|
-
</Declaration>
|
|
220
|
+
</jv.Declaration>
|
|
221
221
|
</jv.SourceFile>
|
|
222
222
|
</jv.PackageDirectory>
|
|
223
223
|
</>,
|
package/test/utils.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export function toSourceText(c: Children, options?: PrintTreeOptions): string {
|
|
|
18
18
|
<jv.SourceFile path="Test.java">{c}</jv.SourceFile>
|
|
19
19
|
</jv.PackageDirectory>
|
|
20
20
|
</Output>,
|
|
21
|
-
options,
|
|
21
|
+
{ insertFinalNewLine: false, ...options },
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
const file = findFile(res, "Test.java");
|
|
@@ -33,7 +33,7 @@ export function testRender(
|
|
|
33
33
|
<Output>
|
|
34
34
|
<jv.PackageDirectory package="me.test.code">{c}</jv.PackageDirectory>
|
|
35
35
|
</Output>,
|
|
36
|
-
options,
|
|
36
|
+
{ insertFinalNewLine: false, ...options },
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
|
package/test/variables.test.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { code,
|
|
1
|
+
import { code, refkey } from "@alloy-js/core";
|
|
2
2
|
import { d } from "@alloy-js/core/testing";
|
|
3
3
|
import { expect, it } from "vitest";
|
|
4
4
|
import * as jv from "../src/components/index.js";
|
|
@@ -37,13 +37,13 @@ it("works with external type", () => {
|
|
|
37
37
|
</jv.SourceFile>
|
|
38
38
|
<jv.PackageDirectory package="imports">
|
|
39
39
|
<jv.SourceFile path="Test.java">
|
|
40
|
-
<Declaration name="Test">
|
|
40
|
+
<jv.Declaration name="Test">
|
|
41
41
|
{code`
|
|
42
42
|
public class Test {
|
|
43
43
|
${(<jv.Variable public static type={refkey("Model")} name="myModel" />)};
|
|
44
44
|
}
|
|
45
45
|
`}
|
|
46
|
-
</Declaration>
|
|
46
|
+
</jv.Declaration>
|
|
47
47
|
</jv.SourceFile>
|
|
48
48
|
</jv.PackageDirectory>
|
|
49
49
|
</>,
|
|
@@ -75,13 +75,13 @@ it("declares new object", () => {
|
|
|
75
75
|
</jv.SourceFile>
|
|
76
76
|
<jv.PackageDirectory package="imports">
|
|
77
77
|
<jv.SourceFile path="Test.java">
|
|
78
|
-
<Declaration name="Test">
|
|
78
|
+
<jv.Declaration name="Test">
|
|
79
79
|
{code`
|
|
80
80
|
public class Test {
|
|
81
81
|
${(<jv.ObjectDeclaration public static type={refkey("Model")} name="myModel" args={[<jv.Value value="initValue" />]} />)};
|
|
82
82
|
}
|
|
83
83
|
`}
|
|
84
|
-
</Declaration>
|
|
84
|
+
</jv.Declaration>
|
|
85
85
|
</jv.SourceFile>
|
|
86
86
|
</jv.PackageDirectory>
|
|
87
87
|
</>,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@alloy-js/core/testing";
|
package/tsconfig.json
CHANGED
package/tsdoc-metadata.json
CHANGED
package/vitest.config.ts
CHANGED
package/dist/test/vitest.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "vitest";
|
package/test/vitest.d.ts
DELETED