From 9376abd3ae700b821af1a74637f969a1583099c5 Mon Sep 17 00:00:00 2001 From: fraliv13 <5892139+fraliv13@users.noreply.github.com> Date: Mon, 4 Nov 2019 10:45:20 +0200 Subject: [PATCH] Added typescript typings and es modules to the npm package (#16) * so far... * package esm modules update - tests failing! * fixed babel config for tests * use es6 for esm release * Added typescript typings --- babel.config.js | 85 ++++-- package.json | 7 +- packages/pure-validations-react/package.json | 9 +- .../src/dirtyInfo/index.d.ts | 8 + .../__tests__/useDirtyFieldValidation.js | 2 +- .../hooks/__tests__/useValidation.tests.js | 2 +- .../src/hooks/index.d.ts | 42 +++ .../src/hooks/useDirtyFieldValidation.js | 2 +- .../pure-validations-react/src/index.d.ts | 3 + .../src/validationProxy/index.d.ts | 14 + packages/pure-validations-react/tsconfig.json | 3 + packages/pure-validations/package.json | 9 +- .../src/higherOrderValidators/index.d.ts | 115 ++++++++ packages/pure-validations/src/index.d.ts | 5 + .../src/primitiveValidators/index.d.ts | 21 ++ packages/pure-validations/src/validation.d.ts | 8 + .../pure-validations/src/validationError.d.ts | 6 + packages/pure-validations/src/validator.d.ts | 21 ++ packages/pure-validations/tsconfig.json | 3 + packages/zion/package.json | 5 +- scripts/copy-files.js | 22 +- tsconfig.json | 24 ++ tslint.json | 14 + yarn.lock | 264 +++++++++++++++++- 24 files changed, 648 insertions(+), 46 deletions(-) create mode 100644 packages/pure-validations-react/src/dirtyInfo/index.d.ts create mode 100644 packages/pure-validations-react/src/hooks/index.d.ts create mode 100644 packages/pure-validations-react/src/index.d.ts create mode 100644 packages/pure-validations-react/src/validationProxy/index.d.ts create mode 100644 packages/pure-validations-react/tsconfig.json create mode 100644 packages/pure-validations/src/higherOrderValidators/index.d.ts create mode 100644 packages/pure-validations/src/index.d.ts create mode 100644 packages/pure-validations/src/primitiveValidators/index.d.ts create mode 100644 packages/pure-validations/src/validation.d.ts create mode 100644 packages/pure-validations/src/validationError.d.ts create mode 100644 packages/pure-validations/src/validator.d.ts create mode 100644 packages/pure-validations/tsconfig.json create mode 100644 tsconfig.json create mode 100644 tslint.json diff --git a/babel.config.js b/babel.config.js index 0857df8..7b57ce4 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,37 +1,74 @@ module.exports = api => { + + api.cache.using(() => process.env.NODE_ENV) + const defaultAlias = { "@totalsoft/zion": "@totalsoft/zion/src", "@totalsoft/pure-validations": "@totalsoft/pure-validations/src" }; - const presets = api.env("test") - ? [ - [ - "@babel/preset-env", - { - targets: { node: "current" } - } - ] - ] - : []; + + // const presets = api.env("test") + // ? [ + // [ + // "@babel/preset-env", + // { + // targets: { node: "current" } + // } + // ] + // ] + // : []; const defaultPlugins = [["@babel/plugin-proposal-pipeline-operator", { proposal: "minimal" }], "@babel/plugin-proposal-optional-chaining"]; - const plugins = api.env("test") - ? [ - ...defaultPlugins, - [ - "babel-plugin-module-resolver", - { - root: ["./"], - alias: defaultAlias - } - ] - ] - : [...defaultPlugins, ["@babel/plugin-transform-modules-commonjs"]]; + // const plugins = api.env("test") + // ? [ + // ...defaultPlugins, + // [ + // "babel-plugin-module-resolver", + // { + // root: ["./"], + // alias: defaultAlias + // } + // ] + // ] + // : [...defaultPlugins, ["@babel/plugin-transform-modules-commonjs"]]; return { - presets, - plugins + plugins: defaultPlugins, + env: { + cjs: { + presets: [ + [ + "@babel/preset-env", + { + modules: "commonjs" + } + ] + ], + }, + esm: { + plugins: [["@babel/plugin-transform-runtime", { useESModules: true }]] + }, + test: { + presets: [ + [ + "@babel/preset-env", + { + targets: { node: "current" } + } + ] + ], + plugins: [ + [ + "babel-plugin-module-resolver", + { + root: ["./"], + alias: defaultAlias + } + ] + ] + } + } }; }; diff --git a/package.json b/package.json index 59d7134..85f3efb 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,13 @@ "@babel/plugin-transform-modules-commonjs": "^7.6.0", "@babel/plugin-proposal-optional-chaining": "^7.2.0", "@babel/plugin-proposal-pipeline-operator": "^7.5.0", + "@babel/plugin-transform-runtime": "^7.6.2", "@babel/preset-env": "^7.5.5", "babel-eslint": "^10.0.2", "babel-jest": "^24.9.0", "babel-plugin-module-resolver": "^3.0.0", + "cross-env": "^6.0.3", + "dtslint": "^0.9.3", "eslint": "^6.2.0", "eslint-plugin-babel": "^5.3.0", "eslint-plugin-jest": "^22.16.0", @@ -26,7 +29,9 @@ "i18next": "^17.0.11", "react": "^16.9.0", "react-i18next": "^9.0.0", - "glob": "^7.1.2" + "glob": "^7.1.2", + "tern": "0.24.2", + "ts-toolbelt": "4.9.15" }, "workspaces": [ "packages/*" diff --git a/packages/pure-validations-react/package.json b/packages/pure-validations-react/package.json index 102f548..c42bbb7 100644 --- a/packages/pure-validations-react/package.json +++ b/packages/pure-validations-react/package.json @@ -5,9 +5,14 @@ "main": "lib/index.js", "scripts": { "prebuild": "rimraf build", - "build": "babel src/ --out-dir build/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" && node ../../scripts/copy-files.js", + "build": "yarn build:cjs && yarn build:esm && yarn build:copy-files", + "build:cjs": "cross-env BABEL_ENV=cjs babel src/ --out-dir build/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\"", + "build:esm": "cross-env BABEL_ENV=esm babel src/ --out-dir build/esm --ignore \"**/__tests__\" --ignore \"**/__mocks__\"", + "build:copy-files": "node ../../scripts/copy-files.js", + "prepare": "yarn run build", - "test": "jest --watchAll" + "test": "jest --watchAll", + "typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{ts,tsx}\"" }, "repository": { "type": "git", diff --git a/packages/pure-validations-react/src/dirtyInfo/index.d.ts b/packages/pure-validations-react/src/dirtyInfo/index.d.ts new file mode 100644 index 0000000..2c9f6b8 --- /dev/null +++ b/packages/pure-validations-react/src/dirtyInfo/index.d.ts @@ -0,0 +1,8 @@ +export type DirtyInfo = { + [key: string]: boolean | DirtyInfo; +}; + +export function create(isDirty: boolean): DirtyInfo; +export function update(propertyPath: string, propertyDirtyInfo: boolean, dirtyInfo: DirtyInfo): void; +export function merge(sourceDirtyInfo: DirtyInfo, targetDirtyInfo: DirtyInfo): void; +export function isPropertyDirty(propertyPath: string, dirtyInfo: DirtyInfo): boolean; diff --git a/packages/pure-validations-react/src/hooks/__tests__/useDirtyFieldValidation.js b/packages/pure-validations-react/src/hooks/__tests__/useDirtyFieldValidation.js index f4a6006..3dc4b00 100644 --- a/packages/pure-validations-react/src/hooks/__tests__/useDirtyFieldValidation.js +++ b/packages/pure-validations-react/src/hooks/__tests__/useDirtyFieldValidation.js @@ -1,5 +1,5 @@ import { renderHook, act } from "@testing-library/react-hooks"; -import { useDirtyFieldValidation } from "../useDirtyFieldValidation"; +import { useDirtyFieldValidation } from "../"; import { Validator, Success, Failure, isValid, validate, __clearMocks } from "@totalsoft/pure-validations"; import { eject } from "../../validationProxy"; diff --git a/packages/pure-validations-react/src/hooks/__tests__/useValidation.tests.js b/packages/pure-validations-react/src/hooks/__tests__/useValidation.tests.js index 08640d5..f450b28 100644 --- a/packages/pure-validations-react/src/hooks/__tests__/useValidation.tests.js +++ b/packages/pure-validations-react/src/hooks/__tests__/useValidation.tests.js @@ -1,5 +1,5 @@ import { renderHook, act } from "@testing-library/react-hooks"; -import { useValidation } from "../useValidation"; +import { useValidation } from "../"; import { isValid, Validator, Success, Failure, validate, logTo, filterFields, __clearMocks } from "@totalsoft/pure-validations"; describe("useValidation hook", () => { diff --git a/packages/pure-validations-react/src/hooks/index.d.ts b/packages/pure-validations-react/src/hooks/index.d.ts new file mode 100644 index 0000000..7953313 --- /dev/null +++ b/packages/pure-validations-react/src/hooks/index.d.ts @@ -0,0 +1,42 @@ +import { Validator, Logger, FilterFunc, Success, Failure } from "@totalsoft/pure-validations"; +import { ValidatorContext } from "packages/pure-validations/src/validator"; + +/** + * React hook for model validation using the @totalsof/pure-validation library. + * Returns a statefull validation result, a function that performs the validation and a function that resets the validation state. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations-react#usevalidation-hook + */ +export function useValidation( + rules: Validator, + options?: { isLogEnabled: boolean; logger: Logger; fieldFilterFunc: FilterFunc }, + deps?: any[] +): [ + // Validation result + Success | Failure, + + // Validate function + (model: any, context?: ValidatorContext) => boolean, + + // Reset validation function + () => void +]; + +/** + * React hook that uses dirty fields info to validate only the fields that were modified. + * Returns a statefull validation result, a function that performs the validation and a function that resets the validation state. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations-react#usedirtyfieldvalidation-hook + */ +export function useDirtyFieldValidation( + rules: Validator, + options?: { isLogEnabled: boolean; logger: Logger; fieldFilterFunc: FilterFunc }, + deps?: any[] +): [ + // Validation result + Success | Failure, + + // Validate function + (model: any, dirtyinfo?: any) => boolean, + + // Reset validation function + () => void +]; diff --git a/packages/pure-validations-react/src/hooks/useDirtyFieldValidation.js b/packages/pure-validations-react/src/hooks/useDirtyFieldValidation.js index 297b654..117919d 100644 --- a/packages/pure-validations-react/src/hooks/useDirtyFieldValidation.js +++ b/packages/pure-validations-react/src/hooks/useDirtyFieldValidation.js @@ -1,5 +1,5 @@ import { useState, useCallback } from 'react'; -import { useValidation } from './useValidation' +import { useValidation } from './' import * as di from '../dirtyInfo'; export function useDirtyFieldValidation(rules, options = {}, deps = []) { diff --git a/packages/pure-validations-react/src/index.d.ts b/packages/pure-validations-react/src/index.d.ts new file mode 100644 index 0000000..03b75ef --- /dev/null +++ b/packages/pure-validations-react/src/index.d.ts @@ -0,0 +1,3 @@ +export * from "./hooks"; +export * from "./dirtyInfo"; +export * from "./validationProxy"; diff --git a/packages/pure-validations-react/src/validationProxy/index.d.ts b/packages/pure-validations-react/src/validationProxy/index.d.ts new file mode 100644 index 0000000..09bbfcc --- /dev/null +++ b/packages/pure-validations-react/src/validationProxy/index.d.ts @@ -0,0 +1,14 @@ +import { Success, Failure } from "@totalsoft/pure-validations"; + +export function eject(validationProxy: ValidationProxy): object; + +export function getErrors(validationProxy: ValidationProxy, separator: string): string; + +export function isValid(validationProxy: ValidationProxy): boolean; + +export type Proxy = { + [k in keyof T]: T[k]; +}; + +export type ValidationProxy = Proxy; +export function ValidationProxy(validation: Success | Failure): ValidationProxy; diff --git a/packages/pure-validations-react/tsconfig.json b/packages/pure-validations-react/tsconfig.json new file mode 100644 index 0000000..17ee5b1 --- /dev/null +++ b/packages/pure-validations-react/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig" +} \ No newline at end of file diff --git a/packages/pure-validations/package.json b/packages/pure-validations/package.json index 76e2cbe..2d24e32 100644 --- a/packages/pure-validations/package.json +++ b/packages/pure-validations/package.json @@ -5,9 +5,14 @@ "main": "index.js", "scripts": { "prebuild": "rimraf build", - "build": "babel src/ --out-dir build/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" && node ../../scripts/copy-files.js", + "build": "yarn build:cjs && yarn build:esm && yarn build:copy-files", + "build:cjs": "cross-env BABEL_ENV=cjs babel src/ --out-dir build/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\"", + "build:esm": "cross-env BABEL_ENV=esm babel src/ --out-dir build/esm --ignore \"**/__tests__\" --ignore \"**/__mocks__\"", + "build:copy-files": "node ../../scripts/copy-files.js", + "prepare": "yarn run build", - "test": "jest --watchAll" + "test": "jest --watchAll", + "typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{ts,tsx}\"" }, "author": "TotalSoft", "homepage": "https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations", diff --git a/packages/pure-validations/src/higherOrderValidators/index.d.ts b/packages/pure-validations/src/higherOrderValidators/index.d.ts new file mode 100644 index 0000000..9133d06 --- /dev/null +++ b/packages/pure-validations/src/higherOrderValidators/index.d.ts @@ -0,0 +1,115 @@ +import { ValidationError } from "../index"; +import { Validator, ValidatorContext } from "../validator"; + +/** + * Used to reduce a list of validators. It calls all validators and concatenate their failures. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#concatfailure + */ +export function concatFailure(validators: Array>): Validator; + +/** + * Sets a custom error message for validation errors. The message can also be a translation key. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#errorMessage + */ +export function errorMessage(message: string, validator: Validator): Validator; + +/** + * Sets a custom error message for validation errors. The message can also be a translation key. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#errorMessage + */ +export function errorMessage(message: string): (validator: Validator) => Validator; + +/** + * Used to validate just a field of the model. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#field + */ +export function field(key: string, validator: Validator): Validator; + +/** + * Used to validate just a field of the model. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#field + */ +export function field(key: string): (validator: Validator) => Validator; + +export type FilterFunc = (ctx: ValidatorContext) => boolean; + +/** + * Applies validation only on the fields filtered according to the speciffied predicate. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#filterFields + */ +export function filterFields(fieldFilter: FilterFunc, validator: Validator): Validator; + +/** + * Applies validation only on the fields filtered according to the speciffied predicate. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#filterFields + */ +export function filterFields(fieldFilter: FilterFunc): (validator: Validator) => Validator; + +/** + * Useful when you need the model in the composition process. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#frommodel + */ +export function fromModel(validatorFactory: (model: TModel) => Validator): Validator; + +/** + * Useful when you need the parent model in the composition process. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#fromparent + */ +export function fromParent(validatorFactory: (parentModel: any) => Validator): Validator; + +/** + * Useful when you need the root model in the composition process. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#fromroot + */ +export function fromRoot(validatorFactory: (rootModel: any) => Validator): Validator; + +/** + * Takes an item validator and produces a validator for each item in the provided collection. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#items + */ +export function items(itemValidator: Validator): Validator; + +export type Logger = { log: (message: string) => void }; + +/** + * Logs the validation process to the speficfied logger. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#logto + */ +export function logTo(logger: Logger, validator: Validator): Validator; + +/** + * Logs the validation process to the speficfied logger. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#logto + */ +export function logTo(logger: Logger): (validator: Validator) => Validator; + +export type Reader = { computation: (ctx: TContext) => TValue }; +export function parent(reader: Reader): Reader; + +export function readFrom(func: (ctx: TContext) => TValue): Reader; + +/** + * Used to compose a complex validator from field validators. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#shape + */ +export function shape }>( + validatorObj: TValidatorObj +): Validator<{ [k in keyof TValidatorObj]: TValidatorObj[k] extends Validator ? U : unknown }>; + +/** + * Used to reduce a list of validators. It calls all the validators until it receives a failure. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#stoponfirstfailure + */ +export function stopOnFirstFailure(validators: Array>): Validator; + +/** + * Used to create a conditional validator by providing a predicate or condition and a validator. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#stoponfirstfailure + */ +export function when(condition: boolean | ((model: TModel, ctx?: any) => boolean), validator: Validator): Validator; + +/** + * Used to create a conditional validator by providing a predicate or condition and a validator. + * @see https://github.com/osstotalsoft/jsbb/tree/master/packages/pure-validations#stoponfirstfailure + */ +export function when(condition: boolean | ((model: TModel, ctx?: any) => boolean)): (validator: Validator) => Validator; diff --git a/packages/pure-validations/src/index.d.ts b/packages/pure-validations/src/index.d.ts new file mode 100644 index 0000000..74ee614 --- /dev/null +++ b/packages/pure-validations/src/index.d.ts @@ -0,0 +1,5 @@ +export * from "./higherOrderValidators"; +export * from "./primitiveValidators"; +export { Failure, Success, isValid, getErrors, getInner } from "./validation"; +export { Validator, validate } from "./validator"; +export { default as ValidationError } from "./validationError"; diff --git a/packages/pure-validations/src/primitiveValidators/index.d.ts b/packages/pure-validations/src/primitiveValidators/index.d.ts new file mode 100644 index 0000000..aa8b36d --- /dev/null +++ b/packages/pure-validations/src/primitiveValidators/index.d.ts @@ -0,0 +1,21 @@ +import { Validator } from "../index"; + +export const atLeastOne: Validator; + +export const email: Validator; + +export function greaterThan(min: number): Validator; + +export function lessThan(max: number): Validator; + +export function between(min: number, max: number): Validator; + +export function matches(regex: RegExp): Validator; + +export function maxLength(max: number): Validator; + +export function minLength(min: number): Validator; + +export const required: Validator; + +export function unique(selector: string | string[], displayName: string): Validator; diff --git a/packages/pure-validations/src/validation.d.ts b/packages/pure-validations/src/validation.d.ts new file mode 100644 index 0000000..3b9492b --- /dev/null +++ b/packages/pure-validations/src/validation.d.ts @@ -0,0 +1,8 @@ +import ValidationError from "./validationError"; + +export interface Success {} +export interface Failure {} +export function Failure(validationError: ValidationError): Failure; +export function getErrors(validation: Success | Failure): string[]; +export function getInner(path: string[], validation: Success | Failure): Success | Failure; +export function isValid(validation: Success | Failure): boolean; diff --git a/packages/pure-validations/src/validationError.d.ts b/packages/pure-validations/src/validationError.d.ts new file mode 100644 index 0000000..267adb9 --- /dev/null +++ b/packages/pure-validations/src/validationError.d.ts @@ -0,0 +1,6 @@ +interface ValidationError {} +declare let ValidationError: { + (errors: string | string[], fields?: { [key: string]: ValidationError }): ValidationError; +}; + +export default ValidationError; diff --git a/packages/pure-validations/src/validator.d.ts b/packages/pure-validations/src/validator.d.ts new file mode 100644 index 0000000..adf0152 --- /dev/null +++ b/packages/pure-validations/src/validator.d.ts @@ -0,0 +1,21 @@ +import { F } from "ts-toolbelt"; +import { Success, Failure } from "./validation"; + +export type ValidatorContext = { + fieldPath: string[]; + fieldFilter: (context: ValidatorContext) => boolean; + log: boolean; + logger: { log: (message: string) => void }; + parentModel: any; + parentContext: any; + [key: string]: any; +}; + +export interface Validator {} +export let Validator: { + (func: (model: TModel, context?: ValidatorContext) => Success | Failure): Validator; + of(validation: Success | Failure): Validator; +}; + +export function validate(validator: Validator, model: TModel, ctx?: ValidatorContext): Success | Failure; +export function validate(validator: Validator): F.Curry<(model: TModel, ctx?: ValidatorContext) => Success | Failure>; diff --git a/packages/pure-validations/tsconfig.json b/packages/pure-validations/tsconfig.json new file mode 100644 index 0000000..17ee5b1 --- /dev/null +++ b/packages/pure-validations/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig" +} \ No newline at end of file diff --git a/packages/zion/package.json b/packages/zion/package.json index bd7a054..d1c69a5 100644 --- a/packages/zion/package.json +++ b/packages/zion/package.json @@ -6,7 +6,10 @@ "module": "./index.js", "scripts": { "prebuild": "rimraf build", - "build": "babel src/ --out-dir build/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" && node ../../scripts/copy-files.js", + "build": "yarn build:cjs && yarn build:esm && yarn build:copy-files", + "build:cjs": "cross-env BABEL_ENV=cjs babel src/ --out-dir build/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\"", + "build:esm": "cross-env BABEL_ENV=esm babel src/ --out-dir build/esm --ignore \"**/__tests__\" --ignore \"**/__mocks__\"", + "build:copy-files": "node ../../scripts/copy-files.js", "prepare": "yarn run build", "test": "jest --watchAll" }, diff --git a/scripts/copy-files.js b/scripts/copy-files.js index dfb0a5e..da48617 100644 --- a/scripts/copy-files.js +++ b/scripts/copy-files.js @@ -24,8 +24,8 @@ async function createModulePackages({ from, to }) { directoryPackages.map(async directoryPackage => { const packageJson = { sideEffects: false, - module: path.join('./index.js'), - //typings: './index.d.ts', + module: path.join('../esm', directoryPackage, 'index.js'), + typings: './index.d.ts', }; const packageJsonPath = path.join(to, directoryPackage, 'package.json'); @@ -43,6 +43,17 @@ async function createModulePackages({ from, to }) { ); } +async function typescriptCopy({ from, to }) { + if (!(await fse.exists(to))) { + console.warn(`path ${to} does not exists`); + return []; + } + + const files = glob.sync('**/*.d.ts', { cwd: from }); + const cmds = files.map(file => fse.copy(path.resolve(from, file), path.resolve(to, file))); + return Promise.all(cmds); +} + async function createPackageFile() { const packageData = await fse.readFile(path.resolve(packagePath, './package.json'), 'utf8'); // eslint-disable-next-line no-unused-vars @@ -52,7 +63,9 @@ async function createPackageFile() { const newPackageData = { ...packageDataOther, private: false, - main: './index.js' + main: './index.js', + module: './esm/index.js', + typings: './index.d.ts' }; const targetPath = path.resolve(buildPath, './package.json'); @@ -66,6 +79,9 @@ async function run() { try { await createPackageFile(); + // TypeScript + await typescriptCopy({ from: srcPath, to: buildPath }); + await createModulePackages({ from: srcPath, to: buildPath }); } catch (err) { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7e8f253 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es6", "dom"], + "jsx": "react", + "moduleResolution": "node", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noEmit": true, + "experimentalDecorators": true, + "baseUrl": "./", + "allowSyntheticDefaultImports": true, + "noErrorTruncation": true, + "allowJs": true, + "paths": { + "@totalsoft/pure-validations": ["./packages/pure-validations/src"], + "@totalsoft/pure-validations-react": ["./packages/pure-validations-react/src"], + "@totalsoft/zion": ["./packages/zion/src"], + "@totalsoft/zion/*": ["./packages/zion/src/*"] + } + }, + "exclude": ["**/build/"] + } \ No newline at end of file diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..af9c05e --- /dev/null +++ b/tslint.json @@ -0,0 +1,14 @@ +{ + "defaultSeverity": "error", + "extends": ["dtslint/dtslint.json"], + "jsRules": {}, + "rules": { + "deprecation": true, + "file-name-casing": [true, "camel-case"], + "no-empty-interface": false, + "no-unnecessary-generics": true, + "no-redundant-jsdoc": false, + "interface-over-type-literal": false, + "semicolon": [true, "always", "ignore-bound-class-methods"] + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 1dcc311..7ba898b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -549,6 +549,16 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-runtime@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.2.tgz#2669f67c1fae0ae8d8bf696e4263ad52cb98b6f8" + integrity sha512-cqULw/QB4yl73cS5Y0TZlQSjDvNkzDbu0FurTZyHlJpWE5T3PCMdnyV+xXoH1opr1ldyHODe3QAX3OMAii5NxA== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + resolve "^1.8.1" + semver "^5.5.1" + "@babel/plugin-transform-shorthand-properties@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" @@ -1759,6 +1769,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446" integrity sha512-Otxmr2rrZLKRYIybtdG/sgeO+tHY20GxeDjcGmUnmmlCWyEnv2a2x1ZXBo3BTec4OiTXMQCiazB8NMBf0iRlFw== +"@types/parsimmon@^1.3.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@types/parsimmon/-/parsimmon-1.10.0.tgz#ffb81cb023ff435a41d4710a29ab23c561dc9fdf" + integrity sha512-bsTIJFVQv7jnvNiC42ld2pQW2KRI+pAG243L+iATvqzy3X6+NH1obz2itRKDZZ8VVhN3wjwYax/VBGCcXzgTqQ== + "@types/prop-types@*": version "15.7.3" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" @@ -1878,7 +1893,14 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.0.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.2.tgz#84b68ea44b373c4f8686023a551f61a21b7c4a4f" integrity sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw== -acorn-walk@^6.0.1: +acorn-loose@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/acorn-loose/-/acorn-loose-6.1.0.tgz#3b2de5b3fc64f811c7b6c07cd9128d1476817f94" + integrity sha512-FHhXoiF0Uch3IqsrnPpWwCtiv5PYvipTpT1k9lDMgQVVYc9iDuSl5zdJV358aI8twfHCYMFBRVYvAVki9wC/ng== + dependencies: + acorn "^6.2.0" + +acorn-walk@^6.0.0, acorn-walk@^6.0.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== @@ -1893,7 +1915,7 @@ acorn@^5.5.0, acorn@^5.5.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.0.7: +acorn@^6.0.0, acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== @@ -2123,6 +2145,15 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + babel-eslint@^10.0.2: version "10.0.3" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a" @@ -2293,6 +2324,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -2433,7 +2469,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2566,6 +2602,16 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +command-exists@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291" + integrity sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw== + +commander@^2.12.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@^2.8.1, commander@~2.20.0: version "2.20.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.1.tgz#3863ce3ca92d0831dcf2a102f5fb4b5926afd0f9" @@ -2762,6 +2808,13 @@ cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" +cross-env@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.3.tgz#4256b71e49b3a40637a0ce70768a6ef5c72ae941" + integrity sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag== + dependencies: + cross-spawn "^7.0.0" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -2773,6 +2826,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" + integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.8" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" @@ -2940,6 +3002,22 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +definitelytyped-header-parser@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/definitelytyped-header-parser/-/definitelytyped-header-parser-1.2.0.tgz#f21374b8a18fabcd3ba4b008a0bcbc9db2b7b4c4" + integrity sha512-xpg8uu/2YD/reaVsZV4oJ4g7UDYFqQGWvT1W9Tsj6q4VtWBSaig38Qgah0ZMnQGF9kAsAim08EXDO1nSi0+Nog== + dependencies: + "@types/parsimmon" "^1.3.0" + parsimmon "^1.2.0" + +definitelytyped-header-parser@^3.7.2: + version "3.8.0" + resolved "https://registry.yarnpkg.com/definitelytyped-header-parser/-/definitelytyped-header-parser-3.8.0.tgz#9d4b9d97f8c4c1abd62af736283247b527a4a8f1" + integrity sha512-CjVhNRDk4TeNcuibX5BAGLafwZSypnUR6QqVsNlLB5v5vZbcHM+v6qyNOGyQUV4mVEx3NhQvTJvzMJj4h4QWVQ== + dependencies: + "@types/parsimmon" "^1.3.0" + parsimmon "^1.2.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -2983,6 +3061,11 @@ diff-sequences@^24.9.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== +diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + dir-glob@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" @@ -3023,6 +3106,35 @@ dot-prop@^4.2.0: dependencies: is-obj "^1.0.0" +download-file-sync@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/download-file-sync/-/download-file-sync-1.0.4.tgz#d3e3c543f836f41039455b9034c72e355b036019" + integrity sha1-0+PFQ/g29BA5RVuQNMcuNVsDYBk= + +dts-critic@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/dts-critic/-/dts-critic-2.2.0.tgz#ab76f40dafe9f4a8d2588b7a84a52a342b81aef4" + integrity sha512-QFVMR85VMyqI8zfnboyRGNvkf+NOk+i/13V09Z/M8Kh/WivOId8TIO6q0d3NAmGyRJXP5TjQmxadWmwTFn1HBQ== + dependencies: + command-exists "^1.2.8" + definitelytyped-header-parser "^1.2.0" + download-file-sync "^1.0.4" + semver "^6.2.0" + yargs "^12.0.5" + +dtslint@^0.9.3: + version "0.9.9" + resolved "https://registry.yarnpkg.com/dtslint/-/dtslint-0.9.9.tgz#27e861da27520758b3ab07e61c5db5b6b05fba95" + integrity sha512-rSeyOPBcLRsMR7MXSVTU4SIgPQdBGDLjiivTlxOzPFUYUsOTYWBkJ69pxtZU4M0j6eaCJMC3MnEKfr9fqYASTQ== + dependencies: + definitelytyped-header-parser "^3.7.2" + dts-critic "^2.2.0" + fs-extra "^6.0.1" + request "^2.88.0" + strip-json-comments "^2.0.1" + tslint "5.14.0" + typescript next + duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -3070,6 +3182,16 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@^2.2.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-2.3.0.tgz#a115c32504b6302e85a76269d7a57ccdd962e359" + integrity sha1-oRXDJQS2MC6Fp2Jp16V8zdli41k= + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.3.0" + object-assign "^4.0.1" + tapable "^0.2.3" + env-paths@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-1.0.0.tgz#4168133b42bb05c38a35b1ae4397c8298ab369e0" @@ -3080,6 +3202,13 @@ err-code@^1.0.0: resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= +errno@^0.1.3: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + dependencies: + prr "~1.0.1" + error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3606,6 +3735,15 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" +fs-extra@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" + integrity sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -4811,7 +4949,12 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.0, js-yaml@^3.13.1: +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.7.0: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -5232,6 +5375,14 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memory-fs@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" + integrity sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -5314,7 +5465,7 @@ mimic-fn@^2.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4: +minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -5988,6 +6139,11 @@ parse5@4.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== +parsimmon@^1.2.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/parsimmon/-/parsimmon-1.13.0.tgz#6e4ef3dbd45ed6ea6808be600ac4b9c8a44228cf" + integrity sha512-5UIrOCW+gjbILkjKPgTgmq8LKf8TT3Iy7kN2VD7OtQ81facKn8B4gG1X94jWqXYZsxG2KbJhrv/Yq/5H6BQn7A== + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" @@ -6025,6 +6181,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-key@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3" + integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg== + path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -6225,6 +6386,11 @@ protoduck@^5.0.1: dependencies: genfun "^5.0.0" +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + psl@^1.1.24, psl@^1.1.28: version "1.4.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" @@ -6405,7 +6571,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -6568,7 +6734,7 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.87.0: +request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -6626,6 +6792,11 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-from@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -6646,7 +6817,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.4.0: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== @@ -6822,11 +6993,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -7230,6 +7413,11 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" +tapable@^0.2.3: + version "0.2.9" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.9.tgz#af2d8bbc9b04f74ee17af2b4d9048f807acd18a8" + integrity sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A== + tar@^4, tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" @@ -7260,6 +7448,19 @@ temp-write@^3.4.0: temp-dir "^1.0.0" uuid "^3.0.1" +tern@0.24.2: + version "0.24.2" + resolved "https://registry.yarnpkg.com/tern/-/tern-0.24.2.tgz#a6826756afe87a539b4629375721fad2536de48e" + integrity sha512-pVJhZp1vvv2ewgPv6YwNsyCU+ComJdHBtTajDo/EdfGHY2CLCQ53ucgCzvWfFx+KXls0H6sRwnDMY8Qo+aQviw== + dependencies: + acorn "^6.0.0" + acorn-loose "^6.0.0" + acorn-walk "^6.0.0" + enhanced-resolve "^2.2.2" + glob "^7.1.1" + minimatch "^3.0.3" + resolve-from "2.0.0" + test-exclude@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -7399,11 +7600,42 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -tslib@^1.9.0: +ts-toolbelt@4.9.15: + version "4.9.15" + resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-4.9.15.tgz#2a2c5127cafa870d41b34c0e1d0b0564732b34cb" + integrity sha512-K3su2JwaXRR0gDOw2UpkFQ7z5sym1/b5OvWdsQTug0MgJMO36DybtEsWjSg8HwnpC8Nw6QiYvoEFQgSWuCMhcA== + +tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== +tslint@5.14.0: + version "5.14.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.14.0.tgz#be62637135ac244fc9b37ed6ea5252c9eba1616e" + integrity sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ== + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + mkdirp "^0.5.1" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.29.0" + +tsutils@^2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -7438,6 +7670,11 @@ typescript@^3.2.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.3.tgz#fea942fabb20f7e1ca7164ff626f1a9f3f70b4da" integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw== +typescript@next: + version "3.8.0-dev.20191031" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.0-dev.20191031.tgz#d19f77c9a6314f35d9e11381c93fffb3cff9bb1c" + integrity sha512-hnIkoA1tdqCoO71ocviQg+ojLPwuZw6IxUtW12hhI+0XCpqNinQOcvUJlak0pVRUKL6vMRjvmhMbE0+uDJp/sA== + uglify-js@^3.1.4: version "3.6.0" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" @@ -7684,6 +7921,13 @@ which@1, which@^1.2.9, which@^1.3.0, which@^1.3.1: dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.1.tgz#f1cf94d07a8e571b6ff006aeb91d0300c47ef0a4" + integrity sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w== + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -7830,7 +8074,7 @@ yargs-parser@^13.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^12.0.1: +yargs@^12.0.1, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==