@alloy-js/csharp 0.21.0-dev.19 → 0.21.0-dev.20

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 (34) hide show
  1. package/dist/src/components/csproj-file/csproj-file.d.ts +15 -0
  2. package/dist/src/components/csproj-file/csproj-file.d.ts.map +1 -0
  3. package/dist/src/components/csproj-file/csproj-file.js +24 -0
  4. package/dist/src/components/csproj-file/csproj-file.js.map +1 -0
  5. package/dist/src/components/csproj-file/csproj-file.test.d.ts +2 -0
  6. package/dist/src/components/csproj-file/csproj-file.test.d.ts.map +1 -0
  7. package/dist/src/components/csproj-file/csproj-file.test.js +21 -0
  8. package/dist/src/components/csproj-file/csproj-file.test.js.map +1 -0
  9. package/dist/src/components/index.d.ts +1 -1
  10. package/dist/src/components/index.d.ts.map +1 -1
  11. package/dist/src/components/index.js +1 -1
  12. package/dist/src/components/index.js.map +1 -1
  13. package/dist/src/components/stc/index.d.ts +0 -1
  14. package/dist/src/components/stc/index.d.ts.map +1 -1
  15. package/dist/src/components/stc/index.js +0 -1
  16. package/dist/src/components/stc/index.js.map +1 -1
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/package.json +2 -1
  19. package/src/components/csproj-file/csproj-file.test.tsx +19 -0
  20. package/src/components/csproj-file/csproj-file.tsx +32 -0
  21. package/src/components/index.ts +1 -1
  22. package/src/components/stc/index.ts +0 -1
  23. package/temp/api.json +176 -291
  24. package/tsdoc.json +4 -0
  25. package/dist/src/components/ProjectDirectory.d.ts +0 -12
  26. package/dist/src/components/ProjectDirectory.d.ts.map +0 -1
  27. package/dist/src/components/ProjectDirectory.js +0 -47
  28. package/dist/src/components/ProjectDirectory.js.map +0 -1
  29. package/dist/test/project-directory.test.d.ts +0 -2
  30. package/dist/test/project-directory.test.d.ts.map +0 -1
  31. package/dist/test/project-directory.test.js +0 -133
  32. package/dist/test/project-directory.test.js.map +0 -1
  33. package/src/components/ProjectDirectory.tsx +0 -56
  34. package/test/project-directory.test.tsx +0 -121
