This commit is contained in:
Garrett Serack 2019-08-28 13:47:07 -07:00
Родитель b5fd1df987
Коммит eba4e09a16
50 изменённых файлов: 68 добавлений и 21 удалений

1
.eslintignore Normal file
Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -94,6 +94,18 @@
"name": "test",
"summary": "run all npm test",
"shellCommand": "node common/scripts/test.js"
},
{
"commandKind": "global",
"name": "fix",
"summary": "run all npm fix",
"shellCommand": "node common/scripts/fix.js"
},
{
"commandKind": "global",
"name": "lint",
"summary": "run all npm eslint",
"shellCommand": "node common/scripts/eslint.js"
}
//
// {

1
common/scripts/eslint.js Normal file
Просмотреть файл

@ -0,0 +1 @@
require('./for-each').npm('eslint');

Просмотреть файл

@ -29,7 +29,7 @@ function npmForEach(cmd) {
const result = {};
forEachProject((name, location, project) => {
if (project.scripts[cmd]) {
const proc = cp.spawn("npm", ["run", cmd], { cwd: location, shell: true, stdio: "inherit" });
const proc = cp.spawn("npm", ["--silent", "run", cmd], { cwd: location, shell: true, stdio: "inherit" });
proc.on("close", (code, signal) => {
if (code !== 0) {
process.exit(code);

Просмотреть файл

@ -16,6 +16,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -7,6 +7,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"run-pwsh": "pwsh -command \"& {param($script) pwsh -command ((convertfrom-json (get-content -raw ./package.json)).'pwsh-scripts'.$script) }\"",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -22,7 +22,7 @@ export function sortByNamePartialFirst(a: Method, b: Method): number {
export class Class extends Type {
protected classOrStruct: 'class' | 'struct' = 'class';
public isStatic: boolean = false;
public isStatic = false;
protected fields = new Array<Field>();

Просмотреть файл

@ -68,6 +68,7 @@ export class EnumType implements TypeDeclaration {
}
public withMembers<T>(): T & EnumType {
/* eslint-disable */
const $this = this;
return <T & EnumType><any>new Proxy($this, {
get(target, prop, receiver) {
@ -78,6 +79,7 @@ export class EnumType implements TypeDeclaration {
return $this.member(prop.toString());
}
});
/* eslint-enable */
}
}

Просмотреть файл

@ -109,7 +109,7 @@ export class IsExpressionDeclaration extends LocalVariable implements Expression
}
export function Lambda(parameters: Array<Parameter>, body: OneOrMoreStatements, objectIntializer?: Partial<LambdaExpression>) {
throw new Error('not implemented');
}
export class LambdaExpression extends Statements implements Expression {

Просмотреть файл

@ -26,7 +26,7 @@ export class Field extends Variable {
return this.attributes.length > 0 ? `${this.attributes.joinWith(each => `${each.value}`, EOL)}${EOL}` : '';
}
public description: string = '';
public description = '';
constructor(public name: string, public type: TypeDeclaration, objectInitializer?: Partial<Field>) {
super();

Просмотреть файл

@ -29,8 +29,8 @@ export class Method extends Statements {
public extern: Extern = Modifier.None;
public async: Async = Modifier.None;
public isPartial = false;
public description: string = '';
public returnsDescription: string = '';
public description = '';
public returnsDescription = '';
public body?: StatementPossibilities | Expression;
constructor(public name: string, protected returnType: TypeDeclaration = Void, objectIntializer?: Partial<Method>) {

Просмотреть файл

@ -18,7 +18,7 @@ export class Namespace extends Initializer {
private delegates = new Array<Delegate>();
private namespaces = new Array<Namespace>();
private folder: string;
public header: string = '';
public header = '';
constructor(public name: string, protected parent?: Project | Namespace, objectInitializer?: Partial<Namespace>) {
super();

Просмотреть файл

@ -11,6 +11,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -12,10 +12,10 @@ import { Variable } from './variable';
/** represents a method parameter */
export class Parameter extends Variable {
public description: string = '';
public description = '';
public genericParameters = new Array<string>();
public where?: string;
public params: boolean = false;
public params = false;
public modifier: ParameterModifier = ParameterModifier.None;
public defaultInitializer?: Expression;
public attributes = new Array<Attribute>();

Просмотреть файл

@ -28,7 +28,7 @@ export class Property extends Variable implements Instance {
public extern: Extern = Modifier.None;
public attributes = new Array<Attribute>();
public metadata: Dictionary<any> = {};
public description: string = '';
public description = '';
public get?: StatementPossibilities | Expression;
public set?: StatementPossibilities | Expression;
@ -206,7 +206,7 @@ ${this.attributeDeclaration}${this.new}${this.visibility} ${this.static} ${this.
export class LazyProperty extends Property {
private backingName: string;
public instanceAccess: string = 'this';
public instanceAccess = 'this';
constructor(public name: string, public type: TypeDeclaration, public expression: Expression, objectInitializer?: Partial<LazyProperty>) {
super(name, type);

Просмотреть файл

@ -13,7 +13,7 @@ import { Property } from './property';
import { TypeDeclaration } from './type-declaration';
export class Type extends Initializer implements TypeDeclaration {
public description: string = '';
public description = '';
public methods = new Array<Method>();
public properties = new Array<Property>();
public genericParameters = new Array<string>();
@ -21,7 +21,7 @@ export class Type extends Initializer implements TypeDeclaration {
public interfaces = new Array<IInterface>();
public accessModifier = Access.Public;
public attributes = new Array<Attribute>();
public partial: boolean = false;
public partial = false;
private filename: string;
protected get attributeDeclaration(): string {

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -11,6 +11,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -11,6 +11,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -446,7 +446,7 @@ export class DataHandle {
return this.item.identity;
}
public async ReadData(nocache: boolean = false): Promise<string> {
public async ReadData(nocache = false): Promise<string> {
if (!nocache) {
// we're going to use the data, so let's not let it expire.
this.item.accessed = true;

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -9,7 +9,7 @@ import { Position as sourceMapPosition } from 'source-map';
const regexNewLine = /\r?\n/g;
export function LineIndices(text: string): Array<number> {
let indices = [0];
const indices = [0];
let match: RegExpExecArray | null;
while ((match = regexNewLine.exec(text)) !== null) {

Просмотреть файл

@ -79,10 +79,10 @@ export class Transformer<TInput extends object = AnyObject, TOutput extends obje
return <Real<TParent[K]>>value;
}
protected copy<TParent extends object, K extends keyof TParent>(target: ProxyObject<TParent>, member: K, pointer: string, value: TParent[K], recurse: boolean = true) {
protected copy<TParent extends object, K extends keyof TParent>(target: ProxyObject<TParent>, member: K, pointer: string, value: TParent[K], recurse = true) {
return target[member] = <ProxyNode<TParent[K]>>{ value, pointer, recurse, filename: this.currentInputFilename };
}
protected clone<TParent extends object, K extends keyof TParent>(target: ProxyObject<TParent>, member: K, pointer: string, value: TParent[K], recurse: boolean = true) {
protected clone<TParent extends object, K extends keyof TParent>(target: ProxyObject<TParent>, member: K, pointer: string, value: TParent[K], recurse = true) {
// return target[member] = <ProxyNode<TParent[K]>>{ value: JSON.parse(JSON.stringify(value)), pointer, recurse, filename: this.key };
return target[member] = <ProxyNode<TParent[K]>>{ value: clone(value), pointer, recurse, filename: this.currentInputFilename };
}

Просмотреть файл

@ -102,7 +102,7 @@ export async function Compile(mappings: Array<Mapping>, target: SourceMapGenerat
* @description This does make an implicit assumption that the decendents of the 'generated' node are 1:1 with the descendents in the 'source' node.
* In the event that is not true, elements in the target's source map will not be pointing to the correct elements in the source node.
*/
export function CreateAssignmentMapping(assignedObject: any, sourceKey: string, sourcePath: JsonPath, targetPath: JsonPath, subject: string, recurse: boolean = true, result = new Array<Mapping>()): Array<Mapping> {
export function CreateAssignmentMapping(assignedObject: any, sourceKey: string, sourcePath: JsonPath, targetPath: JsonPath, subject: string, recurse = true, result = new Array<Mapping>()): Array<Mapping> {
for (const descendant of Descendants(ToAst(assignedObject))) {
const path = descendant.path;
result.push({

Просмотреть файл

@ -5,7 +5,7 @@ import { MemoryFileSystem } from '../main';
@suite class FileSystemTests {
@test async 'Simple memory filesystem test'() {
let f = new MemoryFileSystem(new Map<string, string>([['readme.md', '# this is a test\n see https://aka.ms/autorest'], ['other.md', '#My Doc.']]));
const f = new MemoryFileSystem(new Map<string, string>([['readme.md', '# this is a test\n see https://aka.ms/autorest'], ['other.md', '#My Doc.']]));
let n = 0;
for (const name of await f.EnumerateFileUris()) {
n++;

Просмотреть файл

@ -23,7 +23,7 @@ export type YAMLMap = yamlAst.YamlMap;
export type YAMLSequence = yamlAst.YAMLSequence;
export type YAMLAnchorReference = yamlAst.YAMLAnchorReference;
export const CreateYAMLAnchorRef: (key: string) => YAMLMap = yamlAst.newAnchorRef as any;
export const CreateYAMLAnchorRef: (key: string) => YAMLMap = <any>yamlAst.newAnchorRef;
export const CreateYAMLMap: () => YAMLMap = yamlAst.newMap;
export const CreateYAMLMapping: (key: YAMLScalar, value: YAMLNode) => YAMLMapping = yamlAst.newMapping;
export const CreateYAMLScalar: (value: string) => YAMLScalar = yamlAst.newScalar;
@ -42,7 +42,7 @@ export function ParseToAst(rawYaml: string): YAMLNode {
return yamlAst.safeLoad(rawYaml);
}
export function* Descendants(yamlAstNode: YAMLNode, currentPath: JsonPath = [], deferResolvingMappings: boolean = false): Iterable<YAMLNodeWithPath> {
export function* Descendants(yamlAstNode: YAMLNode, currentPath: JsonPath = [], deferResolvingMappings = false): Iterable<YAMLNodeWithPath> {
const todos: Array<YAMLNodeWithPath> = [{ path: currentPath, node: yamlAstNode }];
let todo: YAMLNodeWithPath | undefined;
while (todo = todos.pop()) {

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -11,6 +11,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -11,6 +11,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc --version && tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",

Просмотреть файл

@ -0,0 +1 @@
**/*.d.ts

Просмотреть файл

@ -15,6 +15,7 @@
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"set-version": "node -e \"let pkg = require('./package.json'); require('child_process').exec('git rev-list --parents HEAD --count --full-history .', (o,stdout) => { const v = pkg.version.split('.'); v[v.length-1] = (parseInt(stdout.trim()) -1); const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)})\"",
"reset-version": "node -e \"let pkg = require('./package.json'); const v = pkg.version.split('.'); v[v.length-1] = 0; const orig=JSON.stringify(pkg,null,2); pkg.version = v.join('.'); const delta = JSON.stringify(pkg,null,2 ); if( orig !== delta) require('fs').writeFileSync('./package.json',delta)\"",
"prepare": "npm run build",