@ts-type/package-dts 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +3 -3
- package/eslintrc-json.js.map +0 -1
- package/index.js.map +0 -1
- package/lerna-json.js.map +0 -1
- package/lib/lerna-json/types.js.map +0 -1
- package/lib/package-json/exports.js.map +0 -1
- package/lib/package-json/extend.js.map +0 -1
- package/lib/package-json/publishConfig.js.map +0 -1
- package/lib/package-json/types.js.map +0 -1
- package/lib/package-json/yarn.js.map +0 -1
- package/lib/types.js.map +0 -1
- package/package-json.js.map +0 -1
- package/script/index.js.map +0 -1
- package/script/util.js.map +0 -1
- package/travis-json.js.map +0 -1
- package/tsconfig-json.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.3](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/package-dts@3.0.2...@ts-type/package-dts@3.0.3) (2026-03-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ts-type/package-dts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.0.2](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/package-dts@3.0.1...@ts-type/package-dts@3.0.2) (2026-03-07)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @ts-type/package-dts
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [3.0.1](https://github.com/bluelovers/ws-ts-type/compare/@ts-type/package-dts@2.0.8...@ts-type/package-dts@3.0.1) (2026-03-07)
|
|
7
23
|
|
|
8
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-type/package-dts",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Typescript type definition for NPM package json",
|
|
6
6
|
"keywords": [
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@types/semver": "^7.7.1",
|
|
72
|
-
"ts-type": "^3.0.
|
|
72
|
+
"ts-type": "^3.0.5"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/json-schema": "^7.0.15",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "b51f3132e548b3444935904904d3f02324b5d4fe",
|
|
82
82
|
"sharedDependencies": {
|
|
83
83
|
"eslint-config-bluelovers": "latest"
|
|
84
84
|
}
|
package/eslintrc-json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslintrc-json.js","sourceRoot":"","sources":["eslintrc-json.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAMH,IAAkB,QAKjB;AALD,WAAkB,QAAQ;IAEzB,uBAAW,CAAA;IACX,yBAAa,CAAA;IACb,2BAAe,CAAA;AAChB,CAAC,EALiB,QAAQ,wBAAR,QAAQ,QAKzB","sourcesContent":["/**\n * Created by user on 2019/5/19.\n */\n\nimport { JSONSchemaForESLintConfigurationFiles, Rule } from './types/eslintrc.json';\n\nexport type ILibEslint = typeof import('./types/eslintrc.json');\n\nexport const enum EnumRule\n{\n\toff = 'off',\n\twarn = 'warn',\n\terror = 'error',\n}\n\nexport type IRule = Rule | EnumRule;\n\nexport type IEslintrcJson = JSONSchemaForESLintConfigurationFiles & {\n\n\tparser?: string | '@typescript-eslint/parser',\n\n\textends?: (string | 'plugin:@typescript-eslint/recommended' | 'bluelovers')[]\n\n\tparserOptions?: JSONSchemaForESLintConfigurationFiles[\"parserOptions\"] & {\n\n\t\t/**\n\t\t * path for tsconfig.json\n\t\t */\n\t\tproject?: string,\n\n\t},\n\n};\n\nexport default IEslintrcJson\n"]}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAgBH,0CAGC;AAjBD,2BAAkC;AAOlC;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,IAAY;IAE3C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/**\n * 配置文件類型定義匯入模組\n * Configuration file type definitions import module\n *\n * 匯入各類配置文件的類型定義:\n * - package.json\n * - .eslintrc.json\n * - tsconfig.json\n * - .travis.yml\n *\n * @package\n */\n\nimport { readFileSync } from 'fs';\nimport IPackageJson from './package-json';\nexport { IEslintrcJson } from './eslintrc-json';\nexport { IPackageJson, ILibPackageJson } from './package-json';\nexport { ITsconfig } from './tsconfig-json';\nexport { ITravisCI } from './travis-json';\n\n/**\n * 讀取並解析 package.json 檔案\n * Read and parse package.json file\n *\n * @param file - package.json 檔案路徑 / package.json file path\n * @returns 解析後的 package.json 物件 / Parsed package.json object\n */\nexport function readPackageJson(file: string): IPackageJson\n{\n\treturn JSON.parse(readFileSync(file).toString());\n}\n\nexport default IPackageJson;\n"]}
|
package/lerna-json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lerna-json.js","sourceRoot":"","sources":["lerna-json.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAOH,iEAAuC","sourcesContent":["/**\n * Created by user on 2020/6/19.\n */\n\nimport { AJSONSchemaForLernaJsonFiles } from './types/lerna.json';\nimport { ITSPartialPick, ITSMergeBoth, ITSOverwrite } from 'ts-type/lib/type/record';\n\nimport { IPackageJsonTag, IReleaseType } from './lib/package-json/types';\n\nexport * from './lib/lerna-json/types';\nimport { INpmClient } from './lib/lerna-json/types';\nimport { IBranch } from './lib/types';\nimport { ITSOmitRecordType } from 'ts-type/lib/helper/record/pick-type';\n\nexport type { IReleaseType }\n\ntype _Command = AJSONSchemaForLernaJsonFiles[\"command\"];\n\ntype _MergeCommand<T extends Record<string, Record<string, any>>> = {\n\t[P in keyof (T & _Command)]?:\n\t\t(P extends keyof _Command ?\n\t\t\tP extends keyof T ?\n\t\t\t\tITSMergeBoth<_Command[P], T[P]>\n\t\t\t\t: _Command[P]\n\t\t\t: T[P])\n}\n\nexport interface ILernaJsonCommand extends _MergeCommand<{\n\tpublish?: {\n\t\tconcurrency?: number;\n\t\t\"bump\"?: IReleaseType,\n\t\t\"conventionalCommits\"?: boolean,\n\t\t\"conventionalGraduate\"?: boolean,\n\t\tdistTag?: IPackageJsonTag,\n\t\tnpmClient?: INpmClient,\n\t\tallowBranch?: IBranch[],\n\t\tnoPrivate?: boolean,\n\t},\n\n\t\"version\"?: {\n\t\tconcurrency?: number;\n\t\t\"bump\"?: IReleaseType,\n\t\tallowBranch?: IBranch[],\n\t\t\"conventionalCommits\"?: boolean,\n\t\t\"changelogPreset\"?: string | \"@bluelovers/conventional-changelog-bluelovers\",\n\t\texact?: boolean;\n\t\tcreateRelease?: \"gitlab\" | \"github\",\n\t\tnoPrivate?: boolean,\n\t},\n\n\trun?: {\n\t\tconcurrency?: number;\n\t\t\"stream\"?: boolean,\n\t\tnpmClient?: INpmClient,\n\t\t[k: string]: unknown;\n\t},\n\n\texec?: {\n\t\tconcurrency?: number;\n\t\t\"stream\"?: boolean\n\t\t[k: string]: unknown;\n\t},\n}>\n{\n\t[k: string]: Record<string, unknown>;\n}\n\nexport interface ILernaJson extends ITSOverwrite<AJSONSchemaForLernaJsonFiles,\n\t{\n\n\t\t/**\n\t\t * The current version of the repository (or independent).\n\t\t */\n\t\tversion?: string | \"independent\";\n\n\t\t/**\n\t\t * Specify which client to run commands with (change to \"yarn\" to run commands with yarn. Defaults to \"npm\".\n\t\t */\n\t\tnpmClient?: INpmClient;\n\n\t\tworkspaces?: (string | \"packages/*\")[];\n\t\tpackages?: (string | \"packages/*\")[];\n\n\t\tcommand?: ILernaJsonCommand,\n\t}>\n{\n\n}\n\nexport default ILernaJson\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["\nexport type INpmClient = string | 'npm' | 'yarn' | 'lerna';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["exports.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tPackageExportsEntryObject, PackageExportsFallback,\n\tPackageExportsEntryPath,\n} from '../../types/package.json';\nimport { ITSPartialRecord } from 'ts-type/lib/type/record/partial';\n\ntype _IConditions = 'node-addons' | 'node' | 'default' | 'types' | 'import' | 'require';\n\ninterface _IPackageExportsEntryObjectExtend extends ITSPartialRecord<_IConditions, IPackageExportsValue>\n{\n\n}\n\ndeclare module '../../types/package.json'\n{\n\tinterface PackageExportsEntryObject extends _IPackageExportsEntryObjectExtend\n\t{\n\t\t[k: string]: IPackageExportsValue;\n\t}\n}\n\nexport interface IPackageExportsEntryObject extends PackageExportsEntryObject, _IPackageExportsEntryObjectExtend\n{\n\n}\n\nexport type IPackageExportsValueFallback = PackageExportsEntryPath | PackageExportsFallback;\n\nexport type IPackageExportsValue = IPackageExportsValueFallback | IPackageExportsEntryObject;\n\n/**\n * The module path prefix that is resolved when the module specifier starts with \"name/\", set to \"./*\" to allow external modules to import any subpath.\n *\n * This interface was referenced by `undefined`'s JSON-Schema definition\n * via the `patternProperty` \"^\\./.+\".\n */\nexport interface IPackageJsonExportsEntryObjectRoot extends ITSPartialRecord<'default' | './package.json' | `./${string}` | _IConditions, IPackageExportsValue>\n{\n\t/**\n\t * The module path that is resolved when the module specifier matches \"name\", shadows the \"main\" field.\n\t */\n\t\".\"?: IPackageExportsValue;\n\n\t/**\n\t * The module path prefix that is resolved when the module specifier starts with \"name/\", set to \"./*\" to allow external modules to import any subpath.\n\t *\n\t * This interface was referenced by `undefined`'s JSON-Schema definition\n\t * via the `patternProperty` \"^\\./.+\".\n\t */\n\t[k: string]: IPackageExportsValue;\n}\n\nexport interface IPackageJsonExports\n{\n\texports?: IPackageExportsValueFallback | IPackageJsonExportsEntryObjectRoot\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extend.js","sourceRoot":"","sources":["extend.ts"],"names":[],"mappings":"","sourcesContent":["import { IPackageJsonPublishConfig } from './types';\nimport { IBooleanString } from '../types';\nimport ILernaJson from '../../lerna-json';\n\nexport interface _IPackageJsonCore\n{\n\n\t/**\n\t * yarn workspaces\n\t */\n\tworkspaces?: ILernaJson[\"packages\"];\n\n\t/**\n\t * This is a set of config values that will be used at publish-time.\n\t * It’s especially handy if you want to set the tag, registry or access,\n\t * so that you can ensure that a given package is not tagged with “latest”,\n\t * published to the global public registry or that a scoped module is private by default.\n\t *\n\t * Any config values can be overridden,\n\t * but only “tag”, “registry” and “access” probably matter for the purposes of publishing.\n\t */\n\tpublishConfig?: IPackageJsonPublishConfig;\n\n\t/**\n\t * https://github.com/bluelovers/ws-ts-type/pull/1\n\t *\n\t * If set to true, then npm will refuse to publish it.\n\t */\n\tprivate?: boolean | IBooleanString;\n\n\tgitHead?: string,\n\n\t/**\n\t * https://segmentfault.com/a/1190000016365409\n\t */\n\tunpkg?: string,\n\tbrowserslist?: string[],\n\tbrowser?: string | Record<string, string> | Record<string, boolean>,\n\tes2015?: string,\n\tesm?: boolean,\n\t'react-native'?: string,\n\tsideEffects?: boolean,\n\tsource?: string,\n\t'umd:main'?: string,\n\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishConfig.js","sourceRoot":"","sources":["publishConfig.ts"],"names":[],"mappings":";;;AAEA,IAAkB,yBAMjB;AAND,WAAkB,yBAAyB;IAE1C,kEAAqC,CAAA;IACrC,gEAAmC,CAAA;IACnC,kEAAqC,CAAA;IACrC,uEAA0C,CAAA;AAC3C,CAAC,EANiB,yBAAyB,yCAAzB,yBAAyB,QAM1C","sourcesContent":["\n\nexport const enum EnumPublishConfigRegistry\n{\n\tgithub = 'https://npm.pkg.github.com',\n\tnpm = 'https://registry.npmjs.org/',\n\tyarn = 'https://registry.yarnpkg.com',\n\ttaobao = 'http://registry.npm.taobao.org/',\n}\n\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":";;;AAgCA;;;GAGG;AACH,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAE3B,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;AACpB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B;AAED;;;GAGG;AACH,IAAkB,iBAUjB;AAVD,WAAkB,iBAAiB;IAElC,8BAAS,CAAA;IAET,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,gCAAW,CAAA;AACZ,CAAC,EAViB,iBAAiB,iCAAjB,iBAAiB,QAUlC;AASD;;;GAGG;AACH,MAAM,6BAA6B,GAAG;IACrC,cAAuB;IACvB,iBAA0B;IAC1B,kBAA2B;IAC3B,sBAA+B;CACtB,CAAA;AAED,sEAA6B","sourcesContent":["/**\n * 套件類型定義\n * Package type definitions\n *\n * Created by user on 2020/6/12.\n */\nimport type { ReleaseType as IReleaseType } from 'semver';\nimport { EnumPublishConfigRegistry } from './publishConfig';\nimport { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';\nimport { ITSValueOf, ITSValueOfArray } from 'ts-type/lib/helper/key-value';\nimport { ITSTypeAndStringLiteral } from 'ts-type/lib/helper/string';\n\n/**\n * 依賴項類型定義\n * Dependency type definition\n *\n * @typeParam T - 依賴項名稱陣列或字串 / Dependency name array or string\n */\nexport type IDependency<T extends ITSArrayListMaybeReadonly<string> | string = string[]> = Record<T extends string ? T : T extends ITSArrayListMaybeReadonly<string> ? ITSValueOfArray<T> : never, IVersionValue>;\n\nexport type { IDependency as IPackageMap }\nexport type { IDependency as IDependencies }\n\n/**\n * 版本號值類型\n * Version value type\n *\n * 支援 semver 版本字串或預定義的特殊值\n * Supports semver version string or predefined special values\n */\nexport type IVersionValue = ITSTypeAndStringLiteral<EnumVersionValue.latest> | ITSTypeAndStringLiteral<EnumVersionValue2> | string;\n\n/**\n * Semver 版本發布類型列舉\n * Semver version release type enumeration\n */\nexport enum EnumVersionValue\n{\n\t'major' = 'major',\n\t'minor' = 'minor',\n\t'latest' = 'latest',\n\t'greatest' = 'greatest',\n\t'newest' = 'newest'\n}\n\n/**\n * 預發布版本類型常數列舉\n * Prerelease version type constant enumeration\n */\nexport const enum EnumVersionValue2\n{\n\tany = '*',\n\n\tlatest = 'latest',\n\tnext = 'next',\n\tbeta = 'beta',\n\tcanary = 'canary',\n\tstable = 'stable',\n\tdev = 'dev',\n}\n\nexport type IPackageJsonDependenciesField =\n\t'dependencies'\n\t| 'devDependencies'\n\t| 'peerDependencies'\n\t| 'optionalDependencies'\n;\n\n/**\n * package.json 依賴欄位名稱陣列常量\n * package.json dependency field name array constant\n */\nconst packageJsonDependenciesFields = [\n\t'dependencies' as const,\n\t'devDependencies' as const,\n\t'peerDependencies' as const,\n\t'optionalDependencies' as const,\n] as const\n\nexport { packageJsonDependenciesFields }\n\n/**\n * This is a set of config values that will be used at publish-time.\n * It’s especially handy if you want to set the tag, registry or access,\n * so that you can ensure that a given package is not tagged with “latest”,\n * published to the global public registry or that a scoped module is private by default.\n *\n * Any config values can be overridden,\n * but only “tag”, “registry” and “access” probably matter for the purposes of publishing.\n */\nexport interface IPackageJsonPublishConfig\n{\n\tregistry?: string | EnumPublishConfigRegistry;\n\taccess?: string | \"public\" | \"restricted\";\n\ttag?: IPackageJsonTag;\n\n\t[k: string]: any;\n}\n\nexport type IPackageJsonTag = string | ITSTypeAndStringLiteral<Exclude<ITSValueOf<typeof EnumVersionValue2>, EnumVersionValue2.any>>;\n\nexport type { IReleaseType }\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["yarn.ts"],"names":[],"mappings":"","sourcesContent":["import { IDependency } from './types';\n\nexport interface IYarnV1PackageJsonInstallConfig\n{\n\tpnp?: boolean\n\t[k: string]: unknown\n}\n\nexport interface IPackageJsonExtendYarn\n{\n\tflat?: boolean,\n\tinstallConfig?: IYarnV1PackageJsonInstallConfig,\n\tresolutions?: IDependency,\n}\n"]}
|
package/lib/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["\nexport type IBooleanString = \"true\" | \"false\"\n\nexport type IBranch = string | \"master\" | \"canary\" | \"main\"\n"]}
|
package/package-json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["package-json.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAWH,kDAA6D;AAApD,0GAAA,iBAAiB,OAAA;AAC1B,mEAAyC","sourcesContent":["/**\n * Created by user on 2019/5/18.\n */\n\nimport type { JSONSchemaForNPMPackageJsonFiles as CoreProperties } from './types/package.json';\nimport type { IDependency, IPackageJsonDependenciesField } from './lib/package-json/types';\nimport type { ITSOverwrite } from 'ts-type/lib/type/record';\nimport { IPackageJsonExtendYarn } from './lib/package-json/yarn';\nimport { ITSPartialRecord } from 'ts-type/lib/type/record/partial';\nimport { ITSOmitIndexSignatures } from 'ts-type/lib/helper/record/omit-index';\nimport { _IPackageJsonCore } from './lib/package-json/extend';\nimport { IPackageJsonExports, IPackageJsonExportsEntryObjectRoot } from './lib/package-json/exports';\n\nexport { EnumVersionValue2 } from './lib/package-json/types';\nexport * from './lib/package-json/types';\n\nexport type ILibPackageJson = typeof import('./types/package.json');\n\n/**\n * @example IPackageJson<unknown>\n */\nexport interface IPackageJson<T = unknown> extends ITSOverwrite<ITSOmitIndexSignatures<CoreProperties>, _IPackageJsonCore & ITSPartialRecord<IPackageJsonDependenciesField, IDependency> & IPackageJsonExtendYarn & IPackageJsonExports>\n{\n/*\n\t//[k in Exclude<string, keyof CoreProperties>]: T;\n\t[k: string]: unknown;\n */\n\t// @ts-ignore\n\t[k: string]: T;\n}\n\nexport default IPackageJson\n"]}
|
package/script/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iCAA2E;AAC3E,gEAAgC;AAChC,+BAAgC;AAGhC,IAAI,UAAmB,CAAC;AACxB,UAAU,GAAG,KAAK,CAAC;AAEnB,kBAAQ;KACN,IAAI,CAAC;IACL,qFAAqF;IACrF,sFAAsF;IACtF,oFAAoF;IACpF,sFAAsF;IACtF,mFAAmF;CACnF,EAAE,CAAC,IAAI,EAAE,EAAE;IAEX,IAAI,yBAAmF,CAAC;IAGxF,QAAQ,IAAA,eAAQ,EAAC,IAAI,CAAC,EACtB,CAAC;QACA,KAAK,cAAc;YAElB,aAAa;YACb,yBAAyB,GAAG,CAAC,MAA+C,EAAE,EAAE;gBAE/E,IACA,CAAC;oBACA,aAAa;oBACb,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,iBAAiB,CAAC;oBAE3D,aAAa;oBACb,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,oBAAoB,GAAG,KAAK,CAAC;oBAC/D,aAAa;oBACb,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,eAAe,GAAG,KAAK,CAAC;oBAE1D,aAAa;oBACb,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,CAAC,EACR,CAAC;gBAED,CAAC;gBAED,OAAO,MAAM,CAAA;YACd,CAAC,CAAA;YAED,MAAM;QACP,KAAK,YAAY;YAEhB,aAAa;YACb,yBAAyB,GAAG,CAAC,MAA6C,EAAE,EAAE;gBAE7E,aAAa;gBACb,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,oBAAoB,GAAG,KAAK,CAAC;gBACvD,aAAa;gBACb,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC;gBAElD,OAAO,MAAM,CAAA;YACd,CAAC,CAAA;YAED,MAAM;IACR,CAAC;IAED,OAAO,IAAA,2BAAoB,EAAC;QAC3B,IAAI;QACJ,UAAU;QACV,yBAAyB;KACzB,CAAC,CAAC;AACJ,CAAC,CAAC;KACD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CE","sourcesContent":["/**\n * Created by user on 2019/5/18.\n */\n\nimport { downloadJsonAndBuild, IDownloadJsonAndBuildParams } from './util';\nimport Bluebird from 'bluebird';\nimport { basename } from 'path';\nimport { unsetValue } from 'dot-values2';\n\nlet skipExists: boolean;\nskipExists = false;\n\nBluebird\n\t.each([\n\t\t'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/package.json',\n\t\t'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/eslintrc.json',\n\t\t'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/travis.json',\n\t\t'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/tsconfig.json',\n\t\t'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/lerna.json',\n\t], (href) =>\n\t{\n\t\tlet handleSchemaBeforeCompile: IDownloadJsonAndBuildParams[\"handleSchemaBeforeCompile\"];\n\n\n\t\tswitch (basename(href))\n\t\t{\n\t\t\tcase 'package.json':\n\n\t\t\t\t// @ts-ignore\n\t\t\t\thandleSchemaBeforeCompile = (schema: typeof import('../schema/package.json')) => {\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tdelete schema.definitions.coreProperties.patternProperties;\n\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tschema.definitions.coreProperties.additionalProperties = false;\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tschema.definitions.coreProperties.additionalItems = false;\n\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tconsole.dir(schema.definitions.coreProperties);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e)\n\t\t\t\t\t{\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn schema\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'lerna.json':\n\n\t\t\t\t// @ts-ignore\n\t\t\t\thandleSchemaBeforeCompile = (schema: typeof import('../schema/lerna.json')) => {\n\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tschema.properties.command.additionalProperties = false;\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tschema.properties.command.additionalItems = false;\n\n\t\t\t\t\treturn schema\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn downloadJsonAndBuild({\n\t\t\thref,\n\t\t\tskipExists,\n\t\t\thandleSchemaBeforeCompile,\n\t\t});\n\t})\n\t.tap(r => console.log(r.length))\n;\n\n/*\ndownloadJsonAndBuild({\n\thref: 'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/package.json',\n\tskipExists,\n});\n\ndownloadJsonAndBuild({\n\thref: 'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/eslintrc.json',\n\tskipExists,\n});\n\ndownloadJsonAndBuild({\n\thref: 'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/travis.json',\n\tskipExists,\n});\n\ndownloadJsonAndBuild({\n\thref: 'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/tsconfig.json',\n\tskipExists,\n});\n\ndownloadJsonAndBuild({\n\thref: 'https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/lerna.json',\n\tskipExists,\n});\n */\n\n/*\nBluebird.resolve(axios.get('https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/package.json'))\n\t.then(function (res)\n\t{\n\t\tconsole.log(`downloaded`);\n\n\t\tif (typeof res.data === 'string')\n\t\t{\n\t\t\treturn JSON.parse(res.data)\n\t\t}\n\n\t\treturn res.data\n\t})\n\t.tap(function (data)\n\t{\n\t\treturn fs.writeJSON(path.join(__dirname, '../schema/package.json'), data, {\n\t\t\tspaces: \"\\t\",\n\t\t})\n\t})\n\t.tap(function (data)\n\t{\n\t\tconsole.log(`json saved`);\n\t})\n\t.then(function (data)\n\t{\n\t\tconsole.log(`start compile .d.ts`);\n\n\t\treturn compile(data, 'IPackageJson', {\n\t\t\tenableConstEnums: true,\n\t\t\tunreachableDefinitions: true,\n\t\t})\n\t})\n\t.then(function (ts)\n\t{\n\t\tconsole.log(`compiled`);\n\n\t\treturn fs.writeFile(path.join(__dirname, '../types', 'package.json.d.ts'), ts)\n\t})\n\t.tap(function (data)\n\t{\n\t\tconsole.log(`.d.ts saved`);\n\t})\n;\n*/\n\n"]}
|
package/script/util.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA0BH,oDA2EC;AAED,wCAGC;;AAxGD,gEAAyB;AAEzB,wDAAuB;AACvB,0DAAyB;AACzB,gEAA+B;AAC/B,yEAAoE;AAmBpE,SAAgB,oB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on 2019/5/19.\n */\n\nimport fs from \"fs-extra\"\nimport http from \"http\"\nimport path from \"path\"\nimport axios from \"axios\"\nimport Bluebird from \"bluebird\"\nimport { compile, compileFromFile } from 'json-schema-to-typescript'\nimport { JSONSchema4 } from 'json-schema';\n\nexport interface IDownloadJsonAndBuildParams\n{\n\thref: string;\n\tsaveName?: string;\n\tsavePath?: string;\n\tcompileName?: string;\n\n\tsavePathCompile?: string;\n\tsaveNameCompile?: string;\n\n\tskipExists?: boolean;\n\n\thandleSchemaBeforeCompile?<T extends JSONSchema4>(schema: T): T;\n\n}\n\nexport function downloadJsonAndBuild(options: IDownloadJsonAndBuildParams)\n{\n\tif (!options.saveName)\n\t{\n\t\toptions.saveName = path.basename(options.href)\n\t}\n\n\tif (!options.saveNameCompile)\n\t{\n\t\toptions.saveNameCompile = handleFileName(options.saveName)\n\t}\n\n\tlet filePath = path.join(__dirname, '../', options.savePath || 'schema', options.saveName);\n\n\tlet filePathCompile = path.join(__dirname, '..', options.savePathCompile || 'types', options.saveNameCompile);\n\n\tlet label = `[${path.basename(options.saveName)}]`;\n\n\tconsole.log(`${options.saveName}\\n${options.saveNameCompile}`);\n\n\tlet { skipExists = true } = options;\n\n\tif (skipExists && fs.existsSync(filePathCompile))\n\t{\n\t\tconsole.warn(label, `skip`);\n\n\t\treturn Bluebird.resolve(null)\n\t}\n\n\treturn Bluebird.resolve()\n\t\t.then(() => axios.get(options.href, {\n\t\t\ttimeout: 10 * 1000,\n\t\t}))\n\t\t.then(function (res)\n\t\t{\n\t\t\tconsole.log(label, `downloaded`);\n\n\t\t\tif (typeof res.data === 'string')\n\t\t\t{\n\t\t\t\treturn JSON.parse(res.data)\n\t\t\t}\n\n\t\t\treturn res.data\n\t\t})\n\t\t.tap(function (data)\n\t\t{\n\t\t\treturn fs.writeJSON(filePath, data, {\n\t\t\t\tspaces: \"\\t\",\n\t\t\t})\n\t\t})\n\t\t.tap(function ()\n\t\t{\n\t\t\tconsole.log(label, `json saved`);\n\t\t})\n\t\t.then(function (data)\n\t\t{\n\t\t\tconsole.log(label, `start compile .d.ts`);\n\n\t\t\treturn compile(options.handleSchemaBeforeCompile?.(data) ?? data, 'IMySchema', {\n\t\t\t\tenableConstEnums: true,\n\t\t\t\tunreachableDefinitions: true,\n\t\t\t})\n\t\t})\n\t\t.tap(function (ts)\n\t\t{\n\t\t\tconsole.log(label, `compiled`);\n\n\t\t\treturn fs.writeFile(filePathCompile, ts)\n\t\t})\n\t\t.tap(function ()\n\t\t{\n\t\t\tconsole.log(label, `.d.ts saved`);\n\t\t})\n\t\t.thenReturn(true)\n\t\t;\n}\n\nexport function handleFileName(name: string)\n{\n\treturn name + '.d.ts';\n}\n"]}
|
package/travis-json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"travis-json.js","sourceRoot":"","sources":["travis-json.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * Created by user on 2019/5/19.\n */\n\nimport { JSONSchemaForTravisCIConfigurationFiles } from './types/travis.json';\n\nexport type ILibCore = typeof import('./types/travis.json');\n\nexport type ITravisCI = JSONSchemaForTravisCIConfigurationFiles & {\n\n};\n\nexport default ITravisCI\n"]}
|
package/tsconfig-json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-json.js","sourceRoot":"","sources":["tsconfig-json.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * Created by user on 2019/5/19.\n */\n\nimport { JSONSchemaForTheTypeScriptCompilerSConfigurationFile } from './types/tsconfig.json';\n\nexport type ILibCore = typeof import('./types/tsconfig.json');\n\nexport type ITsconfig = JSONSchemaForTheTypeScriptCompilerSConfigurationFile & {\n\n};\n\nexport default ITsconfig\n"]}
|