@@ -0,0 +1,15 @@
1
+ import { Children } from "@alloy-js/core";
2
+ export type CSharpProjectSdk = "Microsoft.NET.Sdk" | "Microsoft.NET.Sdk.Web" | "Microsoft.NET.Sdk.Worker" | "Microsoft.NET.Sdk.Razor" | "Microsoft.NET.Sdk.BlazorWebAssembly" | "Aspire.AppHost.Sdk" | "MSTest.Sdk";
3
+ export interface CsprojProps {
4
+ path: `${string}.csproj`;
5
+ /**
6
+ * Project SDK https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview
7
+ * @default "Microsoft.NET.Sdk"
8
+ */
9
+ sdk?: CSharpProjectSdk;
10
+ /** Content inside <project> */
11
+ children?: Children;
12
+ }
13
+ /** Create a .csproj file */
14
+ export declare function CsprojFile(props: CsprojProps): Children;
15
+ //# sourceMappingURL=csproj-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csproj-file.d.ts","sourceRoot":"","sources":["../../../../src/components/csproj-file/csproj-file.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,uBAAuB,GACvB,0BAA0B,GAC1B,yBAAyB,GACzB,qCAAqC,GACrC,oBAAoB,GACpB,YAAY,CAAC;AAEjB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,GAAG,MAAM,SAAS,CAAC;IACzB;;;OAGG;IACH,GAAG,CAAC,EAAE,gBAAgB,CAAC;IAEvB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,4BAA4B;AAC5B,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,YAM5C"}
@@ -0,0 +1,24 @@
1
+ import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { SourceFile } from "@alloy-js/core";
3
+ import { Project } from "@alloy-js/msbuild/components";
4
+ /** Create a .csproj file */
5
+ export function CsprojFile(props) {
6
+ return _$createComponent(SourceFile, {
7
+ get path() {
8
+ return props.path;
9
+ },
10
+ filetype: "xml",
11
+ tabWidth: 4,
12
+ get children() {
13
+ return _$createComponent(Project, {
14
+ get Sdk() {
15
+ return props.sdk ?? "Microsoft.NET.Sdk";
16
+ },
17
+ get children() {
18
+ return props.children;
19
+ }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ //# sourceMappingURL=csproj-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SourceFile","Project","CsprojFile","props","_$createComponent","path","filetype","tabWidth","children","Sdk","sdk"],"sources":["../../../../src/components/csproj-file/csproj-file.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAAmBA,UAAU,QAAQ,gBAAgB;AACrD,SAASC,OAAO,QAAQ,8BAA8B;AAuBtD;AACA,OAAO,SAASC,UAAUA,CAACC,KAAkB,EAAE;EAC7C,OAAAC,iBAAA,CACGJ,UAAU;IAAA,IAACK,IAAIA,CAAA;MAAA,OAAEF,KAAK,CAACE,IAAI;IAAA;IAAEC,QAAQ;IAAOC,QAAQ,EAAE,CAAC;IAAA,IAAAC,SAAA;MAAA,OAAAJ,iBAAA,CACrDH,OAAO;QAAA,IAACQ,GAAGA,CAAA;UAAA,OAAEN,KAAK,CAACO,GAAG,IAAI,mBAAmB;QAAA;QAAA,IAAAF,SAAA;UAAA,OAAGL,KAAK,CAACK,QAAQ;QAAA;MAAA;IAAA;EAAA;AAGrE","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=csproj-file.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csproj-file.test.d.ts","sourceRoot":"","sources":["../../../../src/components/csproj-file/csproj-file.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { expect, it } from "vitest";
3
+ import { CsprojFile } from "./csproj-file.js";
4
+ it("create empty .csproj file", () => {
5
+ expect(_$createComponent(CsprojFile, {
6
+ path: "foo.csproj",
7
+ children: "<!-- content -->"
8
+ })).toRenderTo(`
9
+ <Project Sdk="Microsoft.NET.Sdk"><!-- content --></Project>
10
+ `);
11
+ });
12
+ it("set different sdk", () => {
13
+ expect(_$createComponent(CsprojFile, {
14
+ path: "foo.csproj",
15
+ sdk: "Microsoft.NET.Sdk.Web",
16
+ children: "<!-- content -->"
17
+ })).toRenderTo(`
18
+ <Project Sdk="Microsoft.NET.Sdk.Web"><!-- content --></Project>
19
+ `);
20
+ });
21
+ //# sourceMappingURL=csproj-file.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["expect","it","CsprojFile","_$createComponent","path","children","toRenderTo","sdk"],"sources":["../../../../src/components/csproj-file/csproj-file.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,SAASC,UAAU;AAEnBD,EAAE,CAAC,2BAA2B,EAAE,MAAM;EACpCD,MAAM,CAAAG,iBAAA,CAAED,UAAU;IAACE,IAAI,EAAE,YAAY;IAAAC,QAAA,EAAG;EAAkB,EAAc,CAAC,CACtEC,UAAU,CAAC;AAChB;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFL,EAAE,CAAC,mBAAmB,EAAE,MAAM;EAC5BD,MAAM,CAAAG,iBAAA,CACHD,UAAU;IAACE,IAAI,EAAE,YAAY;IAAEG,GAAG;IAAAF,QAAA,EAChC;EAAkB,EAEvB,CAAC,CAACC,UAAU,CAAC;AACf;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@ export * from "./access-expression/access-expression.jsx";
2
2
  export * from "./attributes/attributes.jsx";
3
3
  export * from "./class/declaration.jsx";
4
4
  export * from "./constructor/constructor.jsx";
5
+ export * from "./csproj-file/csproj-file.jsx";
5
6
  export * from "./Declaration.js";
6
7
  export * from "./doc/comment.jsx";
7
8
  export * from "./doc/from-markdown.jsx";
@@ -19,7 +20,6 @@ export * from "./method/method.jsx";
19
20
  export * from "./Name.js";
20
21
  export { Namespace, type NamespaceProps } from "./namespace/namespace.jsx";
21
22
  export * from "./parameters/parameters.jsx";
22
- export * from "./ProjectDirectory.js";
23
23
  export * from "./property/property.jsx";
24
24
  export * from "./record/declaration.js";
25
25
  export * from "./Reference.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3E,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3E,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
@@ -2,6 +2,7 @@ export * from "./access-expression/access-expression.js";
2
2
  export * from "./attributes/attributes.js";
3
3
  export * from "./class/declaration.js";
4
4
  export * from "./constructor/constructor.js";
5
+ export * from "./csproj-file/csproj-file.js";
5
6
  export * from "./Declaration.js";
6
7
  export * from "./doc/comment.js";
7
8
  export * from "./doc/from-markdown.js";
@@ -19,7 +20,6 @@ export * from "./method/method.js";
19
20
  export * from "./Name.js";
20
21
  export { Namespace } from "./namespace/namespace.js";
21
22
  export * from "./parameters/parameters.js";
22
- export * from "./ProjectDirectory.js";
23
23
  export * from "./property/property.js";
24
24
  export * from "./record/declaration.js";
25
25
  export * from "./Reference.js";
@@ -1 +1 @@
1
- {"version":3,"names":["Namespace"],"sources":["../../../src/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB,SAASA,SAAS;AAClB;AACA,cAAc,uBAAuB;AACrC;AACA,cAAc,yBAAyB;AACvC,cAAc,gBAAgB;AAC9B;AACA;AAEA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["Namespace"],"sources":["../../../src/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB,SAASA,SAAS;AAClB;AACA;AACA,cAAc,yBAAyB;AACvC,cAAc,gBAAgB;AAC9B;AACA;AAEA;AACA","ignoreList":[]}
@@ -8,7 +8,6 @@ export declare const EnumDeclaration: core.StcSignature<base.EnumDeclarationProp
8
8
  export declare const EnumMember: core.StcSignature<base.EnumMemberProps>;
9
9
  export declare const Parameter: core.StcSignature<base.ParameterProps>;
10
10
  export declare const Parameters: core.StcSignature<base.ParametersProps>;
11
- export declare const ProjectDirectory: core.StcSignature<base.ProjectDirectoryProps>;
12
11
  export declare const UsingDirective: core.StcSignature<base.UsingsProps>;
13
12
  export declare const StructDeclaration: core.StcSignature<base.StructDeclarationProps>;
14
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,KAAK,oCAAuB,CAAC;AAC1C,eAAO,MAAM,WAAW,qCAAwB,CAAC;AACjD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,SAAS,wCAA2B,CAAC;AAClD,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,cAAc,qCAAwB,CAAC;AACpD,eAAO,MAAM,iBAAiB,gDAAmC,CAAC"}
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,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,KAAK,oCAAuB,CAAC;AAC1C,eAAO,MAAM,WAAW,qCAAwB,CAAC;AACjD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,SAAS,wCAA2B,CAAC;AAClD,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,cAAc,qCAAwB,CAAC;AACpD,eAAO,MAAM,iBAAiB,gDAAmC,CAAC"}
@@ -8,7 +8,6 @@ export const EnumDeclaration = core.stc(base.EnumDeclaration);
8
8
  export const EnumMember = core.stc(base.EnumMember);
9
9
  export const Parameter = core.stc(base.Parameter);
10
10
  export const Parameters = core.stc(base.Parameters);
11
- export const ProjectDirectory = core.stc(base.ProjectDirectory);
12
11
  export const UsingDirective = core.stc(base.Usings);
13
12
  export const StructDeclaration = core.stc(base.StructDeclaration);
14
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["core","base","ClassDeclaration","stc","Constructor","Field","ClassMethod","Method","EnumDeclaration","EnumMember","Parameter","Parameters","ProjectDirectory","UsingDirective","Usings","StructDeclaration"],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,IAAI,MAAM,gBAAgB;AACtC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAMC,gBAAgB,GAAGF,IAAI,CAACG,GAAG,CAACF,IAAI,CAACC,gBAAgB,CAAC;AAC/D,OAAO,MAAME,WAAW,GAAGJ,IAAI,CAACG,GAAG,CAACF,IAAI,CAACG,WAAW,CAAC;AACrD,OAAO,MAAMC,KAAK,GAAGL,IAAI,CAACG,GAAG,CAACF,IAAI,CAACI,KAAK,CAAC;AACzC,OAAO,MAAMC,WAAW,GAAGN,IAAI,CAACG,GAAG,CAACF,IAAI,CAACM,MAAM,CAAC;AAChD,OAAO,MAAMC,eAAe,GAAGR,IAAI,CAACG,GAAG,CAACF,IAAI,CAACO,eAAe,CAAC;AAC7D,OAAO,MAAMC,UAAU,GAAGT,IAAI,CAACG,GAAG,CAACF,IAAI,CAACQ,UAAU,CAAC;AACnD,OAAO,MAAMC,SAAS,GAAGV,IAAI,CAACG,GAAG,CAACF,IAAI,CAACS,SAAS,CAAC;AACjD,OAAO,MAAMC,UAAU,GAAGX,IAAI,CAACG,GAAG,CAACF,IAAI,CAACU,UAAU,CAAC;AACnD,OAAO,MAAMC,gBAAgB,GAAGZ,IAAI,CAACG,GAAG,CAACF,IAAI,CAACW,gBAAgB,CAAC;AAC/D,OAAO,MAAMC,cAAc,GAAGb,IAAI,CAACG,GAAG,CAACF,IAAI,CAACa,MAAM,CAAC;AACnD,OAAO,MAAMC,iBAAiB,GAAGf,IAAI,CAACG,GAAG,CAACF,IAAI,CAACc,iBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["core","base","ClassDeclaration","stc","Constructor","Field","ClassMethod","Method","EnumDeclaration","EnumMember","Parameter","Parameters","UsingDirective","Usings","StructDeclaration"],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,IAAI,MAAM,gBAAgB;AACtC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAMC,gBAAgB,GAAGF,IAAI,CAACG,GAAG,CAACF,IAAI,CAACC,gBAAgB,CAAC;AAC/D,OAAO,MAAME,WAAW,GAAGJ,IAAI,CAACG,GAAG,CAACF,IAAI,CAACG,WAAW,CAAC;AACrD,OAAO,MAAMC,KAAK,GAAGL,IAAI,CAACG,GAAG,CAACF,IAAI,CAACI,KAAK,CAAC;AACzC,OAAO,MAAMC,WAAW,GAAGN,IAAI,CAACG,GAAG,CAACF,IAAI,CAACM,MAAM,CAAC;AAChD,OAAO,MAAMC,eAAe,GAAGR,IAAI,CAACG,GAAG,CAACF,IAAI,CAACO,eAAe,CAAC;AAC7D,OAAO,MAAMC,UAAU,GAAGT,IAAI,CAACG,GAAG,CAACF,IAAI,CAACQ,UAAU,CAAC;AACnD,OAAO,MAAMC,SAAS,GAAGV,IAAI,CAACG,GAAG,CAACF,IAAI,CAACS,SAAS,CAAC;AACjD,OAAO,MAAMC,UAAU,GAAGX,IAAI,CAACG,GAAG,CAACF,IAAI,CAACU,UAAU,CAAC;AACnD,OAAO,MAAMC,cAAc,GAAGZ,IAAI,CAACG,GAAG,CAACF,IAAI,CAACY,MAAM,CAAC;AACnD,OAAO,MAAMC,iBAAiB,GAAGd,IAAI,CAACG,GAAG,CAACF,IAAI,CAACa,iBAAiB,CAAC","ignoreList":[]}