From b798c29b6de6ce6553973d25bb654aab313febb7 Mon Sep 17 00:00:00 2001 From: Andrey Chalkin Date: Wed, 27 Mar 2019 14:12:16 +0700 Subject: [PATCH] [xmlbuilder] Remove types --- notNeededPackages.json | 6 ++ types/plist/package.json | 6 ++ types/xmlbuilder/index.d.ts | 134 --------------------------- types/xmlbuilder/tsconfig.json | 23 ----- types/xmlbuilder/tslint.json | 80 ---------------- types/xmlbuilder/xmlbuilder-tests.ts | 115 ----------------------- 6 files changed, 12 insertions(+), 352 deletions(-) create mode 100644 types/plist/package.json delete mode 100644 types/xmlbuilder/index.d.ts delete mode 100644 types/xmlbuilder/tsconfig.json delete mode 100644 types/xmlbuilder/tslint.json delete mode 100644 types/xmlbuilder/xmlbuilder-tests.ts diff --git a/notNeededPackages.json b/notNeededPackages.json index 4df3f8e095..65df659a23 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2436,6 +2436,12 @@ "sourceRepoURL": "https://github.com/nashwaan/xml-js", "asOfVersion": "1.0.0" }, + { + "libraryName": "xmlbuilder", + "typingsPackageName": "xmlbuilder", + "sourceRepoURL": "https://github.com/oozcitak/xmlbuilder-js", + "asOfVersion": "11.0.1" + }, { "libraryName": "@xmpp/jid", "typingsPackageName": "xmpp__jid", diff --git a/types/plist/package.json b/types/plist/package.json new file mode 100644 index 0000000000..87d2f853fc --- /dev/null +++ b/types/plist/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "xmlbuilder": ">=11.0.1" + } +} diff --git a/types/xmlbuilder/index.d.ts b/types/xmlbuilder/index.d.ts deleted file mode 100644 index 831d66f6ec..0000000000 --- a/types/xmlbuilder/index.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -// Type definitions for xmlbuilder -// Project: https://github.com/oozcitak/xmlbuilder-js -// Definitions by: Wallymathieu -// : GaikwadPratik -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = xmlbuilder; - -declare namespace xmlbuilder { - - class XMLDocType { - clone(): XMLDocType; - element(name: string, value?: Object): XMLDocType; - attList(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; - entity(name: string, value: any): XMLDocType; - pEntity(name: string, value: any): XMLDocType; - notation(name: string, value: any): XMLDocType; - cdata(value: string): XMLDocType; - comment(value: string): XMLDocType; - instruction(target: string, value: any): XMLDocType; - root(): XMLDocType; - document(): any; - toString(options?: XMLToStringOptions, level?: Number): string; - - ele(name: string, value?: Object): XMLDocType; - att(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; - ent(name: string, value: any): XMLDocType; - pent(name: string, value: any): XMLDocType; - not(name: string, value: any): XMLDocType; - dat(value: string): XMLDocType; - com(value: string): XMLDocType; - ins(target: string, value: any): XMLDocType; - up(): XMLDocType; - doc(): any; - } - - class XMLElementOrXMLNode { - // XMLElement: - clone(): XMLElementOrXMLNode; - attribute(name: any, value?: any): XMLElementOrXMLNode; - att(name: any, value?: any): XMLElementOrXMLNode; - removeAttribute(name: string): XMLElementOrXMLNode; - instruction(target: string, value: any): XMLElementOrXMLNode; - instruction(array: Array): XMLElementOrXMLNode; - instruction(obj: Object): XMLElementOrXMLNode; - ins(target: string, value: any): XMLElementOrXMLNode; - ins(array: Array): XMLElementOrXMLNode; - ins(obj: Object): XMLElementOrXMLNode; - a(name: any, value?: any): XMLElementOrXMLNode; - i(target: string, value: any): XMLElementOrXMLNode; - i(array: Array): XMLElementOrXMLNode; - i(obj: Object): XMLElementOrXMLNode; - toString(options?: XMLToStringOptions, level?: Number): string; - // XMLNode: - element(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - ele(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - insertBefore(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - insertAfter(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - remove(): XMLElementOrXMLNode; - node(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - text(value: string): XMLElementOrXMLNode; - cdata(value: string): XMLElementOrXMLNode; - comment(value: string): XMLElementOrXMLNode; - raw(value: string): XMLElementOrXMLNode; - declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; - doctype(pubID: string, sysID: string): XMLDocType; - up(): XMLElementOrXMLNode; - importDocument(input: XMLElementOrXMLNode): XMLElementOrXMLNode; - root(): XMLElementOrXMLNode; - document(): any; - end(options?: XMLEndOptions): string; - prev(): XMLElementOrXMLNode; - next(): XMLElementOrXMLNode; - nod(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - txt(value: string): XMLElementOrXMLNode; - dat(value: string): XMLElementOrXMLNode; - com(value: string): XMLElementOrXMLNode; - doc(): XMLElementOrXMLNode; - dec(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; - dtd(pubID: string, sysID: string): XMLDocType; - e(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - n(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - t(value: string): XMLElementOrXMLNode; - d(value: string): XMLElementOrXMLNode; - c(value: string): XMLElementOrXMLNode; - r(value: string): XMLElementOrXMLNode; - u(): XMLElementOrXMLNode; - } - - interface XMLDec { - version?: string; - encoding?: string; - standalone?: boolean; - } - - interface XMLDtd { - pubID?: string; - sysID?: string; - } - - interface XMLStringifier { - [x: string]: ((v: any) => string) | string; - } - - interface XMLWriter { - [x: string]: ((e: XMLElementOrXMLNode, level?: number) => void); - } - - interface XMLCreateOptions { - headless?: boolean; - keepNullNodes?: boolean; - keepNullAttributes?: boolean; - ignoreDecorators?: boolean; - separateArrayItems?: boolean; - noDoubleEncoding?: boolean; - stringify?: XMLStringifier; - } - - interface XMLToStringOptions { - pretty?: boolean; - indent?: string; - offset?: number; - newline?: string; - allowEmpty?: boolean; - spacebeforeslash?: string; - } - - interface XMLEndOptions extends XMLToStringOptions { - writer?: XMLWriter; - } - - function create(nameOrObjSpec: string | { [name: string]: Object }, xmldecOrOptions?: XMLDec | XMLCreateOptions, doctypeOrOptions?: XMLDtd | XMLCreateOptions, options?: XMLCreateOptions): XMLElementOrXMLNode; - function begin(): XMLElementOrXMLNode; -} diff --git a/types/xmlbuilder/tsconfig.json b/types/xmlbuilder/tsconfig.json deleted file mode 100644 index 5b01beda43..0000000000 --- a/types/xmlbuilder/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "xmlbuilder-tests.ts" - ] -} \ No newline at end of file diff --git a/types/xmlbuilder/tslint.json b/types/xmlbuilder/tslint.json deleted file mode 100644 index 3d59f55fda..0000000000 --- a/types/xmlbuilder/tslint.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "npm-naming": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/xmlbuilder/xmlbuilder-tests.ts b/types/xmlbuilder/xmlbuilder-tests.ts deleted file mode 100644 index fb49f20e79..0000000000 --- a/types/xmlbuilder/xmlbuilder-tests.ts +++ /dev/null @@ -1,115 +0,0 @@ - -import xmlbuilder = require('xmlbuilder'); -var xml = xmlbuilder.create; -var doc = xmlbuilder.begin; - -// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/comment.coffee -xml('comment', {}, {}, { headless: true }).comment('<>\'"&\t\n\r').end(); - -// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/instructions.coffee -xml('test17', { headless: true }).ins('pi', 'mypi').end(); - -xml('test17', { headless: true }).ins({ 'pi': 'mypi', 'pi2': 'mypi2', 'pi3': null }).end(); - -xml('test17', { headless: true }).ins(['pi', 'pi2']).end(); - -xml('test18', { headless: true }) - .ins('renderCache.subset', '"Verdana" 0 0 ISO-8859-1 4 268 67 "#(),-./') - .ins('pitarget', () => 'pivalue') - .end(); - -// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/createxml.coffee -xml('root') - .ele('xmlbuilder') - .att('for', 'node-js') - .com('CoffeeScript is awesome.') - .nod('repo') - .att('type', 'git') - .txt('git://github.com/oozcitak/xmlbuilder-js.git') - .up() - .up() - .ele('test') - .att('escaped', 'chars <>\'"&\t\n\r') - .txt('complete 100%<>\'"&\t\n\r') - .up() - .ele('cdata') - .cdata('this is a test\nSecond line') - .up() - .ele('raw') - .raw('&<>&') - .up() - .ele('atttest', { 'att': 'val' }, 'text') - .up() - .ele('atttest', 'text') - .end(); - -// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/basic/begin.coffee -doc().ele('root', { att: 'val' }).ele('test').end(); - -xml({ - displayNotification: { - level: 'error', - message: 'an error occurred' - } -}); - -// https://github.com/oozcitak/xmlbuilder-js/wiki#create -xml('root', { - stringify: { - eleName: function(val) { - return 'myns:' + val; - } - } -}); - -// https://github.com/oozcitak/xmlbuilder-js/wiki#converting-to-string -xml('root').end({ - pretty: true, - indent: ' ', - newline: '\n', - allowEmpty: false, - spacebeforeslash: '' -}); - -xml('root').ele('child').toString({ - pretty: true, - indent: ' ', - offset: 1, - newline: '\n', - spacebeforeslash: '' -}); - -// https://github.com/oozcitak/xmlbuilder-js/wiki#xml-writers -xml('root').end({ - writer: { - document: (doc) => { }, - attribute: (doc) => { }, - cdata: (node, level) => { }, - comment: (node, level) => { }, - declaration: (node, level) => { }, - docType: (node, level) => { }, - element: (node, level) => { }, - processingInstruction: (node, level) => { }, - raw: (node, level) => { }, - text: (node, level) => { }, - dtdAttList: (node, level) => { }, - dtdElement: (node, level) => { }, - dtdEntity: (node, level) => { }, - dtdNotation: (node, level) => { }, - } -}); - -// https://github.com/oozcitak/xmlbuilder-js/wiki/XML-Prolog -xml('xbel', - { version: '1.0', encoding: 'UTF-8'}, - { pubID: '+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML', - sysID: 'http://www.python.org/topics/xml/dtds/xbel-1.0.dtd' - } -); - -xml('root') - .dec('1.0', 'UTF-8', true) - .ele('node'); - -xml('HTML') - .dtd('-//W3C//DTD HTML 4.01//EN', 'http://www.w3.org/TR/html4/strict.dtd');