Comparing version 1.0.0 to 1.0.1
@@ -1,3 +0,3 @@ | ||
import * as WM from './model'; | ||
export declare function parse_windef(windefObj: WM.DataTypes, macroMap: WM.MacroMap, settings?: WM.LoadSettings): WM.DataTypes; | ||
import { DataTypes, LoadSettings, MacroMap } from './model'; | ||
export declare function parse_windef(windefObj: DataTypes, macroMap: MacroMap, settings?: LoadSettings): DataTypes; | ||
export declare function validDataDef(str: string, srcSet: Set<string>): void; |
@@ -7,5 +7,3 @@ 'use strict'; | ||
const ww = clone_filter_windef(windefObj); // output without macroMap | ||
const macroSrc = macroMap && typeof macroMap === 'object' | ||
? prepare_macro(macroMap, settings) | ||
: new Map(); | ||
const macroSrc = prepare_macro(macroMap, settings); | ||
return prepare_windef_ref(ww, macroSrc); | ||
@@ -93,2 +91,5 @@ } | ||
} | ||
else { | ||
continue; // not throw error | ||
} | ||
} | ||
@@ -153,3 +154,2 @@ // 2nd loop paser key , maybe value ref other key | ||
function validDataDef(str, srcSet) { | ||
/* istanbul ignore next */ | ||
if (!str || typeof str !== 'string') { | ||
@@ -156,0 +156,0 @@ throw new Error(`value of param invalid: ${str}`); |
@@ -51,3 +51,3 @@ 'use strict'; | ||
else { | ||
path = path_1.normalize(path); | ||
/* istanbul ignore else */ | ||
if (!await isDirExists(path)) { | ||
@@ -74,2 +74,3 @@ await path.split(path_1.sep).reduce(async (parentDir, childDir) => { | ||
if (!await isFileExists(file)) { | ||
const opts = options ? options : { mode: 0o640 }; | ||
if (typeof data === 'object') { | ||
@@ -79,3 +80,2 @@ await exports.writeFileAsync(file, JSON.stringify(data)); | ||
else { | ||
const opts = options ? options : { mode: 0o640 }; | ||
await exports.writeFileAsync(file, data, opts); | ||
@@ -82,0 +82,0 @@ } |
{ | ||
"name": "win32-def", | ||
"author": "waiting", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "win32 definitions for node-ffi", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59245