Skip to content

Commit bd8160e

Browse files
committed
renamed typing build command from ts-prep-def with build-typedef. fixed null serviceobject default values
1 parent cbfc336 commit bd8160e

File tree

5 files changed

+69
-15
lines changed

5 files changed

+69
-15
lines changed

.vscode/launch.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,31 @@
99
// Type of configuration. Possible values: "node", "mono".
1010
"type": "node",
1111
// Workspace relative or absolute path to the program.
12-
"program": "./build/output/node/test/ManualLiveTesting/app.js",
12+
"program": "${workspaceRoot}//build/output/node/test/ManualLiveTesting/app.js",
1313
// Automatically stop program after launch.
1414
"stopOnEntry": false,
1515
// Command line arguments passed to the program.
1616
"args": [],
1717
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
18-
"cwd": ".",
18+
"cwd": "${workspaceRoot}",
19+
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
20+
"runtimeExecutable": null,
21+
// Environment variables passed to the program.
22+
"env": { }
23+
},
24+
{
25+
// Name of configuration; appears in the launch configuration drop down menu.
26+
"name": "Launch AttachmentTest.js",
27+
// Type of configuration. Possible values: "node", "mono".
28+
"type": "node",
29+
// Workspace relative or absolute path to the program.
30+
"program": "${workspaceRoot}/build/output/node/test/ManualLiveTesting/AttachmentTest.js",
31+
// Automatically stop program after launch.
32+
"stopOnEntry": false,
33+
// Command line arguments passed to the program.
34+
"args": [],
35+
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
36+
"cwd": "${workspaceRoot}",
1937
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
2038
"runtimeExecutable": null,
2139
// Environment variables passed to the program.
@@ -24,10 +42,19 @@
2442
{
2543
"name": "Attach",
2644
"type": "node",
45+
"request": "attach",
2746
// TCP/IP address. Default is "localhost".
2847
"address": "localhost",
2948
// Port to attach to.
3049
"port": 5858
50+
},
51+
{
52+
"name": "Run Mocha Test",
53+
"type": "node",
54+
"request": "launch",
55+
"cwd": "${workspaceRoot}",
56+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
57+
"args": ["${workspaceRoot}/build/output/node/test/mocha/**/*.js"]
3158
}
3259
]
3360
}

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ gulp.task('ts-def-clean', ["ts-def-concat"], function (done) {
222222
del(delconfig, done);
223223
});
224224

225-
gulp.task("ts-prep-def", ['ts-def-clean'])
225+
gulp.task("build-typedef", ['ts-def-clean'])
226226

227227

228228
/**

import fixup script.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,27 @@ if($filetofix -ne $null){
396396
$exports = "export {"
397397
$allfiles.BaseName | %{$exports += "`r`n// $_,"}
398398
$exports += "`r`n};"
399+
400+
$moduleNames = @()
401+
$allthrows = @()
402+
function searchdependencyportstatus($f){
403+
$match = dir ($f + ".ts") -Recurse | Select-String -Pattern '(import).*\".*\/(?<moduleName>.*)\"\;'
404+
if($match)
405+
{
406+
$moduleNames = $match | %{$_.Matches | %{$_.Groups["moduleName"].Value}}
407+
$moduleNames | %{
408+
if($global:moduleNames -notcontains $_){
409+
$global:moduleNames += $_
410+
Write-Host $_ -ForegroundColor Red
411+
$m2 = dir ($_ + ".ts") -Recurse | Select-String -Pattern '^\s+\w.*throw new Error.*Not implemented.*'
412+
$global:allthrows += $m2
413+
write-host "---------------------------------------------------" -ForegroundColor Yellow
414+
#$list
415+
searchdependencyportstatus $_
416+
}
417+
#else{"skipping $_"}
418+
}
419+
420+
}
421+
}
422+
searchdependencyportstatus "Attachment"

src/js/PropertyDefinitions/ComplexPropertyDefinitionBase.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,20 @@ export abstract class ComplexPropertyDefinitionBase extends PropertyDefinition {
111111

112112
propertyBag._setItem(this, outComplexproperty.outValue);
113113
}
114-
114+
115115
/**
116116
* @internal Loads the property value from XMLJsObject.
117117
*
118118
* @param {any} jsObject The JSON value. Can be a JsonObject, string, number, bool, array, or null.
119119
* @param {ExchangeService} service The service.
120120
* @param {PropertyBag} propertyBag The property bag.
121-
*/
121+
*/
122122
LoadPropertyValueFromXmlJsObject(jsObject: any, service: ExchangeService, propertyBag: PropertyBag): void {
123-
//debugger;//update: array type detection in next call, can not call GetPropertyInstance multiple time
124-
this.InternalLoadFromXmlJsObject(jsObject, service, propertyBag);
123+
// check for null value from empty element
124+
if (jsObject) {
125+
//debugger;//update: array type detection in next call, can not call GetPropertyInstance multiple time
126+
this.InternalLoadFromXmlJsObject(jsObject, service, propertyBag);
127+
}
125128
}
126129

127130
/**

0 commit comments

Comments
 (0)