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

Commit cda90ea

Browse files
author
Chris McConnell
authored
Switch to $kind for schemas (#391)
* Change from $type to $kind. Change unionType to union. Add documentation. * Move from $type to $kind. * Enable schema tests.
1 parent 623658a commit cda90ea

File tree

68 files changed

+347
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+347
-303
lines changed

.vscode/launch.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "Dialog Merge Tests",
11+
"preLaunchTask": "${defaultBuildTask}",
1112
"program": "${workspaceFolder}/packages/dialog/node_modules/mocha/bin/_mocha",
1213
"cwd": "${workspaceFolder}/packages/dialog",
1314
"args": [
@@ -18,7 +19,6 @@
1819
".*Test schema merge.*"
1920
],
2021
"internalConsoleOptions": "openOnSessionStart",
21-
"sourceMaps": true,
2222
"outFiles": [
2323
"./package/dialog/lib/**"
2424
]
@@ -27,6 +27,7 @@
2727
"type": "node",
2828
"request": "launch",
2929
"name": "Dialog Verify Tests",
30+
"preLaunchTask": "${defaultBuildTask}",
3031
"program": "${workspaceFolder}/packages/dialog/node_modules/mocha/bin/_mocha",
3132
"cwd": "${workspaceFolder}/packages/dialog",
3233
"args": [
@@ -37,7 +38,6 @@
3738
".*dialog:verify.*"
3839
],
3940
"internalConsoleOptions": "openOnSessionStart",
40-
"sourceMaps": true,
4141
"outFiles": [
4242
"./package/dialog/lib/**"
4343
]
@@ -46,68 +46,67 @@
4646
"type": "node",
4747
"request": "launch",
4848
"name": "Dialog Generator Tests",
49+
"preLaunchTask": "${defaultBuildTask}",
4950
"program": "${workspaceFolder}/packages/dialog/node_modules/mocha/bin/_mocha",
51+
"cwd": "${workspaceFolder}/packages/dialog",
5052
"args": [
5153
"--timeout",
5254
"999999",
5355
"--colors",
54-
"${workspaceFolder}/test/commands/dialog/generator.test.ts"
56+
"-g",
57+
".*dialog:generate.*"
5558
],
5659
"internalConsoleOptions": "openOnSessionStart",
57-
"sourceMaps": true,
5860
"outFiles": [
5961
"./package/dialog/lib/**"
6062
]
6163
},
62-
63-
// TODO: (chrande) Keeping these but they should probably be rewritten to work on more
64-
// just chrismc's dev machine.
6564
{
6665
"type": "node",
6766
"request": "launch",
6867
"name": "BotBuilder schema",
68+
"preLaunchTask": "${defaultBuildTask}",
6969
"program": "${workspaceFolder}/packages/dialog/bin/run",
7070
"outFiles": [
71-
"${workspaceFolder}/packages/dialog/lib/**/*.js"
71+
"./packages/dialog/lib/**"
7272
],
7373
"args": [
7474
"dialog:merge",
7575
"libraries/**/*.schema",
76-
"-u",
77-
"-b", "master",
78-
"-o", "schemas/sdk.schema",
76+
"-o",
77+
"${env:TEMP}/sdk.schema",
7978
"--verbose"
8079
],
8180
"internalConsoleOptions": "openOnSessionStart",
82-
"cwd": "c:/users/chrimc/source/repos/botbuilder-dotnet"
81+
"cwd": "${workspaceFolder}/../botbuilder-dotnet"
8382
},
8483
{
8584
"type": "node",
8685
"request": "launch",
8786
"name": "Generate Sandwich Form",
87+
"preLaunchTask": "${defaultBuildTask}",
8888
"program": "${workspaceFolder}/packages/dialog/bin/run",
89-
"sourceMaps": true,
9089
"outFiles": [
91-
"${workspaceFolder}/packages/dialog/lib/**/*.js"
90+
"./packages/dialog/lib/**"
9291
],
9392
"args": [
9493
"dialog:generate",
9594
"${workspaceFolder}/packages/dialog/test/commands/dialog/forms/sandwich.form.dialog",
9695
"-o",
9796
"${env:TEMP}/sandwich.out",
9897
"--force",
99-
"--verbose",
98+
"--verbose"
10099
],
101100
"internalConsoleOptions": "openOnSessionStart"
102101
},
103102
{
104103
"type": "node",
105104
"request": "launch",
106105
"name": "Generate Activity Form",
106+
"preLaunchTask": "${defaultBuildTask}",
107107
"program": "${workspaceFolder}/packages/dialog/bin/run",
108-
"preLaunchTask": "tsc: build - tsconfig.json",
109108
"outFiles": [
110-
"${workspaceFolder}/packages/dialog/lib/**/*.js"
109+
"./packages/dialog/lib/**"
111110
],
112111
"args": [
113112
"dialog:generate",
@@ -125,9 +124,10 @@
125124
"type": "node",
126125
"request": "launch",
127126
"name": "Generate Contact Form",
127+
"preLaunchTask": "${defaultBuildTask}",
128128
"program": "${workspaceFolder}/packages/dialog/bin/run",
129129
"outFiles": [
130-
"${workspaceFolder}/packages/dialog/lib/**/*.js"
130+
"./packages/dialog/lib/**"
131131
],
132132
"args": [
133133
"dialog:generate",
@@ -145,9 +145,10 @@
145145
"type": "node",
146146
"request": "launch",
147147
"name": "Generate Opportunity Form",
148+
"preLaunchTask": "${defaultBuildTask}",
148149
"program": "${workspaceFolder}/packages/dialog/bin/run",
149150
"outFiles": [
150-
"${workspaceFolder}/packages/dialog/lib/**/*.js"
151+
"./packages/dialog/lib/**"
151152
],
152153
"args": [
153154
"dialog:generate",

.vscode/tasks.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "shell",
6+
"label": "rush build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"command": "rush build",
12+
"windows": {
13+
"command": "rush.cmd build"
14+
}
15+
}
16+
]
17+
}

packages/dialog/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ USAGE
3535
$ bf dialog:merge GLOB1 [GLOB2] [GLOB3] [GLOB4] [GLOB5] [GLOB6] [GLOB7] [GLOB8] [GLOB9]
3636
3737
OPTIONS
38-
-b, --branch=branch [default: 4.Future] The branch to use for the meta-schema component.schema.
38+
-b, --branch=branch [default: master] The branch to use for the meta-schema component.schema.
3939
-h, --help show CLI help
4040
-o, --output=output [default: app.schema] Output path and filename for merged schema. [default: app.schema]
4141
@@ -78,7 +78,7 @@ USAGE
7878
$ bf dialog:merge GLOB1 [GLOB2] [GLOB3] [GLOB4] [GLOB5] [GLOB6] [GLOB7] [GLOB8] [GLOB9]
7979
8080
OPTIONS
81-
-b, --branch=branch The branch to use for the meta-schema component.schema. [default: 4.Future]
81+
-b, --branch=branch The branch to use for the meta-schema component.schema. [default: master]
8282
-h, --help show CLI help
8383
-o, --output=output Output path and filename for merged schema. [default: app.schema]
8484
-u, --update Update .schema files to point the <branch> component.schema and regenerate component.schema if baseComponent.schema is present.

packages/dialog/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"version": "npm run doc:readme && git add README.md"
3838
},
3939
"dependencies": {
40+
"@oclif/command": "~1.5.13",
41+
"@oclif/errors": "~1.2.2",
4042
"@microsoft/bf-cli-command": "~1.0.0",
4143
"@types/lru-cache": "^5.1.0",
4244
"@types/semver": "^6.0.1",

0 commit comments

Comments
 (0)