Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 6bd5cf5

Browse files
author
Chris McConnell
authored
Enable specifying all extensions as loose files to (#903)
better support testing. Checked-in generated C# support files even though projects are just for testing.
1 parent fbe453f commit 6bd5cf5

File tree

5 files changed

+65
-16
lines changed

5 files changed

+65
-16
lines changed

packages/dialog/src/library/schemaMerger.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -881,24 +881,21 @@ export default class SchemaMerger {
881881
private async buildComponentTree(paths: string[]): Promise<void> {
882882
this.parents.push(this.root)
883883
for (let path of paths) {
884-
if (path.endsWith('.schema')) {
884+
// We expect a package
885+
let name = ppath.basename(path)
886+
if (name.endsWith('.csproj')) {
887+
// C# project
888+
await this.expandCSProj(path)
889+
} else if (name.endsWith('.nuspec')) {
890+
// Explicitly added .nuspec to support out of project scenarios
891+
await this.expandNuspec(path)
892+
} else if (name === 'package.json') {
893+
// Node package
894+
await this.expandPackageJson(path)
895+
} else if (this.extensions.includes(ppath.extname(name))) {
885896
this.root.explictPatterns.push(path)
886897
} else {
887-
// We expect a package
888-
let name = ppath.basename(path)
889-
if (name.endsWith('.csproj')) {
890-
await this.expandCSProj(path)
891-
} else if (name.endsWith('.nuspec')) {
892-
// Explicitly added .nuspec
893-
await this.expandNuspec(path)
894-
} else {
895-
if (name === 'package.json') {
896-
// Node package
897-
await this.expandPackageJson(path)
898-
} else {
899-
throw new Error(`Unknown package type ${path}`)
900-
}
901-
}
898+
throw new Error(`Unknown package type or extension ${path}`)
902899
}
903900
}
904901
this.components = this.root.sort()
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// Runtime Version:4.0.30319.42000
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
12+
using System.Reflection;
13+
14+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
15+
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16+
[assembly: System.Reflection.AssemblyCopyrightAttribute("© Microsoft Corporation. All rights reserved.")]
17+
[assembly: System.Reflection.AssemblyDescriptionAttribute(@"LUISGen is a tool for generating a strongly typed C# class or typescript interface to make consuming LUIS output easier in the Microsoft Bot Builder SDK. This enables build-time error checking and intellisense against the intents and entities of your LUIS application model.")]
18+
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.1.0")]
19+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.1-local")]
20+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Bot Framework")]
21+
[assembly: System.Reflection.AssemblyTitleAttribute("project4")]
22+
[assembly: System.Reflection.AssemblyVersionAttribute("2.0.1.0")]
23+
24+
// Generated by the MSBuild WriteCodeFragment class.
25+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
063ea9985679fdffbc4becba69ac561f92f2c852
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// Runtime Version:4.0.30319.42000
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
12+
using System.Reflection;
13+
14+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
15+
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16+
[assembly: System.Reflection.AssemblyCopyrightAttribute("© Microsoft Corporation. All rights reserved.")]
17+
[assembly: System.Reflection.AssemblyDescriptionAttribute(@"LUISGen is a tool for generating a strongly typed C# class or typescript interface to make consuming LUIS output easier in the Microsoft Bot Builder SDK. This enables build-time error checking and intellisense against the intents and entities of your LUIS application model.")]
18+
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.1.0")]
19+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.1-local")]
20+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Bot Framework")]
21+
[assembly: System.Reflection.AssemblyTitleAttribute("project5")]
22+
[assembly: System.Reflection.AssemblyVersionAttribute("2.0.1.0")]
23+
24+
// Generated by the MSBuild WriteCodeFragment class.
25+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ef6dea4726012fb20aae4e9fab90c2ca7a8d450b

0 commit comments

Comments
 (0)