@alloy-js/java 0.15.0 → 0.17.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/CHANGELOG.md +8 -0
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +4 -2
- package/dist/src/components/ImportStatement.d.ts +1 -1
- package/dist/src/components/ImportStatement.d.ts.map +1 -1
- package/dist/src/components/Modifiers.d.ts +1 -1
- package/dist/src/components/Modifiers.d.ts.map +1 -1
- package/dist/src/components/Name.d.ts +1 -1
- package/dist/src/components/Name.d.ts.map +1 -1
- package/dist/src/components/PackageDirectory.d.ts.map +1 -1
- package/dist/src/components/PackageDirectory.js +3 -3
- package/dist/src/components/Parameters.d.ts +1 -1
- package/dist/src/components/Parameters.d.ts.map +1 -1
- package/dist/src/components/ProjectDirectory.d.ts.map +1 -1
- package/dist/src/components/ProjectDirectory.js +6 -3
- package/dist/src/components/Reference.d.ts +1 -1
- package/dist/src/components/Reference.d.ts.map +1 -1
- package/dist/src/components/stc/index.d.ts +27 -26
- package/dist/src/components/stc/index.d.ts.map +1 -1
- package/dist/src/components/stc/index.js +27 -27
- package/dist/src/create-library.d.ts.map +1 -1
- package/dist/src/create-library.js +11 -7
- package/dist/src/symbols/java-output-symbol.d.ts +8 -5
- package/dist/src/symbols/java-output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/java-output-symbol.js +22 -15
- package/dist/src/symbols/java-package-scope.d.ts +3 -4
- package/dist/src/symbols/java-package-scope.d.ts.map +1 -1
- package/dist/src/symbols/java-package-scope.js +5 -6
- package/dist/src/symbols/java-project-scope.d.ts +18 -8
- package/dist/src/symbols/java-project-scope.d.ts.map +1 -1
- package/dist/src/symbols/java-project-scope.js +60 -16
- package/dist/test/class.test.js +4 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/Declaration.tsx +4 -2
- package/src/components/PackageDirectory.tsx +2 -11
- package/src/components/ProjectDirectory.tsx +4 -10
- package/src/components/stc/index.ts +27 -27
- package/src/create-library.ts +13 -7
- package/src/symbols/java-output-symbol.ts +25 -19
- package/src/symbols/java-package-scope.ts +5 -15
- package/src/symbols/java-project-scope.ts +83 -32
- package/temp/api.json +391 -304
- package/test/class.test.tsx +5 -1
- package/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,MAAM,EACP,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,gBAAgB;IAE/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,MAAM,EACP,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,gBAAgB;IAE/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAKlD"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { Declaration as CoreDeclaration } from "@alloy-js/core";
|
|
3
|
-
import {
|
|
3
|
+
import { JavaOutputSymbol } from "../symbols/java-output-symbol.js";
|
|
4
4
|
/**
|
|
5
5
|
* Declare a symbol in the program. Declaring classes, interfaces, enums, etc. Should also pass in
|
|
6
6
|
* access modifier so we can manage access
|
|
7
7
|
*/
|
|
8
8
|
export function Declaration(props) {
|
|
9
|
-
const sym =
|
|
9
|
+
const sym = new JavaOutputSymbol(props.name, {
|
|
10
|
+
refkeys: props.refkey
|
|
11
|
+
});
|
|
10
12
|
return _$createComponent(CoreDeclaration, {
|
|
11
13
|
symbol: sym,
|
|
12
14
|
get children() {
|
|
@@ -6,6 +6,6 @@ export interface ImportSymbol {
|
|
|
6
6
|
export interface ImportStatementsProps {
|
|
7
7
|
imports: ImportSymbol[];
|
|
8
8
|
}
|
|
9
|
-
export declare function ImportStatements(props: ImportStatementsProps): () => () => (string | import("@alloy-js/core").CustomContext | (() => import("@alloy-js/core").Children) | undefined)[];
|
|
9
|
+
export declare function ImportStatements(props: ImportStatementsProps): () => () => (string | import("@alloy-js/core/jsx-runtime").CustomContext | (() => import("@alloy-js/core/jsx-runtime").Children) | undefined)[];
|
|
10
10
|
export declare function ImportStatement(props: ImportSymbol): () => string;
|
|
11
11
|
//# sourceMappingURL=ImportStatement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,mJAO5D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,gBAElD"}
|
|
@@ -23,5 +23,5 @@ export interface ModifierProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* Renders the modifiers based on the provided props.
|
|
25
25
|
**/
|
|
26
|
-
export declare function Modifiers(props: ModifierProps): import("@alloy-js/core").Children;
|
|
26
|
+
export declare function Modifiers(props: ModifierProps): import("@alloy-js/core/jsx-runtime").Children;
|
|
27
27
|
//# sourceMappingURL=Modifiers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modifiers.d.ts","sourceRoot":"","sources":["../../../src/components/Modifiers.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiBD;;IAEI;AACJ,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"Modifiers.d.ts","sourceRoot":"","sources":["../../../src/components/Modifiers.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiBD;;IAEI;AACJ,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,iDAU7C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function Name(): import("@alloy-js/core").Children;
|
|
1
|
+
export declare function Name(): import("@alloy-js/core/jsx-runtime").Children;
|
|
2
2
|
//# sourceMappingURL=Name.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Name.d.ts","sourceRoot":"","sources":["../../../src/components/Name.tsx"],"names":[],"mappings":"AAEA,wBAAgB,IAAI,
|
|
1
|
+
{"version":3,"file":"Name.d.ts","sourceRoot":"","sources":["../../../src/components/Name.tsx"],"names":[],"mappings":"AAEA,wBAAgB,IAAI,kDAOnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageDirectory.d.ts","sourceRoot":"","sources":["../../../src/components/PackageDirectory.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,
|
|
1
|
+
{"version":3,"file":"PackageDirectory.d.ts","sourceRoot":"","sources":["../../../src/components/PackageDirectory.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAMjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,gBAAgB,CAAC;IAExB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,CAAC,uBAAuB,CAC7D,CAAC;AAElB,wBAAgB,UAAU,wCAEzB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAgD5D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createContext, Scope, SourceDirectory, SourceDirectoryContext,
|
|
3
|
-
import {
|
|
2
|
+
import { createContext, Scope, SourceDirectory, SourceDirectoryContext, useContext } from "@alloy-js/core";
|
|
3
|
+
import { JavaPackageScope } from "../symbols/java-package-scope.js";
|
|
4
4
|
export const PackageDirectoryContext = createContext();
|
|
5
5
|
export function usePackage() {
|
|
6
6
|
return useContext(PackageDirectoryContext);
|
|
@@ -11,7 +11,7 @@ export function PackageDirectory(props) {
|
|
|
11
11
|
const packageNames = props.package.split(".");
|
|
12
12
|
const packageName = packageNames[0];
|
|
13
13
|
const fullyQualifiedPackageName = parentPackage ? parentPackage.qualifiedName + "." + packageName : packageName;
|
|
14
|
-
const scope =
|
|
14
|
+
const scope = new JavaPackageScope(fullyQualifiedPackageName);
|
|
15
15
|
const packagePath = sourceDirectory?.path + "/" + packageName;
|
|
16
16
|
const packageContext = {
|
|
17
17
|
scope,
|
|
@@ -7,5 +7,5 @@ export interface ParametersProps {
|
|
|
7
7
|
*
|
|
8
8
|
* @param props - Takes record of parameter name to type
|
|
9
9
|
*/
|
|
10
|
-
export declare function Parameters(props: ParametersProps): () => (string | import("@alloy-js/core").CustomContext | Children[] | undefined)[];
|
|
10
|
+
export declare function Parameters(props: ParametersProps): () => (string | import("@alloy-js/core/jsx-runtime").CustomContext | Children[] | undefined)[];
|
|
11
11
|
//# sourceMappingURL=Parameters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameters.d.ts","sourceRoot":"","sources":["../../../src/components/Parameters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Parameters.d.ts","sourceRoot":"","sources":["../../../src/components/Parameters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kGAShD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectDirectory.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectDirectory.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ProjectDirectory.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectDirectory.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAKjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,cAAc,CAAmB,CAAC;AAEhF,wBAAgB,UAAU,mBAEzB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YA6B5D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createContext, Scope, SourceDirectory,
|
|
3
|
-
import {
|
|
2
|
+
import { createContext, Scope, SourceDirectory, useContext } from "@alloy-js/core";
|
|
3
|
+
import { JavaProjectScope } from "../symbols/index.js";
|
|
4
4
|
import { MavenProject } from "./MavenProject.js";
|
|
5
5
|
export const ProjectContext = createContext();
|
|
6
6
|
export function useProject() {
|
|
@@ -11,7 +11,10 @@ export function useProject() {
|
|
|
11
11
|
* with a build tool included (maven, gradle etc).
|
|
12
12
|
*/
|
|
13
13
|
export function ProjectDirectory(props) {
|
|
14
|
-
const scope =
|
|
14
|
+
const scope = new JavaProjectScope(props.name, {
|
|
15
|
+
mavenProjectConfig: props.mavenProjectConfig,
|
|
16
|
+
gradleProjectConfig: props.gradleProjectConfig
|
|
17
|
+
});
|
|
15
18
|
const projectContext = {
|
|
16
19
|
scope
|
|
17
20
|
};
|
|
@@ -2,5 +2,5 @@ import { Refkey } from "@alloy-js/core";
|
|
|
2
2
|
export interface ReferenceProps {
|
|
3
3
|
refkey: Refkey;
|
|
4
4
|
}
|
|
5
|
-
export declare function Reference(props: ReferenceProps): import("@alloy-js/core").Children;
|
|
5
|
+
export declare function Reference(props: ReferenceProps): import("@alloy-js/core/jsx-runtime").Children;
|
|
6
6
|
//# sourceMappingURL=Reference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,iDAI9C"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
import * as core from "@alloy-js/core";
|
|
1
2
|
import * as base from "../index.js";
|
|
2
|
-
export declare const Annotation:
|
|
3
|
-
export declare const ArgumentList:
|
|
4
|
-
export declare const Class:
|
|
5
|
-
export declare const Constructor:
|
|
6
|
-
export declare const Declaration:
|
|
7
|
-
export declare const Enum:
|
|
8
|
-
export declare const ExtendsClause:
|
|
9
|
-
export declare const ImplementsClause:
|
|
10
|
-
export declare const TypeArguments:
|
|
11
|
-
export declare const EnumMember:
|
|
12
|
-
export declare const ImportStatement:
|
|
13
|
-
export declare const Interface:
|
|
14
|
-
export declare const MavenProject:
|
|
15
|
-
export declare const Method:
|
|
16
|
-
export declare const Modifiers:
|
|
17
|
-
export declare const Name:
|
|
18
|
-
export declare const ObjectDeclaration:
|
|
19
|
-
export declare const PackageDirectory:
|
|
20
|
-
export declare const Parameters:
|
|
21
|
-
export declare const ProjectDirectory:
|
|
22
|
-
export declare const Reference:
|
|
23
|
-
export declare const SourceFile:
|
|
24
|
-
export declare const Value:
|
|
25
|
-
export declare const Variable:
|
|
26
|
-
export declare const TypeParameters:
|
|
27
|
-
export declare const NamedArgumentList:
|
|
3
|
+
export declare const Annotation: core.StcSignature<base.AnnotationProps>;
|
|
4
|
+
export declare const ArgumentList: core.StcSignature<base.ArgumentListProps>;
|
|
5
|
+
export declare const Class: core.StcSignature<base.ClassProps>;
|
|
6
|
+
export declare const Constructor: core.StcSignature<base.ConstructorProps>;
|
|
7
|
+
export declare const Declaration: core.StcSignature<base.DeclarationProps>;
|
|
8
|
+
export declare const Enum: core.StcSignature<base.EnumProps>;
|
|
9
|
+
export declare const ExtendsClause: core.StcSignature<base.ExtendsClauseProps>;
|
|
10
|
+
export declare const ImplementsClause: core.StcSignature<base.ImplementsClauseProps>;
|
|
11
|
+
export declare const TypeArguments: core.StcSignature<base.TypeArgumentsProps>;
|
|
12
|
+
export declare const EnumMember: core.StcSignature<base.EnumMemberProps>;
|
|
13
|
+
export declare const ImportStatement: core.StcSignature<base.ImportSymbol>;
|
|
14
|
+
export declare const Interface: core.StcSignature<base.InterfaceProps>;
|
|
15
|
+
export declare const MavenProject: core.StcSignature<base.MavenProjectProps>;
|
|
16
|
+
export declare const Method: core.StcSignature<base.MethodProps>;
|
|
17
|
+
export declare const Modifiers: core.StcSignature<base.ModifierProps>;
|
|
18
|
+
export declare const Name: core.StcSignature<{}>;
|
|
19
|
+
export declare const ObjectDeclaration: core.StcSignature<base.ObjectDeclarationProps>;
|
|
20
|
+
export declare const PackageDirectory: core.StcSignature<base.PackageDirectoryProps>;
|
|
21
|
+
export declare const Parameters: core.StcSignature<base.ParametersProps>;
|
|
22
|
+
export declare const ProjectDirectory: core.StcSignature<base.ProjectDirectoryProps>;
|
|
23
|
+
export declare const Reference: core.StcSignature<base.ReferenceProps>;
|
|
24
|
+
export declare const SourceFile: core.StcSignature<base.SourceFileProps>;
|
|
25
|
+
export declare const Value: core.StcSignature<base.ValueProps>;
|
|
26
|
+
export declare const Variable: core.StcSignature<base.VariableProps>;
|
|
27
|
+
export declare const TypeParameters: core.StcSignature<base.TypeParametersProps>;
|
|
28
|
+
export declare const NamedArgumentList: core.StcSignature<base.NamedArgumentListProps>;
|
|
28
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,KAAK,oCAAuB,CAAC;AAC1C,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,IAAI,mCAAsB,CAAC;AACxC,eAAO,MAAM,aAAa,4CAA+B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,aAAa,4CAA+B,CAAC;AAC1D,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,eAAe,sCAAiC,CAAC;AAC9D,eAAO,MAAM,SAAS,wCAA2B,CAAC;AAClD,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,MAAM,qCAAwB,CAAC;AAC5C,eAAO,MAAM,SAAS,uCAA2B,CAAC;AAClD,eAAO,MAAM,IAAI,uBAAsB,CAAC;AACxC,eAAO,MAAM,iBAAiB,gDAAmC,CAAC;AAClE,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,SAAS,wCAA2B,CAAC;AAClD,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,KAAK,oCAAuB,CAAC;AAC1C,eAAO,MAAM,QAAQ,uCAA0B,CAAC;AAChD,eAAO,MAAM,cAAc,6CAAgC,CAAC;AAC5D,eAAO,MAAM,iBAAiB,gDAAmC,CAAC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as core from "@alloy-js/core";
|
|
2
2
|
import * as base from "../index.js";
|
|
3
|
-
export const Annotation = stc(base.Annotation);
|
|
4
|
-
export const ArgumentList = stc(base.ArgumentList);
|
|
5
|
-
export const Class = stc(base.Class);
|
|
6
|
-
export const Constructor = stc(base.Constructor);
|
|
7
|
-
export const Declaration = stc(base.Declaration);
|
|
8
|
-
export const Enum = stc(base.Enum);
|
|
9
|
-
export const ExtendsClause = stc(base.ExtendsClause);
|
|
10
|
-
export const ImplementsClause = stc(base.ImplementsClause);
|
|
11
|
-
export const TypeArguments = stc(base.TypeArguments);
|
|
12
|
-
export const EnumMember = stc(base.EnumMember);
|
|
13
|
-
export const ImportStatement = stc(base.ImportStatement);
|
|
14
|
-
export const Interface = stc(base.Interface);
|
|
15
|
-
export const MavenProject = stc(base.MavenProject);
|
|
16
|
-
export const Method = stc(base.Method);
|
|
17
|
-
export const Modifiers = stc(base.Modifiers);
|
|
18
|
-
export const Name = stc(base.Name);
|
|
19
|
-
export const ObjectDeclaration = stc(base.ObjectDeclaration);
|
|
20
|
-
export const PackageDirectory = stc(base.PackageDirectory);
|
|
21
|
-
export const Parameters = stc(base.Parameters);
|
|
22
|
-
export const ProjectDirectory = stc(base.ProjectDirectory);
|
|
23
|
-
export const Reference = stc(base.Reference);
|
|
24
|
-
export const SourceFile = stc(base.SourceFile);
|
|
25
|
-
export const Value = stc(base.Value);
|
|
26
|
-
export const Variable = stc(base.Variable);
|
|
27
|
-
export const TypeParameters = stc(base.TypeParameters);
|
|
28
|
-
export const NamedArgumentList = stc(base.NamedArgumentList);
|
|
3
|
+
export const Annotation = core.stc(base.Annotation);
|
|
4
|
+
export const ArgumentList = core.stc(base.ArgumentList);
|
|
5
|
+
export const Class = core.stc(base.Class);
|
|
6
|
+
export const Constructor = core.stc(base.Constructor);
|
|
7
|
+
export const Declaration = core.stc(base.Declaration);
|
|
8
|
+
export const Enum = core.stc(base.Enum);
|
|
9
|
+
export const ExtendsClause = core.stc(base.ExtendsClause);
|
|
10
|
+
export const ImplementsClause = core.stc(base.ImplementsClause);
|
|
11
|
+
export const TypeArguments = core.stc(base.TypeArguments);
|
|
12
|
+
export const EnumMember = core.stc(base.EnumMember);
|
|
13
|
+
export const ImportStatement = core.stc(base.ImportStatement);
|
|
14
|
+
export const Interface = core.stc(base.Interface);
|
|
15
|
+
export const MavenProject = core.stc(base.MavenProject);
|
|
16
|
+
export const Method = core.stc(base.Method);
|
|
17
|
+
export const Modifiers = core.stc(base.Modifiers);
|
|
18
|
+
export const Name = core.stc(base.Name);
|
|
19
|
+
export const ObjectDeclaration = core.stc(base.ObjectDeclaration);
|
|
20
|
+
export const PackageDirectory = core.stc(base.PackageDirectory);
|
|
21
|
+
export const Parameters = core.stc(base.Parameters);
|
|
22
|
+
export const ProjectDirectory = core.stc(base.ProjectDirectory);
|
|
23
|
+
export const Reference = core.stc(base.Reference);
|
|
24
|
+
export const SourceFile = core.stc(base.SourceFile);
|
|
25
|
+
export const Value = core.stc(base.Value);
|
|
26
|
+
export const Variable = core.stc(base.Variable);
|
|
27
|
+
export const TypeParameters = core.stc(base.TypeParameters);
|
|
28
|
+
export const NamedArgumentList = core.stc(base.NamedArgumentList);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-library.d.ts","sourceRoot":"","sources":["../../src/create-library.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,MAAM,EAEN,aAAa,EACd,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-library.d.ts","sourceRoot":"","sources":["../../src/create-library.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,MAAM,EAEN,aAAa,EACd,MAAM,gBAAgB,CAAC;AAOxB,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACzB;AA0BD,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,iBAAiB,IAAI;KACvD,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAC7D,KAAK,GAAG,MAAM;CACjB,CAAC;AAEF,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,iBAAiB;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,iBAAiB,EAC7D,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC3B,cAAc,CAAC,CAAC,CAAC,GAAG,aAAa,CAcnC"}
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
// Allows discovery of symbols from these libraries for use in the program
|
|
3
3
|
|
|
4
4
|
import { getSymbolCreatorSymbol, refkey } from "@alloy-js/core";
|
|
5
|
-
import {
|
|
6
|
-
import { createJavaPackageScope } from "./symbols/java-package-scope.js";
|
|
5
|
+
import { JavaOutputSymbol, JavaPackageScope, JavaProjectScope } from "./symbols/index.js";
|
|
7
6
|
function createSymbols(binder, props, refkeys) {
|
|
8
|
-
const projectScope =
|
|
7
|
+
const projectScope = new JavaProjectScope(props.groupId, {
|
|
8
|
+
binder
|
|
9
|
+
});
|
|
9
10
|
for (const [pkg, symbols] of Object.entries(props.descriptor)) {
|
|
10
|
-
const packageScope =
|
|
11
|
+
const packageScope = new JavaPackageScope(pkg, {
|
|
12
|
+
binder,
|
|
13
|
+
parent: projectScope
|
|
14
|
+
});
|
|
11
15
|
for (const symB of symbols) {
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
new JavaOutputSymbol(symB, {
|
|
17
|
+
binder,
|
|
14
18
|
scope: packageScope,
|
|
15
|
-
|
|
19
|
+
refkeys: refkeys[symB],
|
|
16
20
|
package: packageScope.name
|
|
17
21
|
});
|
|
18
22
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { OutputSymbol } from "@alloy-js/core";
|
|
2
|
-
|
|
1
|
+
import { OutputSymbol, OutputSymbolOptions } from "@alloy-js/core";
|
|
2
|
+
export interface JavaOutputSymbolOptions extends OutputSymbolOptions {
|
|
3
|
+
package?: string;
|
|
4
|
+
}
|
|
3
5
|
/**
|
|
4
6
|
* Represents an 'exported' symbol from a .java file. Class, enum, interface etc.
|
|
5
7
|
* Not considered exported if private
|
|
6
8
|
*/
|
|
7
|
-
export
|
|
9
|
+
export declare class JavaOutputSymbol extends OutputSymbol {
|
|
10
|
+
#private;
|
|
8
11
|
/**
|
|
9
12
|
* Fully qualified package name
|
|
10
13
|
*/
|
|
11
|
-
package
|
|
14
|
+
get package(): string | undefined;
|
|
15
|
+
constructor(name: string, options?: JavaOutputSymbolOptions);
|
|
12
16
|
}
|
|
13
|
-
export declare function createJavaSymbol(props: DeclarationProps): JavaOutputSymbol;
|
|
14
17
|
//# sourceMappingURL=java-output-symbol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"java-output-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/java-output-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"java-output-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/java-output-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAU,MAAM,gBAAgB,CAAC;AAG3E,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;;IAChD;;OAEG;IACH,IAAI,OAAO,uBAEV;gBAGW,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B;CAgBhE"}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { usePackage } from "../components/
|
|
3
|
-
|
|
1
|
+
import { OutputSymbol, refkey } from "@alloy-js/core";
|
|
2
|
+
import { usePackage } from "../components/PackageDirectory.js";
|
|
4
3
|
/**
|
|
5
4
|
* Represents an 'exported' symbol from a .java file. Class, enum, interface etc.
|
|
6
5
|
* Not considered exported if private
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
export class JavaOutputSymbol extends OutputSymbol {
|
|
8
|
+
/**
|
|
9
|
+
* Fully qualified package name
|
|
10
|
+
*/
|
|
11
|
+
get package() {
|
|
12
|
+
return this.#package;
|
|
13
|
+
}
|
|
14
|
+
#package;
|
|
15
|
+
constructor(name, options = {}) {
|
|
16
|
+
if (options.refkeys === undefined) {
|
|
17
|
+
options.refkeys = [refkey(name)];
|
|
18
|
+
}
|
|
19
|
+
super(name, options);
|
|
20
|
+
if (options.package) {
|
|
21
|
+
this.#package = options.package;
|
|
22
|
+
} else {
|
|
23
|
+
const parentPackage = usePackage();
|
|
24
|
+
this.#package = options.package ?? parentPackage !== null ? parentPackage?.qualifiedName : "";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
20
27
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
kind:
|
|
1
|
+
import { OutputScope } from "@alloy-js/core";
|
|
2
|
+
export declare class JavaPackageScope extends OutputScope {
|
|
3
|
+
get kind(): string;
|
|
4
4
|
}
|
|
5
|
-
export declare function createJavaPackageScope(binder: Binder, parent: OutputScope | undefined, name: string): JavaPackageScope;
|
|
6
5
|
//# sourceMappingURL=java-package-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"java-package-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/java-package-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"java-package-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/java-package-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,IAAI,IAAI,WAEP;CACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
1
|
+
import { OutputScope } from "@alloy-js/core";
|
|
2
|
+
export class JavaPackageScope extends OutputScope {
|
|
3
|
+
get kind() {
|
|
4
|
+
return "package";
|
|
5
|
+
}
|
|
7
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OutputScope, OutputScopeOptions } from "@alloy-js/core";
|
|
2
2
|
/**
|
|
3
3
|
* Represents an external dependency imported through a maven or gradle project
|
|
4
4
|
*/
|
|
@@ -46,22 +46,32 @@ export interface MavenProjectConfig {
|
|
|
46
46
|
}
|
|
47
47
|
export interface GradleProjectConfig {
|
|
48
48
|
}
|
|
49
|
+
export interface JavaProjectScopeOptions extends OutputScopeOptions {
|
|
50
|
+
mavenProjectConfig?: MavenProjectConfig;
|
|
51
|
+
gradleProjectConfig?: GradleProjectConfig;
|
|
52
|
+
}
|
|
49
53
|
/**
|
|
50
54
|
* Represents the java project itself (maven, gradle, etc)
|
|
51
55
|
*/
|
|
52
|
-
export
|
|
53
|
-
|
|
56
|
+
export declare class JavaProjectScope extends OutputScope {
|
|
57
|
+
#private;
|
|
58
|
+
get kind(): string;
|
|
54
59
|
/**
|
|
55
60
|
* The dependencies of this project
|
|
56
61
|
* Map qualified package name to dependency
|
|
57
62
|
*/
|
|
58
|
-
dependencies: Map<string, JavaDependency>;
|
|
59
|
-
addDependency(dependency: JavaDependency): string;
|
|
63
|
+
get dependencies(): Map<string, JavaDependency>;
|
|
60
64
|
/**
|
|
61
65
|
* Define project configuration. Either maven or gradle
|
|
62
66
|
*/
|
|
63
|
-
mavenProjectConfig
|
|
64
|
-
|
|
67
|
+
get mavenProjectConfig(): MavenProjectConfig | undefined;
|
|
68
|
+
set(mavenProjectConfig: MavenProjectConfig | undefined): void;
|
|
69
|
+
/**
|
|
70
|
+
* Define project configuration. Either maven or gradle
|
|
71
|
+
*/
|
|
72
|
+
get gradleProjectConfig(): GradleProjectConfig | undefined;
|
|
73
|
+
set gradleProjectConfig(gradleProjectConfig: GradleProjectConfig | undefined);
|
|
74
|
+
constructor(name: string, options?: JavaProjectScopeOptions);
|
|
75
|
+
addDependency(dependency: JavaDependency): string;
|
|
65
76
|
}
|
|
66
|
-
export declare function createJavaProjectScope(binder: Binder, parent: OutputScope | undefined, name: string, mavenProjectConfig?: MavenProjectConfig, gradleProjectConfig?: GradleProjectConfig): JavaProjectScope;
|
|
67
77
|
//# sourceMappingURL=java-project-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"java-project-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/java-project-scope.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"java-project-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/java-project-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,kBAAkB,EAKnB,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;CACrD;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IAEpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,YAAY,CAAC,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;IAEJ,kBAAkB,CAAC,EAAE;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;IAEJ,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE;YACR,OAAO,EAAE,MAAM,CAAC;YAChB,UAAU,EAAE,MAAM,CAAC;YACnB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,UAAU,CAAC,EAAE;gBACX,EAAE,CAAC,EAAE,MAAM,CAAC;gBACZ,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;aAClB,EAAE,CAAC;YAEJ,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;SACrC,EAAE,CAAC;QACJ,SAAS,CAAC,EAAE;YACV,SAAS,EAAE,MAAM,CAAC;YAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;YACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;YACpB,SAAS,CAAC,EAAE,OAAO,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,EAAE,CAAC;KACL,CAAC;CACH;AAGD,MAAM,WAAW,mBAAmB;CAAG;AAEvC,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AACD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;;IAC/C,IAAI,IAAI,WAEP;IAED;;;OAGG;IACH,IAAI,YAAY,gCAEf;IAGD;;OAEG;IACH,IAAI,kBAAkB,mCAGrB;IAED,GAAG,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,SAAS;IAiBtD;;OAEG;IACH,IAAI,mBAAmB,IAKA,mBAAmB,GAAG,SAAS,CAFrD;IACD,IAAI,mBAAmB,CACrB,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,EAerD;gBAGW,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B;IAO/D,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,MAAM;CAUlD"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OutputScope, track, TrackOpTypes, trigger, TriggerOpTypes } from "@alloy-js/core";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Represents an external dependency imported through a maven or gradle project
|
|
3
5
|
*/
|
|
@@ -7,22 +9,64 @@
|
|
|
7
9
|
/**
|
|
8
10
|
* Represents the java project itself (maven, gradle, etc)
|
|
9
11
|
*/
|
|
12
|
+
export class JavaProjectScope extends OutputScope {
|
|
13
|
+
get kind() {
|
|
14
|
+
return "project";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The dependencies of this project
|
|
19
|
+
* Map qualified package name to dependency
|
|
20
|
+
*/
|
|
21
|
+
get dependencies() {
|
|
22
|
+
return this.#dependencies;
|
|
23
|
+
}
|
|
24
|
+
#dependencies = new Map();
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Define project configuration. Either maven or gradle
|
|
28
|
+
*/
|
|
29
|
+
get mavenProjectConfig() {
|
|
30
|
+
track(this, TrackOpTypes.GET, "mavenProjectConfig");
|
|
31
|
+
return this.#mavenProjectConfig;
|
|
32
|
+
}
|
|
33
|
+
set(mavenProjectConfig) {
|
|
34
|
+
const old = this.#mavenProjectConfig;
|
|
35
|
+
if (old === mavenProjectConfig) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.#mavenProjectConfig = mavenProjectConfig;
|
|
39
|
+
trigger(this, TriggerOpTypes.SET, "mavenProjectConfig", mavenProjectConfig, old);
|
|
40
|
+
}
|
|
41
|
+
#mavenProjectConfig;
|
|
10
42
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Define project configuration. Either maven or gradle
|
|
45
|
+
*/
|
|
46
|
+
get gradleProjectConfig() {
|
|
47
|
+
track(this, TrackOpTypes.GET, "gradleProjectConfig");
|
|
48
|
+
return this.#gradleProjectConfig;
|
|
49
|
+
}
|
|
50
|
+
set gradleProjectConfig(gradleProjectConfig) {
|
|
51
|
+
const old = this.#gradleProjectConfig;
|
|
52
|
+
if (old === gradleProjectConfig) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
this.#gradleProjectConfig = gradleProjectConfig;
|
|
56
|
+
trigger(this, TriggerOpTypes.SET, "gradleProjectConfig", gradleProjectConfig, old);
|
|
57
|
+
}
|
|
58
|
+
#gradleProjectConfig;
|
|
59
|
+
constructor(name, options = {}) {
|
|
60
|
+
super(name, options);
|
|
61
|
+
this.#mavenProjectConfig = options.mavenProjectConfig;
|
|
62
|
+
this.#gradleProjectConfig = options.gradleProjectConfig;
|
|
63
|
+
}
|
|
64
|
+
addDependency(dependency) {
|
|
65
|
+
const depKey = `${dependency.groupId}.${dependency.artifactId}.${dependency.version}`;
|
|
66
|
+
if (this.dependencies.has(depKey)) {
|
|
23
67
|
return depKey;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
68
|
+
}
|
|
69
|
+
this.dependencies.set(depKey, dependency);
|
|
70
|
+
return depKey;
|
|
71
|
+
}
|
|
28
72
|
}
|
package/dist/test/class.test.js
CHANGED
|
@@ -23,7 +23,10 @@ it("extends class", () => {
|
|
|
23
23
|
get children() {
|
|
24
24
|
return _$createComponent(jv.Class, {
|
|
25
25
|
"public": true,
|
|
26
|
-
name: "TestSuperclass"
|
|
26
|
+
name: "TestSuperclass",
|
|
27
|
+
get refkey() {
|
|
28
|
+
return refkey("TestSuperclass");
|
|
29
|
+
}
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
32
|
}), _$createComponent(jv.PackageDirectory, {
|