diff --git a/.eslintignore b/.eslintignore index c8b23ac0..56cd7eb3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,6 @@ -/**/node_modules/**/* -/examples/**/coverage/**/* -/examples/**/node_modules/**/* -/**/generated/**/* +**/node_modules/**/* +**/coverage/**/* +**/generated/**/* +**/dist/**/* +**/tmp/**/* !.eslintrc.js diff --git a/.gitignore b/.gitignore index 6217fb1b..45c0f8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ logs npm-debug.log* yarn-debug.log* yarn-error.log* +*.tsbuildinfo # Coverage directory used by tools like istanbul coverage diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 00000000..98d2caf9 --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,19 @@ +{ + "linters": { + "*.ts": [ + "eslint --fix", + "prettier --write", + "git add" + ], + "*.{js,json}": [ + "prettier --write", + "git add" + ], + "*.md": [ + "markdownlint" + ] + }, + "ignore": [ + "**/generated/*" + ] +} diff --git a/.prettierignore b/.prettierignore index 8dd0a6fa..1ca96918 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,4 @@ **/generated/**/* +**/node_modules/**/* +**/dist/**/* +**/tmp/**/* diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..5ac85e27 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "printWidth": 100, + "singleQuote": true +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 8df2990c..82d29e08 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,13 +5,7 @@ "[html]": { "editor.formatOnSave": false }, - "eslint.validate": [ - "javascript", - { - "language": "typescript", - "autoFix": true - } - ], + "eslint.validate": ["javascript", "typescript"], "search.exclude": { "dist/": true, "node_modules/": true diff --git a/examples/01-simple-model/generated/binding.ts b/examples/01-simple-model/generated/binding.ts index 6fb680a3..88e926c8 100644 --- a/examples/01-simple-model/generated/binding.ts +++ b/examples/01-simple-model/generated/binding.ts @@ -145,11 +145,11 @@ export interface UserWhereInput { email_startsWith?: String | null email_endsWith?: String | null email_in?: String[] | String | null - age_eq?: Float | null - age_gt?: Float | null - age_gte?: Float | null - age_lt?: Float | null - age_lte?: Float | null + age_eq?: Int | null + age_gt?: Int | null + age_gte?: Int | null + age_lt?: Int | null + age_lte?: Int | null age_in?: Int[] | Int | null isRequired_eq?: Boolean | null isRequired_in?: Boolean[] | Boolean | null diff --git a/examples/01-simple-model/generated/classes.ts b/examples/01-simple-model/generated/classes.ts index 21d99e68..b68f36be 100644 --- a/examples/01-simple-model/generated/classes.ts +++ b/examples/01-simple-model/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; import { StringEnum } from "../src/user.model"; // @ts-ignore import { User } from "../src/user.model"; @@ -167,19 +171,19 @@ export class UserWhereInput { @TypeGraphQLField(() => [String], { nullable: true }) email_in?: string[]; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Int, { nullable: true }) age_eq?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Int, { nullable: true }) age_gt?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Int, { nullable: true }) age_gte?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Int, { nullable: true }) age_lt?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Int, { nullable: true }) age_lte?: number; @TypeGraphQLField(() => [Int], { nullable: true }) @@ -197,19 +201,19 @@ export class UserWhereInput { @TypeGraphQLField(() => [StringEnum], { nullable: true }) stringEnumField_in?: StringEnum[]; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Float, { nullable: true }) rating_eq?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Float, { nullable: true }) rating_gt?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Float, { nullable: true }) rating_gte?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Float, { nullable: true }) rating_lt?: number; - @TypeGraphQLField({ nullable: true }) + @TypeGraphQLField(() => Float, { nullable: true }) rating_lte?: number; @TypeGraphQLField(() => [Float], { nullable: true }) diff --git a/examples/01-simple-model/generated/ormconfig.ts b/examples/01-simple-model/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/01-simple-model/generated/ormconfig.ts +++ b/examples/01-simple-model/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/01-simple-model/generated/schema.graphql b/examples/01-simple-model/generated/schema.graphql index e277c4e0..dcd84e67 100644 --- a/examples/01-simple-model/generated/schema.graphql +++ b/examples/01-simple-model/generated/schema.graphql @@ -182,11 +182,11 @@ input UserWhereInput { email_startsWith: String email_endsWith: String email_in: [String!] - age_eq: Float - age_gt: Float - age_gte: Float - age_lt: Float - age_lte: Float + age_eq: Int + age_gt: Int + age_gte: Int + age_lt: Int + age_lte: Int age_in: [Int!] isRequired_eq: Boolean isRequired_in: [Boolean!] diff --git a/examples/01-simple-model/package.json b/examples/01-simple-model/package.json index ffcadf45..af1b589b 100644 --- a/examples/01-simple-model/package.json +++ b/examples/01-simple-model/package.json @@ -14,7 +14,7 @@ "start:ts": "DEBUG=warthog* ts-node-dev --type-check src/index.ts", "start:prod": "ts-node src/index.ts", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": {}, "devDependencies": { diff --git a/examples/01-simple-model/src/index.ts b/examples/01-simple-model/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/01-simple-model/src/index.ts +++ b/examples/01-simple-model/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/01-simple-model/src/server.ts b/examples/01-simple-model/src/server.ts index ac01c706..d4ab35c9 100644 --- a/examples/01-simple-model/src/server.ts +++ b/examples/01-simple-model/src/server.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { Server } from '../../../src'; +import { Server } from '@warthog/core'; export function getServer(AppOptions = {}, dbOptions = {}) { return new Server( diff --git a/examples/01-simple-model/src/user.model.ts b/examples/01-simple-model/src/user.model.ts index 3bf18c1b..956c4320 100644 --- a/examples/01-simple-model/src/user.model.ts +++ b/examples/01-simple-model/src/user.model.ts @@ -7,7 +7,7 @@ import { IntField, Model, StringField -} from '../../../src'; +} from '@warthog/core'; // Note: this must be exported and in the same file where it's attached with @EnumField // Also - must use string enums diff --git a/examples/01-simple-model/src/user.resolver.ts b/examples/01-simple-model/src/user.resolver.ts index 263c4d3f..ee8c9609 100644 --- a/examples/01-simple-model/src/user.resolver.ts +++ b/examples/01-simple-model/src/user.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, Mutation, Query, Resolver } from 'type-graphql'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver, StandardDeleteResponse } from '../../../src'; +import { BaseContext, BaseResolver, StandardDeleteResponse } from '@warthog/core'; import { UserCreateInput, UserUpdateArgs, diff --git a/examples/01-simple-model/tools/seed.ts b/examples/01-simple-model/tools/seed.ts index 59ccbce9..c199847d 100644 --- a/examples/01-simple-model/tools/seed.ts +++ b/examples/01-simple-model/tools/seed.ts @@ -1,6 +1,6 @@ import * as Faker from 'faker'; -import { getBindingError, logger } from '../../../src'; +import { getBindingError, logger } from '@warthog/core'; import { getServer } from '../src/server'; diff --git a/examples/01-simple-model/warthog.config.js b/examples/01-simple-model/warthog.config.js deleted file mode 100644 index 66c945b0..00000000 --- a/examples/01-simple-model/warthog.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - moduleImportPath: '../../../src' -}; diff --git a/examples/02-complex-example/generated/binding.ts b/examples/02-complex-example/generated/binding.ts index ccbcf684..3f7a7366 100644 --- a/examples/02-complex-example/generated/binding.ts +++ b/examples/02-complex-example/generated/binding.ts @@ -364,6 +364,8 @@ export interface UserWhereInput { export interface UserWhereUniqueInput { id?: String | null emailField?: String | null + enumField?: StringEnum | null + stringField?: String | null } export interface BaseGraphQLObject { diff --git a/examples/02-complex-example/generated/classes.ts b/examples/02-complex-example/generated/classes.ts index db8a8d08..3d3e8fc4 100644 --- a/examples/02-complex-example/generated/classes.ts +++ b/examples/02-complex-example/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; import { StringEnum } from "../src/modules/user/user.model"; // @ts-ignore import { User } from "../src/modules/user/user.model"; @@ -613,6 +617,12 @@ export class UserWhereUniqueInput { @TypeGraphQLField(() => String, { nullable: true }) emailField?: string; + + @TypeGraphQLField(() => StringEnum, { nullable: true }) + enumField?: StringEnum; + + @TypeGraphQLField(() => String, { nullable: true }) + stringField?: string; } @TypeGraphQLInputType() diff --git a/examples/02-complex-example/generated/ormconfig.ts b/examples/02-complex-example/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/02-complex-example/generated/ormconfig.ts +++ b/examples/02-complex-example/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/02-complex-example/generated/schema.graphql b/examples/02-complex-example/generated/schema.graphql index 542a8c05..f7ed1d7d 100644 --- a/examples/02-complex-example/generated/schema.graphql +++ b/examples/02-complex-example/generated/schema.graphql @@ -430,4 +430,6 @@ input UserWhereInput { input UserWhereUniqueInput { id: String emailField: String + enumField: StringEnum + stringField: String } diff --git a/examples/02-complex-example/package.json b/examples/02-complex-example/package.json index 61caf106..980a8a45 100644 --- a/examples/02-complex-example/package.json +++ b/examples/02-complex-example/package.json @@ -16,7 +16,7 @@ "test": "jest --detectOpenHandles --verbose --coverage", "test:watch": "jest --watch", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "debug": "^4.1.1", diff --git a/examples/02-complex-example/src/index.ts b/examples/02-complex-example/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/02-complex-example/src/index.ts +++ b/examples/02-complex-example/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/02-complex-example/src/modules/user/user.model.ts b/examples/02-complex-example/src/modules/user/user.model.ts index cb749c25..bd3599d7 100644 --- a/examples/02-complex-example/src/modules/user/user.model.ts +++ b/examples/02-complex-example/src/modules/user/user.model.ts @@ -15,7 +15,7 @@ import { NumericField, StringField, FloatField -} from '../../../../../src'; +} from '@warthog/core'; // Note: this must be exported and in the same file where it's attached with @EnumField // Also - must use string enums diff --git a/examples/02-complex-example/src/modules/user/user.resolver.ts b/examples/02-complex-example/src/modules/user/user.resolver.ts index e1a21d29..1d361ad1 100644 --- a/examples/02-complex-example/src/modules/user/user.resolver.ts +++ b/examples/02-complex-example/src/modules/user/user.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Authorized, Ctx, Mutation, Query, Resolver } from 'type-grap import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver, StandardDeleteResponse } from '../../../../../src'; +import { BaseContext, BaseResolver, StandardDeleteResponse } from '@warthog/core'; import { UserCreateInput, UserUpdateArgs, diff --git a/examples/02-complex-example/src/server.ts b/examples/02-complex-example/src/server.ts index fa58fa3a..c194d288 100644 --- a/examples/02-complex-example/src/server.ts +++ b/examples/02-complex-example/src/server.ts @@ -1,6 +1,7 @@ import 'reflect-metadata'; -import { authChecker, BaseContext, Server } from '../../../src/'; +import { authChecker } from '@warthog/core'; +import { BaseContext, Server } from '@warthog/server-express'; import { customLogger } from './logger'; @@ -8,7 +9,7 @@ interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/examples/02-complex-example/tools/seed.ts b/examples/02-complex-example/tools/seed.ts index 31b3db65..6335d943 100644 --- a/examples/02-complex-example/tools/seed.ts +++ b/examples/02-complex-example/tools/seed.ts @@ -1,6 +1,6 @@ import * as Faker from 'faker'; -import { getBindingError, logger } from '../../../src'; +import { getBindingError, logger } from '@warthog/core'; import { getServer } from '../src/server'; import { Binding } from '../generated/binding'; diff --git a/examples/02-complex-example/warthog.config.js b/examples/02-complex-example/warthog.config.js deleted file mode 100644 index 66c945b0..00000000 --- a/examples/02-complex-example/warthog.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - moduleImportPath: '../../../src' -}; diff --git a/examples/03-one-to-many-relationship/generated/binding.ts b/examples/03-one-to-many-relationship/generated/binding.ts index 6eca6eae..425e9032 100644 --- a/examples/03-one-to-many-relationship/generated/binding.ts +++ b/examples/03-one-to-many-relationship/generated/binding.ts @@ -91,12 +91,12 @@ export interface BaseWhereInput { export interface PostCreateInput { title: String - userId: String + userId: ID_Output } export interface PostUpdateInput { title?: String | null - userId?: String | null + userId?: ID_Input | null } export interface PostWhereInput { diff --git a/examples/03-one-to-many-relationship/generated/classes.ts b/examples/03-one-to-many-relationship/generated/classes.ts index f175ab6b..1b6114d5 100644 --- a/examples/03-one-to-many-relationship/generated/classes.ts +++ b/examples/03-one-to-many-relationship/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { User } from "../src/user.model"; // @ts-ignore @@ -279,7 +283,7 @@ export class PostCreateInput { @TypeGraphQLField() title!: string; - @TypeGraphQLField(() => String) + @TypeGraphQLField(() => ID) userId!: string; } @@ -288,7 +292,7 @@ export class PostUpdateInput { @TypeGraphQLField({ nullable: true }) title?: string; - @TypeGraphQLField(() => String, { nullable: true }) + @TypeGraphQLField(() => ID, { nullable: true }) userId?: string; } diff --git a/examples/03-one-to-many-relationship/generated/ormconfig.ts b/examples/03-one-to-many-relationship/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/03-one-to-many-relationship/generated/ormconfig.ts +++ b/examples/03-one-to-many-relationship/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/03-one-to-many-relationship/generated/schema.graphql b/examples/03-one-to-many-relationship/generated/schema.graphql index f4a86edb..d229ad36 100644 --- a/examples/03-one-to-many-relationship/generated/schema.graphql +++ b/examples/03-one-to-many-relationship/generated/schema.graphql @@ -89,7 +89,7 @@ type Post implements BaseGraphQLObject { input PostCreateInput { title: String! - userId: String! + userId: ID! } enum PostOrderByInput { @@ -107,7 +107,7 @@ enum PostOrderByInput { input PostUpdateInput { title: String - userId: String + userId: ID } input PostWhereInput { diff --git a/examples/03-one-to-many-relationship/package.json b/examples/03-one-to-many-relationship/package.json index ad4143e9..37d0cb1e 100644 --- a/examples/03-one-to-many-relationship/package.json +++ b/examples/03-one-to-many-relationship/package.json @@ -12,7 +12,7 @@ "start": "yarn start:ts", "start:ts": "ts-node --type-check src/index.ts", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "handlebars": "^4.5.2", diff --git a/examples/03-one-to-many-relationship/src/index.ts b/examples/03-one-to-many-relationship/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/03-one-to-many-relationship/src/index.ts +++ b/examples/03-one-to-many-relationship/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/03-one-to-many-relationship/src/post.model.ts b/examples/03-one-to-many-relationship/src/post.model.ts index 2075b629..4b935654 100644 --- a/examples/03-one-to-many-relationship/src/post.model.ts +++ b/examples/03-one-to-many-relationship/src/post.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { User } from './user.model'; diff --git a/examples/03-one-to-many-relationship/src/post.resolver.ts b/examples/03-one-to-many-relationship/src/post.resolver.ts index b354e81c..1ae9d4c5 100644 --- a/examples/03-one-to-many-relationship/src/post.resolver.ts +++ b/examples/03-one-to-many-relationship/src/post.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from ' import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver, StandardDeleteResponse } from '../../../src'; +import { BaseContext, BaseResolver, StandardDeleteResponse } from '@warthog/core'; import { PostCreateInput, PostUpdateArgs, diff --git a/examples/03-one-to-many-relationship/src/server.ts b/examples/03-one-to-many-relationship/src/server.ts index 55dd1ce0..24e5eca0 100644 --- a/examples/03-one-to-many-relationship/src/server.ts +++ b/examples/03-one-to-many-relationship/src/server.ts @@ -1,12 +1,12 @@ import 'reflect-metadata'; -import { BaseContext, Server } from '../../../src'; +import { BaseContext, Server } from '@warthog/server-express'; interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/examples/03-one-to-many-relationship/src/user.model.ts b/examples/03-one-to-many-relationship/src/user.model.ts index fdef4369..98fadeac 100644 --- a/examples/03-one-to-many-relationship/src/user.model.ts +++ b/examples/03-one-to-many-relationship/src/user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { Post } from './post.model'; diff --git a/examples/03-one-to-many-relationship/src/user.resolver.ts b/examples/03-one-to-many-relationship/src/user.resolver.ts index 672684ab..cd4ed411 100644 --- a/examples/03-one-to-many-relationship/src/user.resolver.ts +++ b/examples/03-one-to-many-relationship/src/user.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from ' import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver, StandardDeleteResponse } from '../../../src'; +import { BaseContext, BaseResolver, StandardDeleteResponse } from '@warthog/core'; import { UserCreateInput, UserUpdateArgs, diff --git a/examples/03-one-to-many-relationship/warthog.config.js b/examples/03-one-to-many-relationship/warthog.config.js deleted file mode 100644 index 66c945b0..00000000 --- a/examples/03-one-to-many-relationship/warthog.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - moduleImportPath: '../../../src' -}; diff --git a/examples/04-many-to-many-relationship/generated/binding.ts b/examples/04-many-to-many-relationship/generated/binding.ts index ba050fb7..aea49acd 100644 --- a/examples/04-many-to-many-relationship/generated/binding.ts +++ b/examples/04-many-to-many-relationship/generated/binding.ts @@ -237,14 +237,14 @@ export interface UserCreateInput { } export interface UserRoleCreateInput { - userId: String - roleId: String + userId: ID_Output + roleId: ID_Output otherMetadata?: String | null } export interface UserRoleUpdateInput { - userId?: String | null - roleId?: String | null + userId?: ID_Input | null + roleId?: ID_Input | null otherMetadata?: String | null } diff --git a/examples/04-many-to-many-relationship/generated/classes.ts b/examples/04-many-to-many-relationship/generated/classes.ts index 25c37ae2..06b4b566 100644 --- a/examples/04-many-to-many-relationship/generated/classes.ts +++ b/examples/04-many-to-many-relationship/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { User } from "../src/join-with-metadata/user.model"; // @ts-ignore @@ -291,10 +295,10 @@ export class UserRoleWhereUniqueInput { @TypeGraphQLInputType() export class UserRoleCreateInput { - @TypeGraphQLField(() => String) + @TypeGraphQLField(() => ID) userId!: string; - @TypeGraphQLField(() => String) + @TypeGraphQLField(() => ID) roleId!: string; @TypeGraphQLField({ nullable: true }) @@ -303,10 +307,10 @@ export class UserRoleCreateInput { @TypeGraphQLInputType() export class UserRoleUpdateInput { - @TypeGraphQLField(() => String, { nullable: true }) + @TypeGraphQLField(() => ID, { nullable: true }) userId?: string; - @TypeGraphQLField(() => String, { nullable: true }) + @TypeGraphQLField(() => ID, { nullable: true }) roleId?: string; @TypeGraphQLField({ nullable: true }) diff --git a/examples/04-many-to-many-relationship/generated/ormconfig.ts b/examples/04-many-to-many-relationship/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/04-many-to-many-relationship/generated/ormconfig.ts +++ b/examples/04-many-to-many-relationship/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/04-many-to-many-relationship/generated/schema.graphql b/examples/04-many-to-many-relationship/generated/schema.graphql index 3260ebda..64533879 100644 --- a/examples/04-many-to-many-relationship/generated/schema.graphql +++ b/examples/04-many-to-many-relationship/generated/schema.graphql @@ -314,8 +314,8 @@ type UserRole implements BaseGraphQLObject { } input UserRoleCreateInput { - userId: String! - roleId: String! + userId: ID! + roleId: ID! otherMetadata: String } @@ -335,8 +335,8 @@ enum UserRoleOrderByInput { } input UserRoleUpdateInput { - userId: String - roleId: String + userId: ID + roleId: ID otherMetadata: String } diff --git a/examples/04-many-to-many-relationship/package.json b/examples/04-many-to-many-relationship/package.json index e6d64d5a..64027c61 100644 --- a/examples/04-many-to-many-relationship/package.json +++ b/examples/04-many-to-many-relationship/package.json @@ -12,7 +12,7 @@ "start": "yarn start:ts", "start:ts": "ts-node --type-check src/index.ts", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "handlebars": "^4.5.2", diff --git a/examples/04-many-to-many-relationship/src/index.ts b/examples/04-many-to-many-relationship/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/04-many-to-many-relationship/src/index.ts +++ b/examples/04-many-to-many-relationship/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/04-many-to-many-relationship/src/join-with-metadata/role.model.ts b/examples/04-many-to-many-relationship/src/join-with-metadata/role.model.ts index 435766a5..b107b142 100644 --- a/examples/04-many-to-many-relationship/src/join-with-metadata/role.model.ts +++ b/examples/04-many-to-many-relationship/src/join-with-metadata/role.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { UserRole } from './user-role.model'; diff --git a/examples/04-many-to-many-relationship/src/join-with-metadata/role.resolver.ts b/examples/04-many-to-many-relationship/src/join-with-metadata/role.resolver.ts index d89975ac..1571df87 100644 --- a/examples/04-many-to-many-relationship/src/join-with-metadata/role.resolver.ts +++ b/examples/04-many-to-many-relationship/src/join-with-metadata/role.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, Mutation, Query, Resolver } from 'type-graphql'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver } from '../../../../src'; +import { BaseContext, BaseResolver } from '@warthog/core'; import { RoleCreateInput, RoleWhereArgs, RoleWhereInput } from '../../generated'; import { Role } from './role.model'; diff --git a/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.model.ts b/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.model.ts index 17280596..10b07a85 100644 --- a/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.model.ts +++ b/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { Role } from './role.model'; import { User } from './user.model'; diff --git a/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.resolver.ts b/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.resolver.ts index a08e9280..741d435e 100644 --- a/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.resolver.ts +++ b/examples/04-many-to-many-relationship/src/join-with-metadata/user-role.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from ' import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver } from '../../../../src'; +import { BaseContext, BaseResolver } from '@warthog/core'; import { UserRoleCreateInput, UserRoleCreateManyArgs, diff --git a/examples/04-many-to-many-relationship/src/join-with-metadata/user.model.ts b/examples/04-many-to-many-relationship/src/join-with-metadata/user.model.ts index 9277a07b..9362d24f 100644 --- a/examples/04-many-to-many-relationship/src/join-with-metadata/user.model.ts +++ b/examples/04-many-to-many-relationship/src/join-with-metadata/user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { UserRole } from './user-role.model'; diff --git a/examples/04-many-to-many-relationship/src/join-with-metadata/user.resolver.ts b/examples/04-many-to-many-relationship/src/join-with-metadata/user.resolver.ts index d7cd244e..dd3b3c95 100644 --- a/examples/04-many-to-many-relationship/src/join-with-metadata/user.resolver.ts +++ b/examples/04-many-to-many-relationship/src/join-with-metadata/user.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from ' import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver } from '../../../../src'; +import { BaseContext, BaseResolver } from '@warthog/core'; import { UserCreateInput, UserWhereArgs, UserWhereInput } from '../../generated'; import { UserRole } from './user-role.model'; import { User } from './user.model'; diff --git a/examples/04-many-to-many-relationship/src/server.ts b/examples/04-many-to-many-relationship/src/server.ts index e9a9a471..4e116d5f 100644 --- a/examples/04-many-to-many-relationship/src/server.ts +++ b/examples/04-many-to-many-relationship/src/server.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { Server } from '../../../src'; +import { Server } from '@warthog/core'; export function getServer(AppOptions = {}, dbOptions = {}) { return new Server( diff --git a/examples/04-many-to-many-relationship/src/simple-join-table/author.model.ts b/examples/04-many-to-many-relationship/src/simple-join-table/author.model.ts index 85a84b0c..760a0d61 100644 --- a/examples/04-many-to-many-relationship/src/simple-join-table/author.model.ts +++ b/examples/04-many-to-many-relationship/src/simple-join-table/author.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { Post } from './post.model'; diff --git a/examples/04-many-to-many-relationship/src/simple-join-table/author.resolver.ts b/examples/04-many-to-many-relationship/src/simple-join-table/author.resolver.ts index 39821443..017fd1b6 100644 --- a/examples/04-many-to-many-relationship/src/simple-join-table/author.resolver.ts +++ b/examples/04-many-to-many-relationship/src/simple-join-table/author.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from ' import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver } from '../../../../src'; +import { BaseContext, BaseResolver } from '@warthog/core'; import { AuthorCreateInput, AuthorWhereArgs, AuthorWhereInput } from '../../generated'; import { Author } from './author.model'; import { Post } from './post.model'; diff --git a/examples/04-many-to-many-relationship/src/simple-join-table/post.model.ts b/examples/04-many-to-many-relationship/src/simple-join-table/post.model.ts index bded6633..070fd86b 100644 --- a/examples/04-many-to-many-relationship/src/simple-join-table/post.model.ts +++ b/examples/04-many-to-many-relationship/src/simple-join-table/post.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { Author } from './author.model'; diff --git a/examples/04-many-to-many-relationship/src/simple-join-table/post.resolver.ts b/examples/04-many-to-many-relationship/src/simple-join-table/post.resolver.ts index fe0592a3..119b38f9 100644 --- a/examples/04-many-to-many-relationship/src/simple-join-table/post.resolver.ts +++ b/examples/04-many-to-many-relationship/src/simple-join-table/post.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from ' import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseResolver } from '../../../../src'; +import { BaseContext, BaseResolver } from '@warthog/core'; import { PostCreateInput, PostWhereArgs, PostWhereInput } from '../../generated'; import { Author } from './author.model'; diff --git a/examples/04-many-to-many-relationship/warthog.config.js b/examples/04-many-to-many-relationship/warthog.config.js deleted file mode 100644 index 66c945b0..00000000 --- a/examples/04-many-to-many-relationship/warthog.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - moduleImportPath: '../../../src' -}; diff --git a/examples/05-migrations/generated/classes.ts b/examples/05-migrations/generated/classes.ts index cf26e732..74ddf9ba 100644 --- a/examples/05-migrations/generated/classes.ts +++ b/examples/05-migrations/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { User } from "../src/user.model"; diff --git a/examples/05-migrations/generated/ormconfig.ts b/examples/05-migrations/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/05-migrations/generated/ormconfig.ts +++ b/examples/05-migrations/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/05-migrations/package.json b/examples/05-migrations/package.json index a1a97b87..e5d3b8dc 100644 --- a/examples/05-migrations/package.json +++ b/examples/05-migrations/package.json @@ -17,7 +17,7 @@ "start:prod": "ts-node src/index.ts", "typeorm:cli": "ts-node ./node_modules/.bin/typeorm -f ./generated/ormconfig.ts", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "handlebars": "^4.5.2", diff --git a/examples/05-migrations/src/index.ts b/examples/05-migrations/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/05-migrations/src/index.ts +++ b/examples/05-migrations/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/05-migrations/src/server.ts b/examples/05-migrations/src/server.ts index 19230c6d..2b755d6b 100644 --- a/examples/05-migrations/src/server.ts +++ b/examples/05-migrations/src/server.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { Server } from '../../../src'; +import { Server } from '@warthog/core'; export function getServer(AppOptions = {}) { return new Server( diff --git a/examples/05-migrations/src/user.model.ts b/examples/05-migrations/src/user.model.ts index 86d85bbd..363217e4 100644 --- a/examples/05-migrations/src/user.model.ts +++ b/examples/05-migrations/src/user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, EmailField, Model, StringField } from '../../../src'; +import { BaseModel, EmailField, Model, StringField } from '@warthog/core'; @Model() export class User extends BaseModel { diff --git a/examples/05-migrations/src/user.resolver.ts b/examples/05-migrations/src/user.resolver.ts index d9296179..38585e5d 100644 --- a/examples/05-migrations/src/user.resolver.ts +++ b/examples/05-migrations/src/user.resolver.ts @@ -2,7 +2,7 @@ import { Args, Query, Resolver } from 'type-graphql'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseResolver } from '../../../src'; +import { BaseResolver } from '@warthog/core'; import { UserWhereArgs, UserWhereInput } from '../generated'; import { User } from './user.model'; diff --git a/examples/05-migrations/warthog.config.js b/examples/05-migrations/warthog.config.js deleted file mode 100644 index 66c945b0..00000000 --- a/examples/05-migrations/warthog.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - moduleImportPath: '../../../src' -}; diff --git a/examples/06-base-service/generated/classes.ts b/examples/06-base-service/generated/classes.ts index 4fdf6a83..f55e6fcf 100644 --- a/examples/06-base-service/generated/classes.ts +++ b/examples/06-base-service/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { User } from "../src/user.model"; diff --git a/examples/06-base-service/generated/ormconfig.ts b/examples/06-base-service/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/06-base-service/generated/ormconfig.ts +++ b/examples/06-base-service/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/06-base-service/package.json b/examples/06-base-service/package.json index 6deb01fe..ea773c71 100644 --- a/examples/06-base-service/package.json +++ b/examples/06-base-service/package.json @@ -16,7 +16,7 @@ "test": "jest --detectOpenHandles --verbose --coverage", "test:watch": "jest --watch", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "debug": "^4.1.1", diff --git a/examples/06-base-service/src/index.ts b/examples/06-base-service/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/06-base-service/src/index.ts +++ b/examples/06-base-service/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/06-base-service/src/server.ts b/examples/06-base-service/src/server.ts index a1d9c349..dbb0c32d 100644 --- a/examples/06-base-service/src/server.ts +++ b/examples/06-base-service/src/server.ts @@ -1,12 +1,12 @@ import 'reflect-metadata'; -import { BaseContext, Server } from '../../../src'; +import { BaseContext, Server } from '@warthog/server-express'; interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/examples/06-base-service/src/user.model.ts b/examples/06-base-service/src/user.model.ts index 9a9b3776..bbb3dd93 100644 --- a/examples/06-base-service/src/user.model.ts +++ b/examples/06-base-service/src/user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, StringField } from '../../../src'; +import { BaseModel, Model, StringField } from '@warthog/core'; @Model() export class User extends BaseModel { diff --git a/examples/06-base-service/src/user.resolver.ts b/examples/06-base-service/src/user.resolver.ts index 95a11a73..67e054ef 100644 --- a/examples/06-base-service/src/user.resolver.ts +++ b/examples/06-base-service/src/user.resolver.ts @@ -3,7 +3,7 @@ import { Container, Inject } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseContext, BaseService, StandardDeleteResponse } from '../../../src'; +import { BaseContext, BaseService, StandardDeleteResponse } from '@warthog/core'; import { UserCreateInput, UserUpdateArgs, diff --git a/examples/06-base-service/src/user.service.ts b/examples/06-base-service/src/user.service.ts index cbd0869a..17a8979b 100644 --- a/examples/06-base-service/src/user.service.ts +++ b/examples/06-base-service/src/user.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../src'; +import { BaseService } from '@warthog/core'; import { User } from './user.model'; diff --git a/examples/06-base-service/tools/seed.ts b/examples/06-base-service/tools/seed.ts index 093f97de..d633f7c7 100644 --- a/examples/06-base-service/tools/seed.ts +++ b/examples/06-base-service/tools/seed.ts @@ -1,6 +1,6 @@ import * as Faker from 'faker'; -import { getBindingError, logger } from '../../../src'; +import { getBindingError, logger } from '@warthog/core'; import { getServer } from '../src/server'; diff --git a/examples/06-base-service/warthog.config.js b/examples/06-base-service/warthog.config.js deleted file mode 100644 index 66c945b0..00000000 --- a/examples/06-base-service/warthog.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - moduleImportPath: '../../../src' -}; diff --git a/examples/07-feature-flags/generated/binding.ts b/examples/07-feature-flags/generated/binding.ts index a96b4094..85ad93df 100644 --- a/examples/07-feature-flags/generated/binding.ts +++ b/examples/07-feature-flags/generated/binding.ts @@ -231,14 +231,14 @@ export interface EnvironmentCreateInput { name: String key: String projKey: String - projectId?: String | null + projectId?: ID_Input | null } export interface EnvironmentUpdateInput { name?: String | null key?: String | null projKey?: String | null - projectId?: String | null + projectId?: ID_Input | null } export interface EnvironmentWhereInput { @@ -290,29 +290,29 @@ export interface FeatureFlagCreateInput { name: String key: String projKey: String - projectId?: String | null + projectId?: ID_Input | null } export interface FeatureFlagSegmentCreateInput { projKey: String - projectId?: String | null + projectId?: ID_Input | null envKey: String - environmentId?: String | null + environmentId?: ID_Input | null featureKey: String - featureFlagId?: String | null + featureFlagId?: ID_Input | null segmentKey: String - segmentId?: String | null + segmentId?: ID_Input | null } export interface FeatureFlagSegmentUpdateInput { projKey?: String | null - projectId?: String | null + projectId?: ID_Input | null envKey?: String | null - environmentId?: String | null + environmentId?: ID_Input | null featureKey?: String | null - featureFlagId?: String | null + featureFlagId?: ID_Input | null segmentKey?: String | null - segmentId?: String | null + segmentId?: ID_Input | null } export interface FeatureFlagSegmentWhereInput { @@ -381,29 +381,29 @@ export interface FeatureFlagUpdateInput { name?: String | null key?: String | null projKey?: String | null - projectId?: String | null + projectId?: ID_Input | null } export interface FeatureFlagUserCreateInput { featureKey: String - featureFlagId?: String | null + featureFlagId?: ID_Input | null userKey: String - userId?: String | null + userId?: ID_Input | null projKey: String - projectId?: String | null + projectId?: ID_Input | null envKey: String - environmentId?: String | null + environmentId?: ID_Input | null } export interface FeatureFlagUserUpdateInput { featureKey?: String | null - featureFlagId?: String | null + featureFlagId?: ID_Input | null userKey?: String | null - userId?: String | null + userId?: ID_Input | null projKey?: String | null - projectId?: String | null + projectId?: ID_Input | null envKey?: String | null - environmentId?: String | null + environmentId?: ID_Input | null } export interface FeatureFlagUserWhereInput { @@ -561,9 +561,9 @@ export interface SegmentCreateInput { key: String description: String projKey: String - projectId?: String | null + projectId?: ID_Input | null envKey: String - environmentId?: String | null + environmentId?: ID_Input | null } export interface SegmentUpdateInput { @@ -571,9 +571,9 @@ export interface SegmentUpdateInput { key?: String | null description?: String | null projKey?: String | null - projectId?: String | null + projectId?: ID_Input | null envKey?: String | null - environmentId?: String | null + environmentId?: ID_Input | null } export interface SegmentWhereInput { @@ -639,24 +639,24 @@ export interface UserCreateInput { export interface UserSegmentCreateInput { projKey: String - projectId?: String | null + projectId?: ID_Input | null envKey: String - environmentId?: String | null + environmentId?: ID_Input | null userKey: String - userId?: String | null + userId?: ID_Input | null segmentKey: String - segmentId?: String | null + segmentId?: ID_Input | null } export interface UserSegmentUpdateInput { projKey?: String | null - projectId?: String | null + projectId?: ID_Input | null envKey?: String | null - environmentId?: String | null + environmentId?: ID_Input | null userKey?: String | null - userId?: String | null + userId?: ID_Input | null segmentKey?: String | null - segmentId?: String | null + segmentId?: ID_Input | null } export interface UserSegmentWhereInput { diff --git a/examples/07-feature-flags/generated/classes.ts b/examples/07-feature-flags/generated/classes.ts index 0e11fd17..827d17f8 100644 --- a/examples/07-feature-flags/generated/classes.ts +++ b/examples/07-feature-flags/generated/classes.ts @@ -20,7 +20,7 @@ import { registerEnumType } from "type-graphql"; const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { Segment } from "../src/segment/segment.model"; // @ts-ignore diff --git a/examples/07-feature-flags/generated/ormconfig.ts b/examples/07-feature-flags/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/07-feature-flags/generated/ormconfig.ts +++ b/examples/07-feature-flags/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/07-feature-flags/generated/schema.graphql b/examples/07-feature-flags/generated/schema.graphql index 9b7f09dc..7d9db13b 100644 --- a/examples/07-feature-flags/generated/schema.graphql +++ b/examples/07-feature-flags/generated/schema.graphql @@ -88,7 +88,7 @@ input EnvironmentCreateInput { name: String! key: String! projKey: String! - projectId: String + projectId: ID } enum EnvironmentOrderByInput { @@ -112,7 +112,7 @@ input EnvironmentUpdateInput { name: String key: String projKey: String - projectId: String + projectId: ID } input EnvironmentWhereInput { @@ -182,7 +182,7 @@ input FeatureFlagCreateInput { name: String! key: String! projKey: String! - projectId: String + projectId: ID } enum FeatureFlagOrderByInput { @@ -227,13 +227,13 @@ type FeatureFlagSegment implements BaseGraphQLObject { input FeatureFlagSegmentCreateInput { projKey: String! - projectId: String + projectId: ID envKey: String! - environmentId: String + environmentId: ID featureKey: String! - featureFlagId: String + featureFlagId: ID segmentKey: String! - segmentId: String + segmentId: ID } enum FeatureFlagSegmentOrderByInput { @@ -263,13 +263,13 @@ enum FeatureFlagSegmentOrderByInput { input FeatureFlagSegmentUpdateInput { projKey: String - projectId: String + projectId: ID envKey: String - environmentId: String + environmentId: ID featureKey: String - featureFlagId: String + featureFlagId: ID segmentKey: String - segmentId: String + segmentId: ID } input FeatureFlagSegmentWhereInput { @@ -338,7 +338,7 @@ input FeatureFlagUpdateInput { name: String key: String projKey: String - projectId: String + projectId: ID } type FeatureFlagUser implements BaseGraphQLObject { @@ -366,13 +366,13 @@ type FeatureFlagUser implements BaseGraphQLObject { input FeatureFlagUserCreateInput { featureKey: String! - featureFlagId: String + featureFlagId: ID userKey: String! - userId: String + userId: ID projKey: String! - projectId: String + projectId: ID envKey: String! - environmentId: String + environmentId: ID } enum FeatureFlagUserOrderByInput { @@ -402,13 +402,13 @@ enum FeatureFlagUserOrderByInput { input FeatureFlagUserUpdateInput { featureKey: String - featureFlagId: String + featureFlagId: ID userKey: String - userId: String + userId: ID projKey: String - projectId: String + projectId: ID envKey: String - environmentId: String + environmentId: ID } input FeatureFlagUserWhereInput { @@ -663,9 +663,9 @@ input SegmentCreateInput { key: String! description: String! projKey: String! - projectId: String + projectId: ID envKey: String! - environmentId: String + environmentId: ID } enum SegmentOrderByInput { @@ -696,9 +696,9 @@ input SegmentUpdateInput { key: String description: String projKey: String - projectId: String + projectId: ID envKey: String - environmentId: String + environmentId: ID } input SegmentWhereInput { @@ -805,13 +805,13 @@ type UserSegment implements BaseGraphQLObject { input UserSegmentCreateInput { projKey: String! - projectId: String + projectId: ID envKey: String! - environmentId: String + environmentId: ID userKey: String! - userId: String + userId: ID segmentKey: String! - segmentId: String + segmentId: ID } enum UserSegmentOrderByInput { @@ -841,13 +841,13 @@ enum UserSegmentOrderByInput { input UserSegmentUpdateInput { projKey: String - projectId: String + projectId: ID envKey: String - environmentId: String + environmentId: ID userKey: String - userId: String + userId: ID segmentKey: String - segmentId: String + segmentId: ID } input UserSegmentWhereInput { diff --git a/examples/07-feature-flags/package.json b/examples/07-feature-flags/package.json index f5c76b87..c88619cb 100644 --- a/examples/07-feature-flags/package.json +++ b/examples/07-feature-flags/package.json @@ -15,7 +15,7 @@ "test": "jest --detectOpenHandles --verbose --coverage", "test:watch": "jest --watch", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": {}, "devDependencies": { diff --git a/examples/07-feature-flags/src/environment/environment.model.ts b/examples/07-feature-flags/src/environment/environment.model.ts index a6fed9e0..af903bf2 100644 --- a/examples/07-feature-flags/src/environment/environment.model.ts +++ b/examples/07-feature-flags/src/environment/environment.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, OneToMany, StringField } from '@warthog/core'; // import { FeatureFlagSegment, FeatureFlagUser, Project, Segment, UserSegment } from '../models'; import { FeatureFlagSegment } from '../feature-flag-segment/feature-flag-segment.model'; diff --git a/examples/07-feature-flags/src/environment/environment.resolver.ts b/examples/07-feature-flags/src/environment/environment.resolver.ts index 361af736..4f05861a 100644 --- a/examples/07-feature-flags/src/environment/environment.resolver.ts +++ b/examples/07-feature-flags/src/environment/environment.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../src'; +import { BaseContext, StandardDeleteResponse, UserId } from '@warthog/core'; import { EnvironmentCreateInput, EnvironmentUpdateArgs, diff --git a/examples/07-feature-flags/src/environment/environment.service.ts b/examples/07-feature-flags/src/environment/environment.service.ts index 515bdcc4..9640f997 100644 --- a/examples/07-feature-flags/src/environment/environment.service.ts +++ b/examples/07-feature-flags/src/environment/environment.service.ts @@ -2,7 +2,7 @@ import { Inject, Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { ProjectService } from '../project/project.service'; import { Environment } from './environment.model'; diff --git a/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.model.ts b/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.model.ts index e53a5a37..6e060b89 100644 --- a/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.model.ts +++ b/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { Environment } from '../environment/environment.model'; import { FeatureFlag } from '../feature-flag/feature-flag.model'; diff --git a/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.resolver.ts b/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.resolver.ts index d3e11f2b..2de954eb 100644 --- a/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.resolver.ts +++ b/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Args, Mutation, Query, Resolver } from 'type-graphql'; import { Inject } from 'typedi'; -import { StandardDeleteResponse, UserId } from '../../../../src'; +import { StandardDeleteResponse, UserId } from '@warthog/core'; import { FeatureFlagSegmentCreateInput, FeatureFlagSegmentUpdateArgs, diff --git a/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.service.ts b/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.service.ts index eba44231..725dcda9 100644 --- a/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.service.ts +++ b/examples/07-feature-flags/src/feature-flag-segment/feature-flag-segment.service.ts @@ -2,7 +2,7 @@ import { Inject, Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { EnvironmentService } from '../environment/environment.service'; import { FeatureFlagService } from '../feature-flag/feature-flag.service'; diff --git a/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.model.ts b/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.model.ts index 0f0836a8..42bb34ab 100644 --- a/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.model.ts +++ b/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { Environment } from '../environment/environment.model'; import { FeatureFlag } from '../feature-flag/feature-flag.model'; diff --git a/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.resolver.ts b/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.resolver.ts index 67aed19d..407eae9c 100644 --- a/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.resolver.ts +++ b/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../src'; +import { BaseContext, StandardDeleteResponse, UserId } from '@warthog/core'; import { FeatureFlagUserCreateInput, FeatureFlagUserUpdateArgs, diff --git a/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.service.ts b/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.service.ts index 3d0949b4..207eb1e8 100644 --- a/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.service.ts +++ b/examples/07-feature-flags/src/feature-flag-user/feature-flag-user.service.ts @@ -1,8 +1,10 @@ import { Inject, Service } from 'typedi'; -import { DeepPartial, Repository } from 'typeorm'; +import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; + +import { FeatureFlagUserCreateInput } from '../../generated'; import { EnvironmentService } from '../environment/environment.service'; import { FeatureFlagService } from '../feature-flag/feature-flag.service'; @@ -25,7 +27,7 @@ export class FeatureFlagUserService extends BaseService { } // Linking of Environment to Project happens via `projKey` - async create(data: FeatureFlagUser, userId: string): Promise { + async create(data: FeatureFlagUserCreateInput, userId: string): Promise { const project = await this.projectService.findOne({ key: data.projKey }); const environment = await this.environmentService.findOne({ key: data.envKey, diff --git a/examples/07-feature-flags/src/feature-flag/feature-flag.model.ts b/examples/07-feature-flags/src/feature-flag/feature-flag.model.ts index df472c49..060863d7 100644 --- a/examples/07-feature-flags/src/feature-flag/feature-flag.model.ts +++ b/examples/07-feature-flags/src/feature-flag/feature-flag.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, OneToMany, StringField } from '@warthog/core'; import { Project } from '../project/project.model'; diff --git a/examples/07-feature-flags/src/feature-flag/feature-flag.resolver.ts b/examples/07-feature-flags/src/feature-flag/feature-flag.resolver.ts index 602b0440..408b298c 100644 --- a/examples/07-feature-flags/src/feature-flag/feature-flag.resolver.ts +++ b/examples/07-feature-flags/src/feature-flag/feature-flag.resolver.ts @@ -12,7 +12,7 @@ import { } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../src'; +import { BaseContext, StandardDeleteResponse, UserId } from '@warthog/core'; import { FeatureFlagCreateInput, FeatureFlagUpdateArgs, diff --git a/examples/07-feature-flags/src/feature-flag/feature-flag.service.ts b/examples/07-feature-flags/src/feature-flag/feature-flag.service.ts index e74eb9af..cb7ec0a0 100644 --- a/examples/07-feature-flags/src/feature-flag/feature-flag.service.ts +++ b/examples/07-feature-flags/src/feature-flag/feature-flag.service.ts @@ -2,7 +2,7 @@ import { Inject, Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { ProjectService } from '../project/project.service'; @@ -37,12 +37,19 @@ export class FeatureFlagService extends BaseService { FROM user_segments us INNER JOIN segments s ON us.segment_id = s.id INNER JOIN feature_flag_segments ffs ON ffs.segment_id = s.id - WHERE us.user_key = '$1' - AND us.proj_key = '$2' - AND us.env_key = '$3'; + WHERE us.user_key = '$4' + AND us.proj_key = '$5' + AND us.env_key = '$6'; `; - const results = await this.repository.query(query, [data.userKey, data.projKey, data.envKey]); + const results = await this.repository.query(query, [ + data.userKey, + data.projKey, + data.envKey, + data.userKey, + data.projKey, + data.envKey + ]); return results.map(item => item.feature_key); } diff --git a/examples/07-feature-flags/src/index.ts b/examples/07-feature-flags/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/07-feature-flags/src/index.ts +++ b/examples/07-feature-flags/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/07-feature-flags/src/logger.ts b/examples/07-feature-flags/src/logger.ts index 2506a96d..27f3ed31 100644 --- a/examples/07-feature-flags/src/logger.ts +++ b/examples/07-feature-flags/src/logger.ts @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import * as util from 'util'; -import { getBindingError } from '../../../src'; +import { getBindingError } from '@warthog/core'; export class Logger { static info(...args: any[]) { diff --git a/examples/07-feature-flags/src/project/project.model.ts b/examples/07-feature-flags/src/project/project.model.ts index ab922e03..b4be7a3c 100644 --- a/examples/07-feature-flags/src/project/project.model.ts +++ b/examples/07-feature-flags/src/project/project.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { Environment } from '../environment/environment.model'; import { FeatureFlagSegment } from '../feature-flag-segment/feature-flag-segment.model'; diff --git a/examples/07-feature-flags/src/project/project.resolver.ts b/examples/07-feature-flags/src/project/project.resolver.ts index 33453e33..89a20a00 100644 --- a/examples/07-feature-flags/src/project/project.resolver.ts +++ b/examples/07-feature-flags/src/project/project.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../src'; +import { BaseContext, StandardDeleteResponse, UserId } from '@warthog/core'; import { ProjectCreateInput, ProjectUpdateArgs, diff --git a/examples/07-feature-flags/src/project/project.service.ts b/examples/07-feature-flags/src/project/project.service.ts index 68db19cb..6e00a68d 100644 --- a/examples/07-feature-flags/src/project/project.service.ts +++ b/examples/07-feature-flags/src/project/project.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { Project } from './project.model'; diff --git a/examples/07-feature-flags/src/segment/segment.model.ts b/examples/07-feature-flags/src/segment/segment.model.ts index efe92d8f..f414ff94 100644 --- a/examples/07-feature-flags/src/segment/segment.model.ts +++ b/examples/07-feature-flags/src/segment/segment.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, OneToMany, StringField } from '@warthog/core'; // import { Environment, FeatureFlagSegment, Project, UserSegment } from '../models'; import { Environment } from '../environment/environment.model'; diff --git a/examples/07-feature-flags/src/segment/segment.resolver.ts b/examples/07-feature-flags/src/segment/segment.resolver.ts index a03de41f..96e45372 100644 --- a/examples/07-feature-flags/src/segment/segment.resolver.ts +++ b/examples/07-feature-flags/src/segment/segment.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../src'; +import { BaseContext, StandardDeleteResponse, UserId } from '@warthog/core'; import { SegmentCreateInput, SegmentUpdateArgs, diff --git a/examples/07-feature-flags/src/segment/segment.service.ts b/examples/07-feature-flags/src/segment/segment.service.ts index 4126fdc7..ce0c68a7 100644 --- a/examples/07-feature-flags/src/segment/segment.service.ts +++ b/examples/07-feature-flags/src/segment/segment.service.ts @@ -2,7 +2,7 @@ import { Inject, Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { EnvironmentService } from '../environment/environment.service'; import { ProjectService } from '../project/project.service'; diff --git a/examples/07-feature-flags/src/server.ts b/examples/07-feature-flags/src/server.ts index 7a1bac08..537ca5eb 100644 --- a/examples/07-feature-flags/src/server.ts +++ b/examples/07-feature-flags/src/server.ts @@ -1,12 +1,12 @@ import 'reflect-metadata'; -import { BaseContext, Server, ServerOptions } from '../../../src'; +import { BaseContext, Server, ServerOptions } from '@warthog/server-express'; interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/examples/07-feature-flags/src/user-segment/user-segment.model.ts b/examples/07-feature-flags/src/user-segment/user-segment.model.ts index 0a26a876..4c1221ae 100644 --- a/examples/07-feature-flags/src/user-segment/user-segment.model.ts +++ b/examples/07-feature-flags/src/user-segment/user-segment.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; // import {Environment, Project, Segment, User} from '../models' import { Environment } from '../environment/environment.model'; diff --git a/examples/07-feature-flags/src/user-segment/user-segment.resolver.ts b/examples/07-feature-flags/src/user-segment/user-segment.resolver.ts index 083c62a6..dfc2d198 100644 --- a/examples/07-feature-flags/src/user-segment/user-segment.resolver.ts +++ b/examples/07-feature-flags/src/user-segment/user-segment.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Args, Mutation, Query, Resolver } from 'type-graphql'; import { Inject } from 'typedi'; -import { StandardDeleteResponse, UserId } from '../../../../src'; +import { StandardDeleteResponse, UserId } from '@warthog/core'; import { UserSegmentCreateInput, UserSegmentUpdateArgs, diff --git a/examples/07-feature-flags/src/user-segment/user-segment.service.ts b/examples/07-feature-flags/src/user-segment/user-segment.service.ts index ccd4ff15..1be04485 100644 --- a/examples/07-feature-flags/src/user-segment/user-segment.service.ts +++ b/examples/07-feature-flags/src/user-segment/user-segment.service.ts @@ -2,7 +2,7 @@ import { Inject, Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { EnvironmentService } from '../environment/environment.service'; import { ProjectService } from '../project/project.service'; diff --git a/examples/07-feature-flags/src/user/user.model.ts b/examples/07-feature-flags/src/user/user.model.ts index 84b03262..b9e70588 100644 --- a/examples/07-feature-flags/src/user/user.model.ts +++ b/examples/07-feature-flags/src/user/user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; // import { FeatureFlagUser, UserSegment } from '../models'; import { FeatureFlagUser } from '../feature-flag-user/feature-flag-user.model'; diff --git a/examples/07-feature-flags/src/user/user.resolver.ts b/examples/07-feature-flags/src/user/user.resolver.ts index 1f46b7ee..ffb28172 100644 --- a/examples/07-feature-flags/src/user/user.resolver.ts +++ b/examples/07-feature-flags/src/user/user.resolver.ts @@ -2,7 +2,7 @@ import { Arg, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext } from '../../../../src'; +import { BaseContext } from '@warthog/core'; import { UserWhereUniqueInput } from '../../generated'; diff --git a/examples/07-feature-flags/src/user/user.service.ts b/examples/07-feature-flags/src/user/user.service.ts index 1b6db410..c00ad5b5 100644 --- a/examples/07-feature-flags/src/user/user.service.ts +++ b/examples/07-feature-flags/src/user/user.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { DeepPartial, Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../src'; +import { BaseService } from '@warthog/core'; import { User } from './user.model'; diff --git a/examples/07-feature-flags/tools/seed.ts b/examples/07-feature-flags/tools/seed.ts index a116c913..eb38e07e 100644 --- a/examples/07-feature-flags/tools/seed.ts +++ b/examples/07-feature-flags/tools/seed.ts @@ -1,4 +1,4 @@ -import { getBindingError } from '../../../src'; +import { getBindingError } from '@warthog/core'; import { Binding } from '../generated/binding'; import { Logger } from '../src/logger'; diff --git a/examples/07-feature-flags/warthog.config.js b/examples/07-feature-flags/warthog.config.js index 0730c5ce..1103c629 100644 --- a/examples/07-feature-flags/warthog.config.js +++ b/examples/07-feature-flags/warthog.config.js @@ -1,4 +1,3 @@ module.exports = { - cliGeneratePath: './src/${kebabName}', - moduleImportPath: '../../../src' + cliGeneratePath: './src/${kebabName}' }; diff --git a/examples/08-performance/generated/binding.ts b/examples/08-performance/generated/binding.ts index 9584ceaf..35777510 100644 --- a/examples/08-performance/generated/binding.ts +++ b/examples/08-performance/generated/binding.ts @@ -93,12 +93,12 @@ export interface BaseWhereInput { export interface PostCreateInput { id?: String | null title: String - userId: String + userId: ID_Output } export interface PostUpdateInput { title?: String | null - userId?: String | null + userId?: ID_Input | null } export interface PostWhereInput { diff --git a/examples/08-performance/generated/classes.ts b/examples/08-performance/generated/classes.ts index d810d8eb..9f47381c 100644 --- a/examples/08-performance/generated/classes.ts +++ b/examples/08-performance/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { User } from "../src/modules/user/user.model"; // @ts-ignore @@ -285,7 +289,7 @@ export class PostCreateInput { @TypeGraphQLField() title!: string; - @TypeGraphQLField(() => String) + @TypeGraphQLField(() => ID) userId!: string; } @@ -294,7 +298,7 @@ export class PostUpdateInput { @TypeGraphQLField({ nullable: true }) title?: string; - @TypeGraphQLField(() => String, { nullable: true }) + @TypeGraphQLField(() => ID, { nullable: true }) userId?: string; } diff --git a/examples/08-performance/generated/ormconfig.ts b/examples/08-performance/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/08-performance/generated/ormconfig.ts +++ b/examples/08-performance/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/08-performance/generated/schema.graphql b/examples/08-performance/generated/schema.graphql index adbaa634..421efff4 100644 --- a/examples/08-performance/generated/schema.graphql +++ b/examples/08-performance/generated/schema.graphql @@ -91,7 +91,7 @@ type Post implements BaseGraphQLObject { input PostCreateInput { id: String title: String! - userId: String! + userId: ID! } enum PostOrderByInput { @@ -109,7 +109,7 @@ enum PostOrderByInput { input PostUpdateInput { title: String - userId: String + userId: ID } input PostWhereInput { diff --git a/examples/08-performance/package.json b/examples/08-performance/package.json index 96110ce9..6aea79b1 100644 --- a/examples/08-performance/package.json +++ b/examples/08-performance/package.json @@ -12,7 +12,7 @@ "start": "yarn start:ts", "start:ts": "ts-node --type-check src/index.ts", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "handlebars": "^4.5.2", diff --git a/examples/08-performance/src/index.ts b/examples/08-performance/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/08-performance/src/index.ts +++ b/examples/08-performance/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/08-performance/src/logger.ts b/examples/08-performance/src/logger.ts index 2506a96d..27f3ed31 100644 --- a/examples/08-performance/src/logger.ts +++ b/examples/08-performance/src/logger.ts @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import * as util from 'util'; -import { getBindingError } from '../../../src'; +import { getBindingError } from '@warthog/core'; export class Logger { static info(...args: any[]) { diff --git a/examples/08-performance/src/models.ts b/examples/08-performance/src/models.ts index 1df0e31c..4c308bc0 100644 --- a/examples/08-performance/src/models.ts +++ b/examples/08-performance/src/models.ts @@ -1,2 +1,2 @@ -export { Post } from './post.model'; -export { User } from './user.model'; +export { Post } from './modules/post/post.model'; +export { User } from './modules/user/user.model'; diff --git a/examples/08-performance/src/modules/post/post.model.ts b/examples/08-performance/src/modules/post/post.model.ts index 1de00b5c..950fdfac 100644 --- a/examples/08-performance/src/modules/post/post.model.ts +++ b/examples/08-performance/src/modules/post/post.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { User } from '../user/user.model'; diff --git a/examples/08-performance/src/modules/post/post.resolver.ts b/examples/08-performance/src/modules/post/post.resolver.ts index e808386b..ea286672 100644 --- a/examples/08-performance/src/modules/post/post.resolver.ts +++ b/examples/08-performance/src/modules/post/post.resolver.ts @@ -1,7 +1,9 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, Fields, StandardDeleteResponse, UserId } from '../../../../../src'; +import { Fields, StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + import { PostCreateInput, PostCreateManyArgs, diff --git a/examples/08-performance/src/modules/post/post.service.ts b/examples/08-performance/src/modules/post/post.service.ts index 5e5d2cef..ac8cfc2f 100644 --- a/examples/08-performance/src/modules/post/post.service.ts +++ b/examples/08-performance/src/modules/post/post.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../../src'; +import { BaseService } from '@warthog/core'; import { Post } from './post.model'; @Service('PostService') diff --git a/examples/08-performance/src/modules/user/user.model.ts b/examples/08-performance/src/modules/user/user.model.ts index 5b348515..faddc4ae 100644 --- a/examples/08-performance/src/modules/user/user.model.ts +++ b/examples/08-performance/src/modules/user/user.model.ts @@ -1,5 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../../src'; - +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { Post } from '../post/post.model'; @Model() diff --git a/examples/08-performance/src/modules/user/user.resolver.ts b/examples/08-performance/src/modules/user/user.resolver.ts index f4282821..2ca1d05c 100644 --- a/examples/08-performance/src/modules/user/user.resolver.ts +++ b/examples/08-performance/src/modules/user/user.resolver.ts @@ -1,7 +1,9 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../../src'; +import { StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + import { UserCreateInput, UserUpdateArgs, diff --git a/examples/08-performance/src/modules/user/user.service.ts b/examples/08-performance/src/modules/user/user.service.ts index cc727695..30f9b39f 100644 --- a/examples/08-performance/src/modules/user/user.service.ts +++ b/examples/08-performance/src/modules/user/user.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../../src'; +import { BaseService } from '@warthog/core'; import { User } from './user.model'; diff --git a/examples/08-performance/src/server.ts b/examples/08-performance/src/server.ts index 7e7331b9..5955182d 100644 --- a/examples/08-performance/src/server.ts +++ b/examples/08-performance/src/server.ts @@ -1,12 +1,12 @@ import 'reflect-metadata'; -import { BaseContext, Server } from '../../../src'; +import { BaseContext, Server } from '@warthog/server-express'; interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/examples/08-performance/warthog.config.js b/examples/08-performance/warthog.config.js index 879f4967..eb76562b 100644 --- a/examples/08-performance/warthog.config.js +++ b/examples/08-performance/warthog.config.js @@ -1,5 +1,4 @@ module.exports = { allowOptionalIdOnCreate: 'true', - cliGeneratePath: './src/modules/${kebabName}', - moduleImportPath: '../../../src' + cliGeneratePath: './src/modules/${kebabName}' }; diff --git a/examples/09-production/generated/binding.ts b/examples/09-production/generated/binding.ts index baec7e4a..fbc4182c 100644 --- a/examples/09-production/generated/binding.ts +++ b/examples/09-production/generated/binding.ts @@ -92,12 +92,12 @@ export interface BaseWhereInput { export interface PostCreateInput { title: String - userId: String + userId: ID_Output } export interface PostUpdateInput { title?: String | null - userId?: String | null + userId?: ID_Input | null } export interface PostWhereInput { diff --git a/examples/09-production/generated/classes.ts b/examples/09-production/generated/classes.ts index f2de7fb6..807f438b 100644 --- a/examples/09-production/generated/classes.ts +++ b/examples/09-production/generated/classes.ts @@ -1,8 +1,11 @@ // This file has been auto-generated by Warthog. Do not update directly as it // will be re-written. If you need to change this file, update models or add // new TypeGraphQL objects +// @ts-ignore import { GraphQLDateTime as DateTime } from "graphql-iso-date"; import { GraphQLID as ID } from "graphql"; + +// @ts-ignore import { ArgsType, Field as TypeGraphQLField, @@ -10,13 +13,14 @@ import { InputType as TypeGraphQLInputType, Int } from "type-graphql"; +// @ts-ignore import { registerEnumType } from "type-graphql"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../../src"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { User } from "../src/modules/user/user.model"; // @ts-ignore @@ -279,7 +283,7 @@ export class PostCreateInput { @TypeGraphQLField() title!: string; - @TypeGraphQLField(() => String) + @TypeGraphQLField(() => ID) userId!: string; } @@ -288,7 +292,7 @@ export class PostUpdateInput { @TypeGraphQLField({ nullable: true }) title?: string; - @TypeGraphQLField(() => String, { nullable: true }) + @TypeGraphQLField(() => ID, { nullable: true }) userId?: string; } diff --git a/examples/09-production/generated/ormconfig.ts b/examples/09-production/generated/ormconfig.ts index caf1b679..2be40eed 100644 --- a/examples/09-production/generated/ormconfig.ts +++ b/examples/09-production/generated/ormconfig.ts @@ -1,3 +1,3 @@ -import { getBaseConfig } from '../../../src'; +import { getBaseConfig } from '@warthog/core'; module.exports = getBaseConfig(); \ No newline at end of file diff --git a/examples/09-production/generated/schema.graphql b/examples/09-production/generated/schema.graphql index 6d96540e..40a7a17b 100644 --- a/examples/09-production/generated/schema.graphql +++ b/examples/09-production/generated/schema.graphql @@ -90,7 +90,7 @@ type Post implements BaseGraphQLObject { input PostCreateInput { title: String! - userId: String! + userId: ID! } enum PostOrderByInput { @@ -108,7 +108,7 @@ enum PostOrderByInput { input PostUpdateInput { title: String - userId: String + userId: ID } input PostWhereInput { diff --git a/examples/09-production/package.json b/examples/09-production/package.json index f84780a3..b1585bda 100644 --- a/examples/09-production/package.json +++ b/examples/09-production/package.json @@ -12,7 +12,7 @@ "start": "yarn start:ts", "start:ts": "ts-node --type-check src/index.ts", "//": "Allows us to use the local warthog CLI in commands above", - "warthog": "../../bin/warthog" + "warthog": "../../packages/cli/bin/warthog" }, "dependencies": { "handlebars": "^4.5.2", diff --git a/examples/09-production/src/index.ts b/examples/09-production/src/index.ts index 5189a59d..21cf0455 100644 --- a/examples/09-production/src/index.ts +++ b/examples/09-production/src/index.ts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { logger } from '../../../src'; +import { logger } from '@warthog/core'; import { getServer } from './server'; diff --git a/examples/09-production/src/logger.ts b/examples/09-production/src/logger.ts index 87cfb81b..d85a354e 100644 --- a/examples/09-production/src/logger.ts +++ b/examples/09-production/src/logger.ts @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import * as util from 'util'; -import { getBindingError } from '../../../src'; +import { getBindingError } from '@warthog/core'; export class Logger { static info(...args: any[]) { diff --git a/examples/09-production/src/models.ts b/examples/09-production/src/models.ts index 1df0e31c..4c308bc0 100644 --- a/examples/09-production/src/models.ts +++ b/examples/09-production/src/models.ts @@ -1,2 +1,2 @@ -export { Post } from './post.model'; -export { User } from './user.model'; +export { Post } from './modules/post/post.model'; +export { User } from './modules/user/user.model'; diff --git a/examples/09-production/src/modules/post/post.model.ts b/examples/09-production/src/modules/post/post.model.ts index 1de00b5c..950fdfac 100644 --- a/examples/09-production/src/modules/post/post.model.ts +++ b/examples/09-production/src/modules/post/post.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../../../src'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { User } from '../user/user.model'; diff --git a/examples/09-production/src/modules/post/post.resolver.ts b/examples/09-production/src/modules/post/post.resolver.ts index e808386b..b599a1d7 100644 --- a/examples/09-production/src/modules/post/post.resolver.ts +++ b/examples/09-production/src/modules/post/post.resolver.ts @@ -1,7 +1,8 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, Fields, StandardDeleteResponse, UserId } from '../../../../../src'; +import { Fields, StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; import { PostCreateInput, PostCreateManyArgs, diff --git a/examples/09-production/src/modules/post/post.service.ts b/examples/09-production/src/modules/post/post.service.ts index 5e5d2cef..ac8cfc2f 100644 --- a/examples/09-production/src/modules/post/post.service.ts +++ b/examples/09-production/src/modules/post/post.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../../src'; +import { BaseService } from '@warthog/core'; import { Post } from './post.model'; @Service('PostService') diff --git a/examples/09-production/src/modules/user/user.model.ts b/examples/09-production/src/modules/user/user.model.ts index 5b348515..8aff8dad 100644 --- a/examples/09-production/src/modules/user/user.model.ts +++ b/examples/09-production/src/modules/user/user.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, Model, OneToMany, StringField } from '../../../../../src'; +import { BaseModel, Model, OneToMany, StringField } from '@warthog/core'; import { Post } from '../post/post.model'; diff --git a/examples/09-production/src/modules/user/user.resolver.ts b/examples/09-production/src/modules/user/user.resolver.ts index f4282821..2ca1d05c 100644 --- a/examples/09-production/src/modules/user/user.resolver.ts +++ b/examples/09-production/src/modules/user/user.resolver.ts @@ -1,7 +1,9 @@ import { Arg, Args, Ctx, FieldResolver, Mutation, Query, Resolver, Root } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, StandardDeleteResponse, UserId } from '../../../../../src'; +import { StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + import { UserCreateInput, UserUpdateArgs, diff --git a/examples/09-production/src/modules/user/user.service.ts b/examples/09-production/src/modules/user/user.service.ts index cc727695..30f9b39f 100644 --- a/examples/09-production/src/modules/user/user.service.ts +++ b/examples/09-production/src/modules/user/user.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../../../src'; +import { BaseService } from '@warthog/core'; import { User } from './user.model'; diff --git a/examples/09-production/src/server.ts b/examples/09-production/src/server.ts index 7e7331b9..5955182d 100644 --- a/examples/09-production/src/server.ts +++ b/examples/09-production/src/server.ts @@ -1,12 +1,12 @@ import 'reflect-metadata'; -import { BaseContext, Server } from '../../../src'; +import { BaseContext, Server } from '@warthog/server-express'; interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/examples/09-production/warthog.config.js b/examples/09-production/warthog.config.js index 6881ae0f..ef9a58f6 100644 --- a/examples/09-production/warthog.config.js +++ b/examples/09-production/warthog.config.js @@ -1,4 +1,3 @@ module.exports = { - cliGeneratePath: './src/modules/${kebabName}', - moduleImportPath: '../../../src' + cliGeneratePath: './src/modules/${kebabName}' }; diff --git a/lerna.json b/lerna.json new file mode 100644 index 00000000..0fa3dd61 --- /dev/null +++ b/lerna.json @@ -0,0 +1,6 @@ +{ + "packages": ["packages/*"], + "npmClient": "yarn", + "useWorkspaces": true, + "version": "0.0.0" +} diff --git a/package.json b/package.json index 9911c92a..c7337b14 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,28 @@ { "name": "warthog", - "version": "0.0.0-development", + "version": "0.0.0", "description": "Opinionated set of tools for setting up GraphQL backed by TypeORM", - "main": "dist/index.js", - "types": "dist/types/index.d.ts", - "bin": { - "warthog": "bin/warthog" - }, - "files": [ - "dist", - "bin", - "LICENSE", - "README.md" + "private": true, + "workspaces": [ + "packages/*" ], "author": { "name": "Dan Caddigan", "url": "https://github.com/goldcaddy77" }, "scripts": { - "build": "rm -rf ./dist && yarn tsc && copyfiles -u 1 src/**/*.ejs dist/", + "build": "lerna run build", "bootstrap": "./tools/bootstrap-all.sh", "check:code": "tsc --noEmit && yarn lint && yarn prettify", "deploy:debug": "npm_config_loglevel=verbose CIRCLE_BRANCH=beta CIRCLECI=true CI=true yarn semantic-release --debug", - "lint": "eslint './+(examples|src|test|tools)/**/*.{js,ts}' --fix", + "lint": "eslint './+(examples|packages|tools)/**/*.{js,ts}' --fix", "//prettier": "Note: ignores node_modules by default and 'generated' folder via .prettierignore", - "prettify": "yarn prettier './+(examples|src|test|tools)/**/*.ts' --write", + "prettify": "yarn prettier './+(examples|packages|tools)/**/*.ts' --write", "semantic-release": "semantic-release", - "test": "jest --verbose --coverage --runInBand", + "test": "lerna run test", "//verbose": "--verbose flag must be used to accurately test the CLI writing to stdout", - "test:prod": "yarn jest --coverage --ci --detectOpenHandles --runInBand --verbose", - "test:watch": "jest --verbose --watch" + "test:prod": "lerna run test:prod", + "test:watch": "lerna run test:watch" }, "husky": { "hooks": { @@ -51,140 +44,19 @@ }, "homepage": "https://github.com/goldcaddy77/warthog#readme", "//": "TODO: figure out which of these are dependencies, devDeps or peerDeps", - "dependencies": { - "@types/app-root-path": "^1.2.4", - "@types/caller": "^1.0.0", - "@types/cosmiconfig": "^5.0.3", - "@types/debug": "^0.0.31", - "@types/dotenv": "^6.1.1", - "@types/express": "^4.16.0", - "@types/graphql": "^14.1.1", - "@types/graphql-fields": "^1.3.0", - "@types/graphql-iso-date": "^3.3.1", - "@types/graphql-type-json": "^0.1.3", - "@types/isomorphic-fetch": "^0.0.34", - "@types/lodash": "^4.14.119", - "@types/mkdirp": "^0.5.2", - "@types/node": "^10.12.18", - "@types/node-emoji": "^1.8.0", - "@types/open": "^6.1.0", - "@types/pg": "^7.4.11", - "@types/prettier": "^1.15.2", - "@types/shortid": "^0.0.29", - "@types/ws": "^6.0.1", - "apollo-link-error": "^1.1.5", - "apollo-link-http": "^1.5.9", - "apollo-server": "^2.6.3", - "apollo-server-express": "^2.6.3", - "app-root-path": "^2.1.0", - "caller": "^1.0.1", - "class-transformer": "^0.2.0", - "class-validator": "^0.9.1", - "cosmiconfig": "^5.2.1", - "cross-fetch": "^3.0.0", - "dataloader": "^1.4.0", - "debug": "^4.1.1", - "express": "^4.16.4", - "gluegun": "^3.3.1", - "graphql": "^14.1.1", - "graphql-binding": "^2.5.1", - "graphql-fields": "^2.0.3", - "graphql-iso-date": "^3.6.1", - "graphql-tools": "^4.0.3", - "graphql-type-json": "^0.3.0", - "lodash": "^4.17.13", - "mkdirp": "^0.5.1", - "node-emoji": "^1.8.1", - "open": "^6.3.0", - "pg": "^7.7.1", - "pgtools": "^0.3.0", - "prettier": "^1.18.2", - "reflect-metadata": "^0.1.12", - "shortid": "^2.2.14", - "sqlite3": "^4.0.6", - "type-graphql": "^0.17.4", - "typedi": "^0.8.0", - "typeorm": "^0.2.18", - "typeorm-typedi-extensions": "^0.2.3", - "typescript": "^3.7.2" - }, "devDependencies": { - "@types/express": "^4.16.0", - "@types/faker": "^4.1.5", - "@types/jest": "^24.0.15", - "@types/supertest": "^2.0.8", "@typescript-eslint/eslint-plugin": "^2.2.0", "@typescript-eslint/parser": "^2.2.0", - "copyfiles": "^2.1.1", - "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^5.0.0", "eslint-plugin-prettier": "^3.1.0", - "faker": "^4.1.0", "husky": "^1.3.1", - "jest": "^24.8.0", + "lerna": "^3.20.1", "lint-staged": "^8.1.0", "markdownlint-cli": "^0.19.0", + "prettier": "~1.18.2", "semantic-release": "^16.0.0-beta.31", - "supertest": "^4.0.2", - "ts-jest": "^24.0.2", - "ts-node": "^7.0.1" - }, - "lint-staged": { - "linters": { - "*.ts": [ - "eslint --fix", - "prettier --write", - "git add" - ], - "*.{js,json}": [ - "prettier --write", - "git add" - ], - "*.md": [ - "markdownlint" - ] - }, - "ignore": [ - "**/generated/*" - ] - }, - "prettier": { - "printWidth": 100, - "singleQuote": true - }, - "jest": { - "setupFilesAfterEnv": [ - "./src/test/setupFilesAfterEnv.ts" - ], - "transform": { - ".ts": "ts-jest" - }, - "testRegex": "\\.test\\.ts$", - "moduleFileExtensions": [ - "ts", - "js" - ], - "modulePathIgnorePatterns": [ - "/examples/" - ], - "watchPathIgnorePatterns": [ - "tmp/", - "/generated/*" - ], - "collectCoverageFrom": [ - "src/**/*.ts" - ], - "coveragePathIgnorePatterns": [ - "/node_modules/", - "src/test/*", - "\\.test\\.ts$" - ], - "globals": { - "ts-jest": { - "tsConfig": "tsconfig.test.json" - } - } + "typescript": "^3.7.2" }, "resolutions": { "//": "Fixes security vulnerability", diff --git a/packages/cli/LICENSE b/packages/cli/LICENSE new file mode 100644 index 00000000..5c84ed6b --- /dev/null +++ b/packages/cli/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Dan Caddigan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/cli/README.md b/packages/cli/README.md similarity index 66% rename from src/cli/README.md rename to packages/cli/README.md index 141f7231..8981f892 100644 --- a/src/cli/README.md +++ b/packages/cli/README.md @@ -1,4 +1,4 @@ -# Run the following commands +## Run the following commands ```bash warthog g --name FeatureFlag diff --git a/bin/warthog b/packages/cli/bin/warthog similarity index 83% rename from bin/warthog rename to packages/cli/bin/warthog index 10078a6a..166bfe32 100755 --- a/bin/warthog +++ b/packages/cli/bin/warthog @@ -2,7 +2,7 @@ const path = require('path'); // eslint-disable-line @typescript-eslint/no-var-requires // check if we're running in dev mode -var devMode = require('fs').existsSync(`${__dirname}/../src/cli`); +var devMode = require('fs').existsSync(`${__dirname}/../src/cli.ts`); // or want to "force" running the compiled version with --compiled-build var wantsCompiled = process.argv.indexOf('--compiled-build') >= 0; @@ -13,7 +13,7 @@ if (wantsCompiled || !devMode) { } catch (e) {} // this runs from the compiled javascript source - require(`${__dirname}/../dist/cli/cli`).run(process.argv); + require(`${__dirname}/../dist/cli`).run(process.argv); } else { try { require.resolve('ts-node'); @@ -26,5 +26,5 @@ if (wantsCompiled || !devMode) { // hook into ts-node so we can run typescript on the fly require('ts-node').register({ project: path.join(process.cwd(), 'tsconfig.json') }); // run the CLI with the current process arguments - require(`${__dirname}/../src/cli/cli`).run(process.argv); + require(`${__dirname}/../src/cli`).run(process.argv); } diff --git a/packages/cli/jest.config.js b/packages/cli/jest.config.js new file mode 100644 index 00000000..0a212654 --- /dev/null +++ b/packages/cli/jest.config.js @@ -0,0 +1,18 @@ +module.exports = { + setupFilesAfterEnv: ['/src/test/setupFilesAfterEnv.ts'], + transform: { + '.ts': 'ts-jest' + }, + testRegex: '\\.test\\.ts$', + moduleFileExtensions: ['ts', 'js'], + modulePathIgnorePatterns: ['/examples/'], + watchPathIgnorePatterns: ['tmp/', '/generated/*'], + coverageDirectory: '/coverage/', + collectCoverageFrom: ['/src/**/*.ts'], + coveragePathIgnorePatterns: ['/node_modules/', 'src/test/*', '\\.test\\.ts$'], + globals: { + 'ts-jest': { + tsConfig: 'tsconfig.test.json' + } + } +}; diff --git a/packages/cli/package.json b/packages/cli/package.json new file mode 100644 index 00000000..0b0e7223 --- /dev/null +++ b/packages/cli/package.json @@ -0,0 +1,70 @@ +{ + "name": "@warthog/cli", + "version": "0.0.0", + "description": "Warthog CLI", + "main": "dist/cli.js", + "types": "dist/types/cli.d.ts", + "bin": { + "warthog": "bin/warthog" + }, + "files": [ + "bin", + "dist", + "LICENSE", + "README.md" + ], + "author": { + "name": "Dan Caddigan", + "url": "https://github.com/goldcaddy77" + }, + "homepage": "https://github.com/goldcaddy77/warthog/tree/master/packages/cli#readme", + "repository": { + "type": "git", + "url": "https://github.com/goldcaddy77/warthog.git" + }, + "keywords": [ + "graphql", + "typeorm", + "typescript" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/goldcaddy77/warthog/issues" + }, + "dependencies": { + "@warthog/core": "^0.0.0", + "cosmiconfig": "^5.2.1", + "prettier": "~1.18.2", + "gluegun": "^3.3.1", + "graphql": "^14.1.1", + "open": "^6.3.0", + "pgtools": "^0.3.0", + "reflect-metadata": "^0.1.12", + "ts-node": "^7.0.1", + "typescript": "^3.7.2" + }, + "devDependencies": { + "@types/cosmiconfig": "^5.0.3", + "@types/faker": "^4.1.5", + "@types/isomorphic-fetch": "^0.0.34", + "@types/graphql": "^14.1.1", + "@types/jest": "^24.0.15", + "@types/prettier": "^1.15.2", + "@types/supertest": "^2.0.8", + "copyfiles": "^2.1.1", + "jest": "^24.8.0", + "supertest": "^4.0.2", + "type-graphql": "^0.17.4", + "typedi": "^0.8.0", + "typeorm": "^0.2.18", + "typeorm-typedi-extensions": "^0.2.3", + "ts-jest": "^24.0.2" + }, + "scripts": { + "build": "rm -rf ./dist && tsc -p tsconfig.build.json && copyfiles -u 1 src/**/*.ejs dist/", + "test": "jest --verbose --coverage --runInBand", + "//verbose": "--verbose flag must be used to accurately test the CLI writing to stdout", + "test:prod": "yarn jest --coverage --ci --detectOpenHandles --runInBand --verbose", + "test:watch": "jest --verbose --watch" + } +} diff --git a/src/cli/cli.ts b/packages/cli/src/cli.ts similarity index 100% rename from src/cli/cli.ts rename to packages/cli/src/cli.ts diff --git a/src/cli/commands/codegen.ts b/packages/cli/src/commands/codegen.ts similarity index 85% rename from src/cli/commands/codegen.ts rename to packages/cli/src/commands/codegen.ts index b68aab56..f02bf401 100644 --- a/src/cli/commands/codegen.ts +++ b/packages/cli/src/commands/codegen.ts @@ -1,6 +1,4 @@ -import { logger } from '../../core'; -import { CodeGenerator } from '../../core/code-generator'; -import { cleanUpTestData } from '../../db'; +import { logger, CodeGenerator, cleanUpTestData } from '@warthog/core'; import { WarthogGluegunToolbox } from '../types'; diff --git a/src/cli/commands/dbCreate.ts b/packages/cli/src/commands/dbCreate.ts similarity index 100% rename from src/cli/commands/dbCreate.ts rename to packages/cli/src/commands/dbCreate.ts diff --git a/src/cli/commands/dbDrop.ts b/packages/cli/src/commands/dbDrop.ts similarity index 100% rename from src/cli/commands/dbDrop.ts rename to packages/cli/src/commands/dbDrop.ts diff --git a/src/cli/commands/generate.ts b/packages/cli/src/commands/generate.ts similarity index 97% rename from src/cli/commands/generate.ts rename to packages/cli/src/commands/generate.ts index c7b1c65d..b6d9d51b 100644 --- a/src/cli/commands/generate.ts +++ b/packages/cli/src/commands/generate.ts @@ -46,8 +46,8 @@ export default { let warthogPathInSourceFiles; // If we're generating inside of an external project, we'll just import from 'warthog' - if (warthogPathInGeneratedFolder === 'warthog') { - warthogPathInSourceFiles = 'warthog'; + if (warthogPathInGeneratedFolder === '@warthog/core') { + warthogPathInSourceFiles = '@warthog/core'; } else { // This ensures we use a relative path in the `examples` folders within the warthog repo const warthogAbsolutePath = path.join(generatedPath, warthogPathInGeneratedFolder); diff --git a/src/cli/commands/migrate.ts b/packages/cli/src/commands/migrate.ts similarity index 100% rename from src/cli/commands/migrate.ts rename to packages/cli/src/commands/migrate.ts diff --git a/src/cli/commands/migrationGenerate.ts b/packages/cli/src/commands/migrationGenerate.ts similarity index 100% rename from src/cli/commands/migrationGenerate.ts rename to packages/cli/src/commands/migrationGenerate.ts diff --git a/src/cli/commands/new.ts b/packages/cli/src/commands/new.ts similarity index 98% rename from src/cli/commands/new.ts rename to packages/cli/src/commands/new.ts index 9abe118f..0f91df4c 100644 --- a/src/cli/commands/new.ts +++ b/packages/cli/src/commands/new.ts @@ -15,7 +15,7 @@ export default { parameters: { first } } = toolbox; - let name = first; + let name: string = first || ''; if (!name) { const { n } = await toolbox.prompt.ask([ { type: 'input', name: 'n', message: 'What do you want your project to be called?' } diff --git a/src/cli/commands/playground.ts b/packages/cli/src/commands/playground.ts similarity index 100% rename from src/cli/commands/playground.ts rename to packages/cli/src/commands/playground.ts diff --git a/src/cli/commands/warthog.ts b/packages/cli/src/commands/warthog.ts similarity index 100% rename from src/cli/commands/warthog.ts rename to packages/cli/src/commands/warthog.ts diff --git a/src/cli/docs/commands.md b/packages/cli/src/docs/commands.md similarity index 54% rename from src/cli/docs/commands.md rename to packages/cli/src/docs/commands.md index 632d9aa0..6b226dad 100644 --- a/src/cli/docs/commands.md +++ b/packages/cli/src/docs/commands.md @@ -1,3 +1,3 @@ -# Command Reference for warthog +## Command Reference for warthog TODO: Add your command reference here diff --git a/src/cli/docs/plugins.md b/packages/cli/src/docs/plugins.md similarity index 70% rename from src/cli/docs/plugins.md rename to packages/cli/src/docs/plugins.md index 7932dd02..1a022abc 100644 --- a/src/cli/docs/plugins.md +++ b/packages/cli/src/docs/plugins.md @@ -1,4 +1,4 @@ -# Plugin guide for warthog +## Plugin guide for warthog Plugins allow you to add features to warthog, such as commands and extensions to the `toolbox` object that provides the majority of the functionality @@ -6,9 +6,9 @@ used by warthog. Creating a warthog plugin is easy. Just create a repo with two folders: -``` -commands/ -extensions/ +```bash +├── commands/ +└── extensions/ ``` A command is a file that looks something like this: @@ -17,13 +17,13 @@ A command is a file that looks something like this: // commands/foo.js module.exports = { - run: (toolbox) => { - const { print, filesystem } = toolbox + run: toolbox => { + const { print, filesystem } = toolbox; - const desktopDirectories = filesystem.subdirectories(`~/Desktop`) - print.info(desktopDirectories) + const desktopDirectories = filesystem.subdirectories(`~/Desktop`); + print.info(desktopDirectories); } -} +}; ``` An extension lets you add additional features to the `toolbox`. @@ -31,16 +31,18 @@ An extension lets you add additional features to the `toolbox`. ```js // extensions/bar-extension.js -module.exports = (toolbox) => { - const { print } = toolbox +module.exports = toolbox => { + const { print } = toolbox; - toolbox.bar = () => { print.info('Bar!') } -} + toolbox.bar = () => { + print.info('Bar!'); + }; +}; ``` This is then accessible in your plugin's commands as `toolbox.bar`. -# Loading a plugin +## Loading a plugin To load a particular plugin (which has to start with `warthog-*`), install it to your project using `npm install --save-dev warthog-PLUGINNAME`, diff --git a/src/cli/extensions/config-extension.ts b/packages/cli/src/extensions/config-extension.ts similarity index 83% rename from src/cli/extensions/config-extension.ts rename to packages/cli/src/extensions/config-extension.ts index aa4b48ac..59b4cc0d 100644 --- a/src/cli/extensions/config-extension.ts +++ b/packages/cli/src/extensions/config-extension.ts @@ -1,4 +1,4 @@ -import { Config } from '../../'; +import { Config } from '@warthog/core'; import { WarthogGluegunToolbox } from '../types'; diff --git a/src/cli/extensions/db-extension.ts b/packages/cli/src/extensions/db-extension.ts similarity index 98% rename from src/cli/extensions/db-extension.ts rename to packages/cli/src/extensions/db-extension.ts index 4824f3b6..d6544e67 100644 --- a/src/cli/extensions/db-extension.ts +++ b/packages/cli/src/extensions/db-extension.ts @@ -34,7 +34,7 @@ module.exports = (toolbox: GluegunToolbox) => { await createDb(getPgConfig(config), database); } catch (e) { if (e.message.indexOf('duplicate') > -1) { - return error(`Error: Database '${database}' already exists`); + return info(`Database '${database}' already exists`); } else if (e.message) { return error(e.message); } diff --git a/src/cli/extensions/string-extension.ts b/packages/cli/src/extensions/string-extension.ts similarity index 100% rename from src/cli/extensions/string-extension.ts rename to packages/cli/src/extensions/string-extension.ts diff --git a/src/cli/templates/generate/model.ts.ejs b/packages/cli/src/templates/generate/model.ts.ejs similarity index 100% rename from src/cli/templates/generate/model.ts.ejs rename to packages/cli/src/templates/generate/model.ts.ejs diff --git a/src/cli/templates/generate/resolver.ts.ejs b/packages/cli/src/templates/generate/resolver.ts.ejs similarity index 100% rename from src/cli/templates/generate/resolver.ts.ejs rename to packages/cli/src/templates/generate/resolver.ts.ejs diff --git a/src/cli/templates/generate/service.ts.ejs b/packages/cli/src/templates/generate/service.ts.ejs similarity index 100% rename from src/cli/templates/generate/service.ts.ejs rename to packages/cli/src/templates/generate/service.ts.ejs diff --git a/src/cli/templates/new/_env.ejs b/packages/cli/src/templates/new/_env.ejs similarity index 100% rename from src/cli/templates/new/_env.ejs rename to packages/cli/src/templates/new/_env.ejs diff --git a/src/cli/templates/new/_gitignore b/packages/cli/src/templates/new/_gitignore similarity index 100% rename from src/cli/templates/new/_gitignore rename to packages/cli/src/templates/new/_gitignore diff --git a/src/cli/templates/new/package.json.ejs b/packages/cli/src/templates/new/package.json.ejs similarity index 100% rename from src/cli/templates/new/package.json.ejs rename to packages/cli/src/templates/new/package.json.ejs diff --git a/src/cli/templates/new/src/config.ts.ejs b/packages/cli/src/templates/new/src/config.ts.ejs similarity index 100% rename from src/cli/templates/new/src/config.ts.ejs rename to packages/cli/src/templates/new/src/config.ts.ejs diff --git a/src/cli/templates/new/src/index.ts.ejs b/packages/cli/src/templates/new/src/index.ts.ejs similarity index 100% rename from src/cli/templates/new/src/index.ts.ejs rename to packages/cli/src/templates/new/src/index.ts.ejs diff --git a/src/cli/templates/new/src/logger.ts.ejs b/packages/cli/src/templates/new/src/logger.ts.ejs similarity index 94% rename from src/cli/templates/new/src/logger.ts.ejs rename to packages/cli/src/templates/new/src/logger.ts.ejs index ed150511..6d3bace5 100644 --- a/src/cli/templates/new/src/logger.ts.ejs +++ b/packages/cli/src/templates/new/src/logger.ts.ejs @@ -2,7 +2,7 @@ import * as util from 'util'; -import { getBindingError } from 'warthog'; +import { getBindingError } from '@warthog/core'; export class Logger { static info(...args: any[]) { diff --git a/src/cli/templates/new/src/server.ts.ejs b/packages/cli/src/templates/new/src/server.ts.ejs similarity index 87% rename from src/cli/templates/new/src/server.ts.ejs rename to packages/cli/src/templates/new/src/server.ts.ejs index 59b80dfe..99adbeb7 100644 --- a/src/cli/templates/new/src/server.ts.ejs +++ b/packages/cli/src/templates/new/src/server.ts.ejs @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import { BaseContext, Server } from 'warthog'; +import { BaseContext, Server } from '@warthog/server-express'; import { Logger } from './logger'; @@ -8,7 +8,7 @@ interface Context extends BaseContext { user: { email: string; id: string; - permissions: string; + permissions: string[]; }; } diff --git a/src/cli/templates/new/tsconfig.json.ejs b/packages/cli/src/templates/new/tsconfig.json.ejs similarity index 100% rename from src/cli/templates/new/tsconfig.json.ejs rename to packages/cli/src/templates/new/tsconfig.json.ejs diff --git a/src/cli/templates/new/warthog.config.js.ejs b/packages/cli/src/templates/new/warthog.config.js.ejs similarity index 100% rename from src/cli/templates/new/warthog.config.js.ejs rename to packages/cli/src/templates/new/warthog.config.js.ejs diff --git a/src/test/functional/cli.test.ts b/packages/cli/src/test/functional/cli.test.ts similarity index 97% rename from src/test/functional/cli.test.ts rename to packages/cli/src/test/functional/cli.test.ts index 18289f65..46292625 100644 --- a/src/test/functional/cli.test.ts +++ b/packages/cli/src/test/functional/cli.test.ts @@ -5,11 +5,10 @@ import { system, filesystem } from 'gluegun'; // @ts-ignore import * as pgtools from 'pgtools'; -import { cleanUpTestData } from '../../db'; +import { cleanUpTestData } from '@warthog/core'; import { callWarthogCLI, spyOnStd } from '../helpers'; import { setTestServerEnvironmentVariables } from '../server-vars'; -import { getTestServer } from '../test-server'; const root = filesystem.path(__dirname, '../../../'); @@ -55,7 +54,7 @@ describe('cli functional tests', () => { ); // TODO: should we bother with this since we don't update the version in package.json? - expect(output).toContain('0.0.0-development'); + expect(output).toContain('0.0.0'); // This makes sure we're actually getting the version command and not the standard "help" command, which also includes the version expect(output).not.toContain('help'); done(); @@ -233,10 +232,6 @@ describe('cli functional tests', () => { WARTHOG_DB_CONNECTION: 'sqlite' }); - const server = getTestServer({ mockDBConnection: false }); - await server.start(); - await server.stop(); - await callWarthogCLI('db:migrate:generate'); stdout = spy.getStdOutErr(); expect(stdout).toContain('"name" option is required'); @@ -257,6 +252,7 @@ describe('cli functional tests', () => { expect(migrationContents).toContain('CREATE TABLE "dishs"'); expect(migrationContents).toContain('DROP TABLE "dishs"'); expect(migrationContents).toContain('DROP TABLE "kitchen_sinks"'); + done(); }); diff --git a/packages/cli/src/test/generated/binding.ts b/packages/cli/src/test/generated/binding.ts new file mode 100644 index 00000000..5111d0d5 --- /dev/null +++ b/packages/cli/src/test/generated/binding.ts @@ -0,0 +1,407 @@ +import { makeBindingClass, Options } from 'graphql-binding' +import { GraphQLResolveInfo, GraphQLSchema } from 'graphql' +import { IResolvers } from 'graphql-tools/dist/Interfaces' +import * as schema from './schema.graphql' + +export interface Query { + dishes: >(args: { offset?: Int | null, limit?: Int | null, where?: DishWhereInput | null, orderBy?: DishOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + dish: (args: { where: DishWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + kitchenSinks: >(args: { offset?: Int | null, limit?: Int | null, where?: KitchenSinkWhereInput | null, orderBy?: KitchenSinkOrderByInput | null }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + kitchenSink: (args: { where: KitchenSinkWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise + } + +export interface Mutation { + createDish: (args: { data: DishCreateInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + updateDish: (args: { data: DishUpdateInput, where: DishWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + createManyDishs: >(args: { data: Array }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + deleteDish: (args: { where: DishWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + createKitchenSink: (args: { data: KitchenSinkCreateInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + createManyKitchenSinks: >(args: { data: Array }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + updateKitchenSink: (args: { data: KitchenSinkUpdateInput, where: KitchenSinkWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise , + deleteKitchenSink: (args: { where: KitchenSinkWhereUniqueInput }, info?: GraphQLResolveInfo | string, options?: Options) => Promise + } + +export interface Subscription {} + +export interface Binding { + query: Query + mutation: Mutation + subscription: Subscription + request: (query: string, variables?: {[key: string]: any}) => Promise + delegate(operation: 'query' | 'mutation', fieldName: string, args: { + [key: string]: any; + }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise; + delegateSubscription(fieldName: string, args?: { + [key: string]: any; + }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise>; + getAbstractResolvers(filterSchema?: GraphQLSchema | string): IResolvers; +} + +export interface BindingConstructor { + new(...args: any[]): T +} + +export const Binding = makeBindingClass>({ schema }) + +/** + * Types +*/ + +export type DishOrderByInput = 'createdAt_ASC' | + 'createdAt_DESC' | + 'updatedAt_ASC' | + 'updatedAt_DESC' | + 'deletedAt_ASC' | + 'deletedAt_DESC' | + 'name_ASC' | + 'name_DESC' | + 'kitchenSinkId_ASC' | + 'kitchenSinkId_DESC' + +export type KitchenSinkOrderByInput = 'createdAt_ASC' | + 'createdAt_DESC' | + 'updatedAt_ASC' | + 'updatedAt_DESC' | + 'deletedAt_ASC' | + 'deletedAt_DESC' | + 'stringField_ASC' | + 'stringField_DESC' | + 'nullableStringField_ASC' | + 'nullableStringField_DESC' | + 'dateField_ASC' | + 'dateField_DESC' | + 'emailField_ASC' | + 'emailField_DESC' | + 'integerField_ASC' | + 'integerField_DESC' | + 'booleanField_ASC' | + 'booleanField_DESC' | + 'floatField_ASC' | + 'floatField_DESC' | + 'numericField_ASC' | + 'numericField_DESC' | + 'numericFieldCustomPrecisionScale_ASC' | + 'numericFieldCustomPrecisionScale_DESC' | + 'noFilterField_ASC' | + 'noFilterField_DESC' | + 'characterField_ASC' | + 'characterField_DESC' + +export interface BaseWhereInput { + id_eq?: String | null + id_in?: String[] | String | null + createdAt_eq?: String | null + createdAt_lt?: String | null + createdAt_lte?: String | null + createdAt_gt?: String | null + createdAt_gte?: String | null + createdById_eq?: String | null + updatedAt_eq?: String | null + updatedAt_lt?: String | null + updatedAt_lte?: String | null + updatedAt_gt?: String | null + updatedAt_gte?: String | null + updatedById_eq?: String | null + deletedAt_all?: Boolean | null + deletedAt_eq?: String | null + deletedAt_lt?: String | null + deletedAt_lte?: String | null + deletedAt_gt?: String | null + deletedAt_gte?: String | null + deletedById_eq?: String | null +} + +export interface DishCreateInput { + name: String + kitchenSinkId: ID_Output +} + +export interface DishUpdateInput { + name?: String | null + kitchenSinkId?: ID_Input | null +} + +export interface DishWhereInput { + id_eq?: String | null + id_in?: String[] | String | null + createdAt_eq?: String | null + createdAt_lt?: String | null + createdAt_lte?: String | null + createdAt_gt?: String | null + createdAt_gte?: String | null + createdById_eq?: String | null + updatedAt_eq?: String | null + updatedAt_lt?: String | null + updatedAt_lte?: String | null + updatedAt_gt?: String | null + updatedAt_gte?: String | null + updatedById_eq?: String | null + deletedAt_all?: Boolean | null + deletedAt_eq?: String | null + deletedAt_lt?: String | null + deletedAt_lte?: String | null + deletedAt_gt?: String | null + deletedAt_gte?: String | null + deletedById_eq?: String | null + name_eq?: String | null + name_contains?: String | null + name_startsWith?: String | null + name_endsWith?: String | null + name_in?: String[] | String | null + kitchenSinkId_eq?: ID_Input | null + kitchenSinkId_in?: ID_Output[] | ID_Output | null +} + +export interface DishWhereUniqueInput { + id: String +} + +export interface KitchenSinkCreateInput { + stringField: String + nullableStringField?: String | null + dateField?: DateTime | null + emailField: String + integerField: Float + booleanField: Boolean + floatField: Float + jsonField?: JSONObject | null + numericField?: Float | null + numericFieldCustomPrecisionScale?: Float | null + noFilterField?: String | null + noSortField?: String | null + noFilterOrSortField?: String | null + characterField?: String | null + customTextFieldNoSortOrFilter?: String | null +} + +export interface KitchenSinkUpdateInput { + stringField?: String | null + nullableStringField?: String | null + dateField?: DateTime | null + emailField?: String | null + integerField?: Float | null + booleanField?: Boolean | null + floatField?: Float | null + jsonField?: JSONObject | null + numericField?: Float | null + numericFieldCustomPrecisionScale?: Float | null + noFilterField?: String | null + noSortField?: String | null + noFilterOrSortField?: String | null + characterField?: String | null + customTextFieldNoSortOrFilter?: String | null +} + +export interface KitchenSinkWhereInput { + id_eq?: String | null + id_in?: String[] | String | null + createdAt_eq?: String | null + createdAt_lt?: String | null + createdAt_lte?: String | null + createdAt_gt?: String | null + createdAt_gte?: String | null + createdById_eq?: String | null + updatedAt_eq?: String | null + updatedAt_lt?: String | null + updatedAt_lte?: String | null + updatedAt_gt?: String | null + updatedAt_gte?: String | null + updatedById_eq?: String | null + deletedAt_all?: Boolean | null + deletedAt_eq?: String | null + deletedAt_lt?: String | null + deletedAt_lte?: String | null + deletedAt_gt?: String | null + deletedAt_gte?: String | null + deletedById_eq?: String | null + stringField_eq?: String | null + stringField_contains?: String | null + stringField_startsWith?: String | null + stringField_endsWith?: String | null + stringField_in?: String[] | String | null + nullableStringField_eq?: String | null + nullableStringField_contains?: String | null + nullableStringField_startsWith?: String | null + nullableStringField_endsWith?: String | null + nullableStringField_in?: String[] | String | null + dateField_eq?: DateTime | null + dateField_lt?: DateTime | null + dateField_lte?: DateTime | null + dateField_gt?: DateTime | null + dateField_gte?: DateTime | null + emailField_eq?: String | null + emailField_contains?: String | null + emailField_startsWith?: String | null + emailField_endsWith?: String | null + emailField_in?: String[] | String | null + integerField_eq?: Int | null + integerField_gt?: Int | null + integerField_gte?: Int | null + integerField_lt?: Int | null + integerField_lte?: Int | null + integerField_in?: Int[] | Int | null + booleanField_eq?: Boolean | null + booleanField_in?: Boolean[] | Boolean | null + floatField_eq?: Float | null + floatField_gt?: Float | null + floatField_gte?: Float | null + floatField_lt?: Float | null + floatField_lte?: Float | null + floatField_in?: Float[] | Float | null + numericField_eq?: Float | null + numericField_gt?: Float | null + numericField_gte?: Float | null + numericField_lt?: Float | null + numericField_lte?: Float | null + numericField_in?: Float[] | Float | null + numericFieldCustomPrecisionScale_eq?: Float | null + numericFieldCustomPrecisionScale_gt?: Float | null + numericFieldCustomPrecisionScale_gte?: Float | null + numericFieldCustomPrecisionScale_lt?: Float | null + numericFieldCustomPrecisionScale_lte?: Float | null + numericFieldCustomPrecisionScale_in?: Float[] | Float | null + noSortField_eq?: String | null + noSortField_contains?: String | null + noSortField_startsWith?: String | null + noSortField_endsWith?: String | null + noSortField_in?: String[] | String | null + characterField_eq?: String | null + characterField_contains?: String | null + characterField_startsWith?: String | null + characterField_endsWith?: String | null + characterField_in?: String[] | String | null +} + +export interface KitchenSinkWhereUniqueInput { + id?: String | null + emailField?: String | null +} + +export interface BaseGraphQLObject { + id: ID_Output + createdAt: DateTime + createdById: String + updatedAt?: DateTime | null + updatedById?: String | null + deletedAt?: DateTime | null + deletedById?: String | null + version: Int +} + +export interface DeleteResponse { + id: ID_Output +} + +export interface BaseModel extends BaseGraphQLObject { + id: ID_Output + createdAt: DateTime + createdById: String + updatedAt?: DateTime | null + updatedById?: String | null + deletedAt?: DateTime | null + deletedById?: String | null + version: Int +} + +export interface BaseModelUUID extends BaseGraphQLObject { + id: ID_Output + createdAt: DateTime + createdById: String + updatedAt?: DateTime | null + updatedById?: String | null + deletedAt?: DateTime | null + deletedById?: String | null + version: Int +} + +export interface Dish extends BaseGraphQLObject { + id: ID_Output + createdAt: DateTime + createdById: String + updatedAt?: DateTime | null + updatedById?: String | null + deletedAt?: DateTime | null + deletedById?: String | null + version: Int + name: String + kitchenSink: KitchenSink + kitchenSinkId: String +} + +export interface KitchenSink extends BaseGraphQLObject { + id: ID_Output + createdAt: DateTime + createdById: String + updatedAt?: DateTime | null + updatedById?: String | null + deletedAt?: DateTime | null + deletedById?: String | null + version: Int + stringField: String + nullableStringField?: String | null + dateField?: DateTime | null + emailField: String + integerField: Int + booleanField: Boolean + floatField: Float + jsonField?: JSONObject | null + dishes?: Array | null + numericField?: Float | null + numericFieldCustomPrecisionScale?: Float | null + noFilterField?: String | null + noSortField?: String | null + noFilterOrSortField?: String | null + characterField?: String | null + customTextFieldNoSortOrFilter?: String | null +} + +export interface StandardDeleteResponse { + id: ID_Output +} + +/* +The `Boolean` scalar type represents `true` or `false`. +*/ +export type Boolean = boolean + +/* +The javascript `Date` as string. Type represents date and time as the ISO Date string. +*/ +export type DateTime = Date | string + +/* +The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). +*/ +export type Float = number + +/* +The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. +*/ +export type ID_Input = string | number +export type ID_Output = string + +/* +The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. +*/ +export type Int = number + +/* +The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +*/ + + export type JsonValue = JsonPrimitive | JsonObject | JsonArray; + + export type JsonPrimitive = string | number | boolean | null | {}; + + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface JsonArray extends Array {} + + export type JsonObject = { [member: string]: JsonValue }; + + export type JSONObject = JsonObject; + + +/* +The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. +*/ +export type String = string \ No newline at end of file diff --git a/src/test/generated/classes.ts b/packages/cli/src/test/generated/classes.ts similarity index 99% rename from src/test/generated/classes.ts rename to packages/cli/src/test/generated/classes.ts index 35989230..3dc45e5c 100644 --- a/src/test/generated/classes.ts +++ b/packages/cli/src/test/generated/classes.ts @@ -20,7 +20,7 @@ import { registerEnumType } from "type-graphql"; const { GraphQLJSONObject } = require("graphql-type-json"); // @ts-ignore -import { BaseWhereInput, JsonObject, PaginationArgs } from "../../"; +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; // @ts-ignore import { KitchenSink } from "../modules/kitchen-sink/kitchen-sink.model"; // @ts-ignore diff --git a/src/test/examples/create-id-model/generated/index.ts b/packages/cli/src/test/generated/index.ts similarity index 100% rename from src/test/examples/create-id-model/generated/index.ts rename to packages/cli/src/test/generated/index.ts diff --git a/packages/cli/src/test/generated/ormconfig.ts b/packages/cli/src/test/generated/ormconfig.ts new file mode 100644 index 00000000..2be40eed --- /dev/null +++ b/packages/cli/src/test/generated/ormconfig.ts @@ -0,0 +1,3 @@ +import { getBaseConfig } from '@warthog/core'; + +module.exports = getBaseConfig(); \ No newline at end of file diff --git a/src/test/generated/schema.graphql b/packages/cli/src/test/generated/schema.graphql similarity index 100% rename from src/test/generated/schema.graphql rename to packages/cli/src/test/generated/schema.graphql diff --git a/src/test/helpers.ts b/packages/cli/src/test/helpers.ts similarity index 98% rename from src/test/helpers.ts rename to packages/cli/src/test/helpers.ts index 54febf0a..a8cc3c1c 100644 --- a/src/test/helpers.ts +++ b/packages/cli/src/test/helpers.ts @@ -1,4 +1,4 @@ -import { run } from '../cli/cli'; +import { run } from '../cli'; export function spyOnStd() { const spy: { diff --git a/src/test/modules/dish/dish.model.ts b/packages/cli/src/test/modules/dish/dish.model.ts similarity index 80% rename from src/test/modules/dish/dish.model.ts rename to packages/cli/src/test/modules/dish/dish.model.ts index e939e894..2a3417d6 100644 --- a/src/test/modules/dish/dish.model.ts +++ b/packages/cli/src/test/modules/dish/dish.model.ts @@ -1,4 +1,4 @@ -import { BaseModel, ManyToOne, Model, StringField } from '../../../'; +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; import { KitchenSink } from '../kitchen-sink/kitchen-sink.model'; diff --git a/src/test/modules/dish/dish.resolver.ts b/packages/cli/src/test/modules/dish/dish.resolver.ts similarity index 94% rename from src/test/modules/dish/dish.resolver.ts rename to packages/cli/src/test/modules/dish/dish.resolver.ts index d1378b10..65f65ea9 100644 --- a/src/test/modules/dish/dish.resolver.ts +++ b/packages/cli/src/test/modules/dish/dish.resolver.ts @@ -11,7 +11,9 @@ import { } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, Fields, StandardDeleteResponse, UserId } from '../../../'; +import { Fields, StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + import { DishCreateInput, DishCreateManyArgs, diff --git a/src/test/modules/dish/dish.service.ts b/packages/cli/src/test/modules/dish/dish.service.ts similarity index 89% rename from src/test/modules/dish/dish.service.ts rename to packages/cli/src/test/modules/dish/dish.service.ts index 6ccc27a9..6647651b 100644 --- a/src/test/modules/dish/dish.service.ts +++ b/packages/cli/src/test/modules/dish/dish.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../'; +import { BaseService } from '@warthog/core'; import { Dish } from './dish.model'; @Service('DishService') diff --git a/src/test/modules/index.ts b/packages/cli/src/test/modules/index.ts similarity index 100% rename from src/test/modules/index.ts rename to packages/cli/src/test/modules/index.ts diff --git a/src/test/modules/kitchen-sink/kitchen-sink.model.ts b/packages/cli/src/test/modules/kitchen-sink/kitchen-sink.model.ts similarity index 95% rename from src/test/modules/kitchen-sink/kitchen-sink.model.ts rename to packages/cli/src/test/modules/kitchen-sink/kitchen-sink.model.ts index 4992340c..a917f049 100644 --- a/src/test/modules/kitchen-sink/kitchen-sink.model.ts +++ b/packages/cli/src/test/modules/kitchen-sink/kitchen-sink.model.ts @@ -15,7 +15,7 @@ import { NumericField, StringField, JsonObject -} from '../../../'; +} from '@warthog/core'; import { Dish } from '../dish/dish.model'; @@ -52,10 +52,7 @@ export class KitchenSink extends BaseModel { @JSONField({ nullable: true }) jsonField?: JsonObject; - @OneToMany( - () => Dish, - (dish: Dish) => dish.kitchenSink - ) + @OneToMany(() => Dish, (dish: Dish) => dish.kitchenSink) dishes!: Dish[]; @Column({ nullable: true }) diff --git a/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts b/packages/cli/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts similarity index 95% rename from src/test/modules/kitchen-sink/kitchen-sink.resolver.ts rename to packages/cli/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts index 023efc16..a910a45b 100644 --- a/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts +++ b/packages/cli/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts @@ -11,7 +11,9 @@ import { } from 'type-graphql'; import { Inject } from 'typedi'; -import { BaseContext, Fields, StandardDeleteResponse, UserId } from '../../../'; +import { Fields, StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + import { KitchenSinkCreateInput, KitchenSinkCreateManyArgs, diff --git a/src/test/modules/kitchen-sink/kitchen-sink.service.ts b/packages/cli/src/test/modules/kitchen-sink/kitchen-sink.service.ts similarity index 90% rename from src/test/modules/kitchen-sink/kitchen-sink.service.ts rename to packages/cli/src/test/modules/kitchen-sink/kitchen-sink.service.ts index 0ab79e10..f455a184 100644 --- a/src/test/modules/kitchen-sink/kitchen-sink.service.ts +++ b/packages/cli/src/test/modules/kitchen-sink/kitchen-sink.service.ts @@ -2,7 +2,7 @@ import { Service } from 'typedi'; import { Repository } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; -import { BaseService } from '../../../'; +import { BaseService } from '@warthog/core'; import { KitchenSink } from './kitchen-sink.model'; diff --git a/packages/cli/src/test/server-vars.ts b/packages/cli/src/test/server-vars.ts new file mode 100644 index 00000000..f7623d11 --- /dev/null +++ b/packages/cli/src/test/server-vars.ts @@ -0,0 +1,51 @@ +import { StringMap } from '@warthog/core'; + +export function setTestServerEnvironmentVariables(overrides?: StringMap) { + clearConfig(); + + const defaultVars = getStandardEnvironmentVariables(); + Object.keys(defaultVars).forEach(key => { + process.env[key] = defaultVars[key]; + }); + + if (!overrides) { + return; + } + + Object.keys(overrides).forEach(key => { + process.env[key] = overrides[key]; + }); +} + +export function getStandardEnvironmentVariables(): StringMap { + return { + WARTHOG_APP_HOST: 'localhost', + WARTHOG_APP_PORT: '4000', + WARTHOG_APP_PROTOCOL: 'http', + WARTHOG_AUTO_GENERATE_FILES: 'true', + WARTHOG_AUTO_OPEN_PLAYGROUND: 'false', + WARTHOG_DB_CONNECTION: 'sqlite', + WARTHOG_DB_DATABASE: 'warthog-test', + WARTHOG_DB_ENTITIES: 'src/test/modules/**/*.model.ts', + WARTHOG_DB_HOST: 'localhost', + WARTHOG_DB_LOGGING: 'none', + WARTHOG_DB_MIGRATIONS_DIR: './tmp/test/migrations', + WARTHOG_DB_OVERRIDE: 'true', // Set so that we can do DB stuff outside of NODE_ENV=development + WARTHOG_DB_USERNAME: 'foo', + WARTHOG_DB_PASSWORD: '', + WARTHOG_DB_SYNCHRONIZE: 'true', + WARTHOG_GENERATED_FOLDER: './src/test/generated', + WARTHOG_RESOLVERS_PATH: './src/test/modules/**/*.resolver.ts', + WARTHOG_MODULE_IMPORT_PATH: '@warthog/core' + }; +} + +export function clearConfig() { + const WARTHOG_PREFIX = 'WARTHOG_'; + const TYPEORM_PREFIX = 'TYPEORM_'; + Object.keys(process.env).forEach(key => { + if (key.startsWith(WARTHOG_PREFIX) || key.startsWith(TYPEORM_PREFIX)) { + delete process.env[key]; + } + }); +} diff --git a/src/test/setupFilesAfterEnv.ts b/packages/cli/src/test/setupFilesAfterEnv.ts similarity index 100% rename from src/test/setupFilesAfterEnv.ts rename to packages/cli/src/test/setupFilesAfterEnv.ts diff --git a/src/test/test-server.ts b/packages/cli/src/test/test-server.ts similarity index 90% rename from src/test/test-server.ts rename to packages/cli/src/test/test-server.ts index 0eb6e501..0069a1a3 100644 --- a/src/test/test-server.ts +++ b/packages/cli/src/test/test-server.ts @@ -1,4 +1,4 @@ -import { authChecker, Server, ServerOptions } from '../'; +import { authChecker, Server, ServerOptions } from '@warthog/core'; // This spins up a mock Warthog server using the models and resolvers in the test/modules directory export function getTestServer(options: ServerOptions) { diff --git a/src/cli/types.ts b/packages/cli/src/types.ts similarity index 100% rename from src/cli/types.ts rename to packages/cli/src/types.ts diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json new file mode 100644 index 00000000..a4944fa3 --- /dev/null +++ b/packages/cli/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.build.json", + "compilerOptions": { + "outDir": "./dist", + "declarationDir": "dist/types" + }, + "include": ["src/**/*"] +} diff --git a/packages/cli/tsconfig.eslint.json b/packages/cli/tsconfig.eslint.json new file mode 100644 index 00000000..4efc5b83 --- /dev/null +++ b/packages/cli/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + // eslint complains that the example folders aren't in our tsconfig path, + // so we give eslint it's own config file + "extends": "../../tsconfig.eslint.json", + "include": ["src/**/*", "examples/**/*"], + "exclude": ["node_modules/**/*", "**/generated/*"] +} diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json new file mode 100644 index 00000000..52d43eaa --- /dev/null +++ b/packages/cli/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/tsconfig.test.json b/packages/cli/tsconfig.test.json similarity index 65% rename from tsconfig.test.json rename to packages/cli/tsconfig.test.json index a77db1fc..a3d1a2cd 100644 --- a/tsconfig.test.json +++ b/packages/cli/tsconfig.test.json @@ -3,6 +3,6 @@ "compilerOptions": { "strict": false }, - "exclude": ["node_modules", "**/node_modules/*", "examples"], + "exclude": ["node_modules", "**/node_modules/*"], "include": ["src/**/*", "test/**/*"] } diff --git a/packages/core/LICENSE b/packages/core/LICENSE new file mode 100644 index 00000000..5c84ed6b --- /dev/null +++ b/packages/core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Dan Caddigan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/core/README.md b/packages/core/README.md new file mode 100644 index 00000000..cc9cbed6 --- /dev/null +++ b/packages/core/README.md @@ -0,0 +1 @@ +## warthog core diff --git a/packages/core/jest.config.js b/packages/core/jest.config.js new file mode 100644 index 00000000..0a212654 --- /dev/null +++ b/packages/core/jest.config.js @@ -0,0 +1,18 @@ +module.exports = { + setupFilesAfterEnv: ['/src/test/setupFilesAfterEnv.ts'], + transform: { + '.ts': 'ts-jest' + }, + testRegex: '\\.test\\.ts$', + moduleFileExtensions: ['ts', 'js'], + modulePathIgnorePatterns: ['/examples/'], + watchPathIgnorePatterns: ['tmp/', '/generated/*'], + coverageDirectory: '/coverage/', + collectCoverageFrom: ['/src/**/*.ts'], + coveragePathIgnorePatterns: ['/node_modules/', 'src/test/*', '\\.test\\.ts$'], + globals: { + 'ts-jest': { + tsConfig: 'tsconfig.test.json' + } + } +}; diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 00000000..1e72a670 --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,93 @@ +{ + "name": "@warthog/core", + "version": "0.0.0", + "description": "Warthog Core", + "main": "dist/index.js", + "types": "dist/types/index.d.ts", + "files": [ + "dist", + "package.json", + "LICENSE", + "README.md" + ], + "author": { + "name": "Dan Caddigan", + "url": "https://github.com/goldcaddy77" + }, + "homepage": "https://github.com/goldcaddy77/warthog/tree/master/packages/core#readme", + "repository": { + "type": "git", + "url": "https://github.com/goldcaddy77/warthog.git" + }, + "keywords": [ + "graphql", + "typeorm", + "typescript" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/goldcaddy77/warthog/issues" + }, + "scripts": { + "build": "rm -rf ./dist && tsc -p tsconfig.build.json && copyfiles -u 1 src/**/*.ejs dist/", + "test": " jest --verbose --coverage --runInBand", + "//verbose": "--verbose flag must be used to accurately test the CLI writing to stdout", + "test:prod": "yarn jest --coverage --ci --detectOpenHandles --runInBand --verbose", + "test:watch": "jest --verbose --watch" + }, + "dependencies": { + "apollo-link-error": "^1.1.5", + "apollo-link-http": "^1.5.9", + "caller": "^1.0.1", + "class-transformer": "^0.2.0", + "class-validator": "^0.9.1", + "cosmiconfig": "^5.2.1", + "cross-fetch": "^3.0.0", + "dataloader": "^1.4.0", + "debug": "^4.1.1", + "dotenv": "^8.0.0", + "graphql": "^14.1.1", + "graphql-binding": "^2.5.1", + "graphql-fields": "^2.0.3", + "graphql-iso-date": "^3.6.1", + "graphql-tools": "^4.0.3", + "graphql-type-json": "^0.3.0", + "mkdirp": "^0.5.1", + "open": "^6.3.0", + "pg": "^7.7.1", + "pgtools": "^0.3.0", + "prettier": "~1.18.2", + "reflect-metadata": "^0.1.12", + "shortid": "^2.2.14", + "sqlite3": "^4.0.6", + "type-graphql": "^0.17.4", + "typedi": "^0.8.0", + "typeorm": "^0.2.18", + "typeorm-typedi-extensions": "^0.2.3" + }, + "devDependencies": { + "@types/cosmiconfig": "^5.0.3", + "@types/debug": "^0.0.31", + "@types/mkdirp": "^0.5.2", + "@types/dotenv": "^6.1.1", + "@types/graphql": "^14.1.1", + "@types/graphql-fields": "^1.3.0", + "@types/graphql-iso-date": "^3.3.1", + "@types/graphql-type-json": "^0.1.3", + "@types/isomorphic-fetch": "^0.0.34", + "@types/jest": "^24.0.15", + "@types/node": "^10.12.18", + "@types/open": "^6.1.0", + "@types/prettier": "^1.15.2", + "@types/pg": "^7.4.11", + "@types/shortid": "^0.0.29", + "@types/supertest": "^2.0.8", + "@types/ws": "^6.0.1", + "copyfiles": "^2.1.1", + "jest": "^24.8.0", + "supertest": "^4.0.2", + "ts-jest": "^24.0.2", + "ts-node": "^7.0.1", + "typescript": "^3.7.2" + } +} diff --git a/src/core/code-generator.ts b/packages/core/src/codegen/code-generator.ts similarity index 96% rename from src/core/code-generator.ts rename to packages/core/src/codegen/code-generator.ts index 6a7ce322..02bf62e4 100644 --- a/src/core/code-generator.ts +++ b/packages/core/src/codegen/code-generator.ts @@ -9,9 +9,10 @@ import { buildSchema } from 'type-graphql'; import * as util from 'util'; import { generateBindingFile } from '../gql'; -import { SchemaGenerator } from '../schema'; -import { authChecker, loadFromGlobArray } from '../tgql'; +import { SchemaGenerator } from './schema-generator'; +import { authChecker } from '../tgql'; import { logger } from '../core'; +import { loadFromGlobArray } from '../utils'; // Load all model files so that decorators will gather metadata for code generation import * as Debug from 'debug'; diff --git a/packages/core/src/codegen/index.ts b/packages/core/src/codegen/index.ts new file mode 100644 index 00000000..cdedde06 --- /dev/null +++ b/packages/core/src/codegen/index.ts @@ -0,0 +1,4 @@ +export * from './code-generator'; +export * from './model-to-classes'; +export * from './schema-generator'; +export * from './type-conversion'; diff --git a/src/schema/TypeORMConverter.ts b/packages/core/src/codegen/model-to-classes.ts similarity index 96% rename from src/schema/TypeORMConverter.ts rename to packages/core/src/codegen/model-to-classes.ts index 2c5ad4f6..9518e049 100644 --- a/src/schema/TypeORMConverter.ts +++ b/packages/core/src/codegen/model-to-classes.ts @@ -70,7 +70,7 @@ export function generateEnumMapImports(): string[] { return imports; } -export function entityToWhereUniqueInput(model: ModelMetadata): string { +export function modelToWhereUniqueInput(model: ModelMetadata): string { const uniques = getMetadataStorage().uniquesForModel(model); const others = getMetadataArgsStorage().uniques; const modelUniques: { [key: string]: string } = {}; @@ -134,7 +134,7 @@ export function entityToWhereUniqueInput(model: ModelMetadata): string { return template; } -export function entityToCreateInput(model: ModelMetadata): string { +export function modelToCreateInput(model: ModelMetadata): string { const idsOnCreate = (Container.get('Config') as any).get('ALLOW_OPTIONAL_ID_ON_CREATE') === 'true'; @@ -193,7 +193,7 @@ export function entityToCreateInput(model: ModelMetadata): string { `; } -export function entityToUpdateInput(model: ModelMetadata): string { +export function modelToUpdateInput(model: ModelMetadata): string { let fieldTemplates = ''; const modelColumns = getColumnsForModel(model); @@ -244,7 +244,7 @@ export function entityToUpdateInput(model: ModelMetadata): string { } // Constructs required arguments needed when doing an update -export function entityToUpdateInputArgs(model: ModelMetadata): string { +export function modelToUpdateInputArgs(model: ModelMetadata): string { return ` @ArgsType() export class ${model.name}UpdateArgs { @@ -261,7 +261,7 @@ function columnToTypes(column: ColumnMetadata) { return { graphqlType, tsType }; } -export function entityToWhereInput(model: ModelMetadata): string { +export function modelToWhereInput(model: ModelMetadata): string { let fieldTemplates = ''; const modelColumns = getColumnsForModel(model); @@ -421,7 +421,7 @@ export function entityToWhereInput(model: ModelMetadata): string { `; } -export function entityToWhereArgs(model: ModelMetadata): string { +export function modelToWhereArgs(model: ModelMetadata): string { return ` @ArgsType() export class ${model.name}WhereArgs extends PaginationArgs { @@ -436,7 +436,7 @@ export function entityToWhereArgs(model: ModelMetadata): string { // Note: it would be great to inject a single `Arg` with the [model.nameCreateInput] array arg, // but that is not allowed by TypeGraphQL -export function entityToCreateManyArgs(model: ModelMetadata): string { +export function modelToCreateManyArgs(model: ModelMetadata): string { return ` @ArgsType() export class ${model.name}CreateManyArgs { @@ -446,7 +446,7 @@ export function entityToCreateManyArgs(model: ModelMetadata): string { `; } -export function entityToOrderByEnum(model: ModelMetadata): string { +export function modelToOrderByEnum(model: ModelMetadata): string { let fieldsTemplate = ''; const modelColumns = getColumnsForModel(model); diff --git a/src/schema/SchemaGenerator.ts b/packages/core/src/codegen/schema-generator.ts similarity index 74% rename from src/schema/SchemaGenerator.ts rename to packages/core/src/codegen/schema-generator.ts index c292a87a..3e8b9ad0 100644 --- a/src/schema/SchemaGenerator.ts +++ b/packages/core/src/codegen/schema-generator.ts @@ -1,24 +1,25 @@ import * as prettier from 'prettier'; -import { Container } from 'typedi'; import { logger, Logger } from '../core/logger'; import { generateEnumMapImports, - entityToCreateInput, - entityToCreateManyArgs, - entityToOrderByEnum, - entityToUpdateInput, - entityToUpdateInputArgs, - entityToWhereArgs, - entityToWhereInput, - entityToWhereUniqueInput -} from './TypeORMConverter'; + modelToCreateInput, + modelToCreateManyArgs, + modelToOrderByEnum, + modelToUpdateInput, + modelToUpdateInputArgs, + modelToWhereArgs, + modelToWhereInput, + modelToWhereUniqueInput +} from './model-to-classes'; import { getMetadataStorage, ModelMetadata } from '../metadata'; export class SchemaGenerator { - static logger: Logger = Container.has('warthog.logger') - ? Container.get('warthog.logger') - : logger; + // TODO: @warthog fix logger + // static logger: Logger = Container.has('warthog.logger') + // ? Container.get('warthog.logger') + // : logger; + static logger: Logger = logger; static generate( // This will reference 'warthog in the deployed module, but we need to do a relative import in the examples library @@ -53,14 +54,14 @@ export class SchemaGenerator { const model: ModelMetadata = metadata.getModel(modelName); template += ` - ${entityToOrderByEnum(model)} - ${entityToWhereInput(model)} - ${entityToWhereUniqueInput(model)} - ${entityToCreateInput(model)} - ${entityToUpdateInput(model)} - ${entityToWhereArgs(model)} - ${entityToCreateManyArgs(model)} - ${entityToUpdateInputArgs(model)} + ${modelToOrderByEnum(model)} + ${modelToWhereInput(model)} + ${modelToWhereUniqueInput(model)} + ${modelToCreateInput(model)} + ${modelToUpdateInput(model)} + ${modelToWhereArgs(model)} + ${modelToCreateManyArgs(model)} + ${modelToUpdateInputArgs(model)} `; }); diff --git a/src/schema/type-conversion.ts b/packages/core/src/codegen/type-conversion.ts similarity index 100% rename from src/schema/type-conversion.ts rename to packages/core/src/codegen/type-conversion.ts diff --git a/src/core/BaseModel.ts b/packages/core/src/core/BaseModel.ts similarity index 100% rename from src/core/BaseModel.ts rename to packages/core/src/core/BaseModel.ts diff --git a/src/core/BaseService.ts b/packages/core/src/core/BaseService.ts similarity index 100% rename from src/core/BaseService.ts rename to packages/core/src/core/BaseService.ts diff --git a/src/core/config.test.ts b/packages/core/src/core/config.test.ts similarity index 100% rename from src/core/config.test.ts rename to packages/core/src/core/config.test.ts diff --git a/src/core/config.ts b/packages/core/src/core/config.ts similarity index 99% rename from src/core/config.ts rename to packages/core/src/core/config.ts index c2974b83..c9645055 100644 --- a/src/core/config.ts +++ b/packages/core/src/core/config.ts @@ -73,7 +73,7 @@ export class Config { WARTHOG_DB_SUBSCRIBERS: ['src/subscribers/**/*.ts'], WARTHOG_DB_SUBSCRIBERS_DIR: 'src/subscribers', WARTHOG_DB_SYNCHRONIZE: 'false', - WARTHOG_MODULE_IMPORT_PATH: 'warthog', + WARTHOG_MODULE_IMPORT_PATH: '@warthog/core', // TODO: eventually we should do this path resolution when we ask for the variable with `get` WARTHOG_GENERATED_FOLDER: path.join(this.PROJECT_ROOT, 'generated'), WARTHOG_RESOLVERS_PATH: [path.join(this.PROJECT_ROOT, 'src/**/*.resolver.ts')] diff --git a/src/core/index.ts b/packages/core/src/core/index.ts similarity index 72% rename from src/core/index.ts rename to packages/core/src/core/index.ts index 6861e0d9..edd24000 100644 --- a/src/core/index.ts +++ b/packages/core/src/core/index.ts @@ -1,7 +1,5 @@ -export * from './server'; export * from './BaseModel'; +export * from './BaseService'; export * from './config'; -export * from './Context'; export * from './logger'; export * from './types'; -export * from './BaseService'; diff --git a/src/core/logger.ts b/packages/core/src/core/logger.ts similarity index 100% rename from src/core/logger.ts rename to packages/core/src/core/logger.ts diff --git a/src/core/tests/dotenv-files/.env b/packages/core/src/core/tests/dotenv-files/.env similarity index 100% rename from src/core/tests/dotenv-files/.env rename to packages/core/src/core/tests/dotenv-files/.env diff --git a/src/core/tests/dotenv-files/.env.local b/packages/core/src/core/tests/dotenv-files/.env.local similarity index 100% rename from src/core/tests/dotenv-files/.env.local rename to packages/core/src/core/tests/dotenv-files/.env.local diff --git a/src/core/tests/dotenv-files/.env.local.development b/packages/core/src/core/tests/dotenv-files/.env.local.development similarity index 100% rename from src/core/tests/dotenv-files/.env.local.development rename to packages/core/src/core/tests/dotenv-files/.env.local.development diff --git a/src/core/tests/dotenv-files/.env.local.production b/packages/core/src/core/tests/dotenv-files/.env.local.production similarity index 100% rename from src/core/tests/dotenv-files/.env.local.production rename to packages/core/src/core/tests/dotenv-files/.env.local.production diff --git a/src/core/tests/dotenv-files/dotenv.test.ts b/packages/core/src/core/tests/dotenv-files/dotenv.test.ts similarity index 100% rename from src/core/tests/dotenv-files/dotenv.test.ts rename to packages/core/src/core/tests/dotenv-files/dotenv.test.ts diff --git a/src/core/tests/invalid-config-file/.warthogrc.json b/packages/core/src/core/tests/invalid-config-file/.warthogrc.json similarity index 100% rename from src/core/tests/invalid-config-file/.warthogrc.json rename to packages/core/src/core/tests/invalid-config-file/.warthogrc.json diff --git a/src/core/tests/invalid-config-file/config.test.ts b/packages/core/src/core/tests/invalid-config-file/config.test.ts similarity index 100% rename from src/core/tests/invalid-config-file/config.test.ts rename to packages/core/src/core/tests/invalid-config-file/config.test.ts diff --git a/src/core/tests/valid-config-file/.warthogrc.json b/packages/core/src/core/tests/valid-config-file/.warthogrc.json similarity index 100% rename from src/core/tests/valid-config-file/.warthogrc.json rename to packages/core/src/core/tests/valid-config-file/.warthogrc.json diff --git a/src/core/tests/valid-config-file/config.test.ts b/packages/core/src/core/tests/valid-config-file/config.test.ts similarity index 100% rename from src/core/tests/valid-config-file/config.test.ts rename to packages/core/src/core/tests/valid-config-file/config.test.ts diff --git a/src/core/types.ts b/packages/core/src/core/types.ts similarity index 100% rename from src/core/types.ts rename to packages/core/src/core/types.ts diff --git a/src/decorators/BooleanField.ts b/packages/core/src/decorators/BooleanField.ts similarity index 100% rename from src/decorators/BooleanField.ts rename to packages/core/src/decorators/BooleanField.ts diff --git a/src/decorators/CustomField.ts b/packages/core/src/decorators/CustomField.ts similarity index 96% rename from src/decorators/CustomField.ts rename to packages/core/src/decorators/CustomField.ts index 04c9eeb6..5b768880 100644 --- a/src/decorators/CustomField.ts +++ b/packages/core/src/decorators/CustomField.ts @@ -4,7 +4,7 @@ import { Column, ColumnType } from 'typeorm'; import { ColumnOptions } from 'typeorm/decorator/options/ColumnOptions'; import { decoratorDefaults, FieldType } from '../metadata'; -import { columnTypeToGraphQLType } from '../schema'; +import { columnTypeToGraphQLType } from '../codegen'; import { composeMethodDecorators, MethodDecoratorFactory } from '../utils'; import { WarthogField } from './WarthogField'; diff --git a/src/decorators/DateField.ts b/packages/core/src/decorators/DateField.ts similarity index 100% rename from src/decorators/DateField.ts rename to packages/core/src/decorators/DateField.ts diff --git a/src/decorators/EmailField.ts b/packages/core/src/decorators/EmailField.ts similarity index 100% rename from src/decorators/EmailField.ts rename to packages/core/src/decorators/EmailField.ts diff --git a/src/decorators/EnumField.test.ts b/packages/core/src/decorators/EnumField.test.ts similarity index 96% rename from src/decorators/EnumField.test.ts rename to packages/core/src/decorators/EnumField.test.ts index f9265dc0..d4c3acae 100644 --- a/src/decorators/EnumField.test.ts +++ b/packages/core/src/decorators/EnumField.test.ts @@ -3,7 +3,7 @@ import 'reflect-metadata'; import { IntrospectionEnumType, IntrospectionSchema } from 'graphql'; import { ObjectType, Query, Resolver } from 'type-graphql'; -import { getSchemaInfo } from '../schema'; +import { getSchemaInfo } from '../utils/schema-info'; import { EnumField } from './EnumField'; diff --git a/src/decorators/EnumField.ts b/packages/core/src/decorators/EnumField.ts similarity index 100% rename from src/decorators/EnumField.ts rename to packages/core/src/decorators/EnumField.ts diff --git a/src/decorators/Fields.ts b/packages/core/src/decorators/Fields.ts similarity index 100% rename from src/decorators/Fields.ts rename to packages/core/src/decorators/Fields.ts diff --git a/src/decorators/FloatField.ts b/packages/core/src/decorators/FloatField.ts similarity index 100% rename from src/decorators/FloatField.ts rename to packages/core/src/decorators/FloatField.ts diff --git a/src/decorators/ForeignKeyField.ts b/packages/core/src/decorators/ForeignKeyField.ts similarity index 100% rename from src/decorators/ForeignKeyField.ts rename to packages/core/src/decorators/ForeignKeyField.ts diff --git a/src/decorators/IdField.ts b/packages/core/src/decorators/IdField.ts similarity index 100% rename from src/decorators/IdField.ts rename to packages/core/src/decorators/IdField.ts diff --git a/src/decorators/IntField.ts b/packages/core/src/decorators/IntField.ts similarity index 100% rename from src/decorators/IntField.ts rename to packages/core/src/decorators/IntField.ts diff --git a/src/decorators/InterfaceType.ts b/packages/core/src/decorators/InterfaceType.ts similarity index 100% rename from src/decorators/InterfaceType.ts rename to packages/core/src/decorators/InterfaceType.ts diff --git a/src/decorators/JSONField.ts b/packages/core/src/decorators/JSONField.ts similarity index 100% rename from src/decorators/JSONField.ts rename to packages/core/src/decorators/JSONField.ts diff --git a/src/decorators/ManyToMany.ts b/packages/core/src/decorators/ManyToMany.ts similarity index 100% rename from src/decorators/ManyToMany.ts rename to packages/core/src/decorators/ManyToMany.ts diff --git a/src/decorators/ManyToManyJoin.ts b/packages/core/src/decorators/ManyToManyJoin.ts similarity index 100% rename from src/decorators/ManyToManyJoin.ts rename to packages/core/src/decorators/ManyToManyJoin.ts diff --git a/src/decorators/ManyToOne.ts b/packages/core/src/decorators/ManyToOne.ts similarity index 100% rename from src/decorators/ManyToOne.ts rename to packages/core/src/decorators/ManyToOne.ts diff --git a/src/decorators/Model.ts b/packages/core/src/decorators/Model.ts similarity index 100% rename from src/decorators/Model.ts rename to packages/core/src/decorators/Model.ts diff --git a/src/decorators/NumericField.ts b/packages/core/src/decorators/NumericField.ts similarity index 100% rename from src/decorators/NumericField.ts rename to packages/core/src/decorators/NumericField.ts diff --git a/src/decorators/OneToMany.ts b/packages/core/src/decorators/OneToMany.ts similarity index 100% rename from src/decorators/OneToMany.ts rename to packages/core/src/decorators/OneToMany.ts diff --git a/src/decorators/StringField.ts b/packages/core/src/decorators/StringField.ts similarity index 100% rename from src/decorators/StringField.ts rename to packages/core/src/decorators/StringField.ts diff --git a/src/decorators/UserId.ts b/packages/core/src/decorators/UserId.ts similarity index 100% rename from src/decorators/UserId.ts rename to packages/core/src/decorators/UserId.ts diff --git a/src/decorators/WarthogField.ts b/packages/core/src/decorators/WarthogField.ts similarity index 100% rename from src/decorators/WarthogField.ts rename to packages/core/src/decorators/WarthogField.ts diff --git a/src/decorators/index.ts b/packages/core/src/decorators/index.ts similarity index 100% rename from src/decorators/index.ts rename to packages/core/src/decorators/index.ts diff --git a/src/gql/binding.ts b/packages/core/src/gql/binding.ts similarity index 100% rename from src/gql/binding.ts rename to packages/core/src/gql/binding.ts diff --git a/src/gql/index.ts b/packages/core/src/gql/index.ts similarity index 100% rename from src/gql/index.ts rename to packages/core/src/gql/index.ts diff --git a/src/index.ts b/packages/core/src/index.ts similarity index 72% rename from src/index.ts rename to packages/core/src/index.ts index f79a65a2..7bc139f7 100644 --- a/src/index.ts +++ b/packages/core/src/index.ts @@ -1,8 +1,7 @@ +export * from './codegen'; export * from './core'; export * from './decorators'; export * from './gql'; -export * from './middleware'; -export * from './schema'; export * from './tgql'; export * from './torm'; export * from './utils'; diff --git a/src/metadata/metadata-storage.ts b/packages/core/src/metadata.ts similarity index 99% rename from src/metadata/metadata-storage.ts rename to packages/core/src/metadata.ts index 346932b0..58089bba 100644 --- a/src/metadata/metadata-storage.ts +++ b/packages/core/src/metadata.ts @@ -1,5 +1,5 @@ import { GraphQLEnumType } from 'graphql'; -import { ColumnType } from '../torm'; +import { ColumnType } from './torm'; export type FieldType = | 'boolean' diff --git a/packages/core/src/test/generated/classes.ts b/packages/core/src/test/generated/classes.ts new file mode 100644 index 00000000..354ee81d --- /dev/null +++ b/packages/core/src/test/generated/classes.ts @@ -0,0 +1,23 @@ +// This file has been auto-generated by Warthog. Do not update directly as it +// will be re-written. If you need to change this file, update models or add +// new TypeGraphQL objects +// @ts-ignore +import { GraphQLDateTime as DateTime } from "graphql-iso-date"; +import { GraphQLID as ID } from "graphql"; + +// @ts-ignore +import { + ArgsType, + Field as TypeGraphQLField, + Float, + InputType as TypeGraphQLInputType, + Int +} from "type-graphql"; +// @ts-ignore +import { registerEnumType } from "type-graphql"; + +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires +const { GraphQLJSONObject } = require("graphql-type-json"); + +// @ts-ignore +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; diff --git a/src/test/generated/index.ts b/packages/core/src/test/generated/index.ts similarity index 100% rename from src/test/generated/index.ts rename to packages/core/src/test/generated/index.ts diff --git a/packages/core/src/test/generated/ormconfig.ts b/packages/core/src/test/generated/ormconfig.ts new file mode 100644 index 00000000..2be40eed --- /dev/null +++ b/packages/core/src/test/generated/ormconfig.ts @@ -0,0 +1,3 @@ +import { getBaseConfig } from '@warthog/core'; + +module.exports = getBaseConfig(); \ No newline at end of file diff --git a/src/test/server-vars.ts b/packages/core/src/test/server-vars.ts similarity index 100% rename from src/test/server-vars.ts rename to packages/core/src/test/server-vars.ts diff --git a/packages/core/src/test/setupFilesAfterEnv.ts b/packages/core/src/test/setupFilesAfterEnv.ts new file mode 100644 index 00000000..d2c9bc6e --- /dev/null +++ b/packages/core/src/test/setupFilesAfterEnv.ts @@ -0,0 +1 @@ +import 'reflect-metadata'; diff --git a/src/tgql/BaseResolver.ts b/packages/core/src/tgql/BaseResolver.ts similarity index 100% rename from src/tgql/BaseResolver.ts rename to packages/core/src/tgql/BaseResolver.ts diff --git a/src/tgql/BaseWhereInput.ts b/packages/core/src/tgql/BaseWhereInput.ts similarity index 100% rename from src/tgql/BaseWhereInput.ts rename to packages/core/src/tgql/BaseWhereInput.ts diff --git a/src/tgql/DeleteResponse.ts b/packages/core/src/tgql/DeleteResponse.ts similarity index 100% rename from src/tgql/DeleteResponse.ts rename to packages/core/src/tgql/DeleteResponse.ts diff --git a/src/tgql/PaginationArgs.ts b/packages/core/src/tgql/PaginationArgs.ts similarity index 100% rename from src/tgql/PaginationArgs.ts rename to packages/core/src/tgql/PaginationArgs.ts diff --git a/src/tgql/authChecker.ts b/packages/core/src/tgql/authChecker.ts similarity index 77% rename from src/tgql/authChecker.ts rename to packages/core/src/tgql/authChecker.ts index 680f6dde..c96e65be 100644 --- a/src/tgql/authChecker.ts +++ b/packages/core/src/tgql/authChecker.ts @@ -1,9 +1,13 @@ import { AuthChecker } from 'type-graphql'; -import { BaseContext } from '../core/Context'; +interface AuthContext { + user: { + permissions: string[]; + }; +} // This authChecker is used by type-graphql's @Authorized decorator -export const authChecker: AuthChecker = ({ context: { user } }, permissions) => { +export const authChecker: AuthChecker = ({ context: { user } }, permissions) => { if (!user) { return false; } diff --git a/src/tgql/index.ts b/packages/core/src/tgql/index.ts similarity index 85% rename from src/tgql/index.ts rename to packages/core/src/tgql/index.ts index 64541962..d53838ae 100644 --- a/src/tgql/index.ts +++ b/packages/core/src/tgql/index.ts @@ -5,4 +5,3 @@ export * from './BaseWhereInput'; export * from './DeleteResponse'; export * from './PaginationArgs'; export { StandardDeleteResponse } from './DeleteResponse'; -export { loadFromGlobArray } from './loadGlobs'; diff --git a/src/torm/EverythingSubscriber.ts.bak b/packages/core/src/torm/EverythingSubscriber.ts.bak similarity index 100% rename from src/torm/EverythingSubscriber.ts.bak rename to packages/core/src/torm/EverythingSubscriber.ts.bak diff --git a/src/torm/SnakeNamingStrategy.ts b/packages/core/src/torm/SnakeNamingStrategy.ts similarity index 100% rename from src/torm/SnakeNamingStrategy.ts rename to packages/core/src/torm/SnakeNamingStrategy.ts diff --git a/src/torm/createConnection.ts b/packages/core/src/torm/createConnection.ts similarity index 100% rename from src/torm/createConnection.ts rename to packages/core/src/torm/createConnection.ts diff --git a/src/torm/data-types.ts b/packages/core/src/torm/data-types.ts similarity index 100% rename from src/torm/data-types.ts rename to packages/core/src/torm/data-types.ts diff --git a/src/torm/index.ts b/packages/core/src/torm/index.ts similarity index 100% rename from src/torm/index.ts rename to packages/core/src/torm/index.ts diff --git a/src/torm/operators.ts b/packages/core/src/torm/operators.ts similarity index 100% rename from src/torm/operators.ts rename to packages/core/src/torm/operators.ts diff --git a/src/torm/types.ts b/packages/core/src/torm/types.ts similarity index 100% rename from src/torm/types.ts rename to packages/core/src/torm/types.ts diff --git a/src/db/helpers.ts b/packages/core/src/utils/db.helpers.ts similarity index 100% rename from src/db/helpers.ts rename to packages/core/src/utils/db.helpers.ts diff --git a/src/utils/decoratorComposer.test.ts b/packages/core/src/utils/decoratorComposer.test.ts similarity index 94% rename from src/utils/decoratorComposer.test.ts rename to packages/core/src/utils/decoratorComposer.test.ts index 0574090b..c9469df1 100644 --- a/src/utils/decoratorComposer.test.ts +++ b/packages/core/src/utils/decoratorComposer.test.ts @@ -55,13 +55,15 @@ function ComposedMethodDecorator() { } @ComposedClassDecorator() +// eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore : TODO: shouldn't need this here. Need to teach vscode how to allow experimental decorators in test files class TestClass { - constructor() {} - @ComposedMethodDecorator() + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore : TODO: shouldn't need this here - public TestMethod() {} + public TestMethod() { + // Testing method + } } describe('composeMethodDecorators', () => { diff --git a/src/utils/decoratorComposer.ts b/packages/core/src/utils/decoratorComposer.ts similarity index 100% rename from src/utils/decoratorComposer.ts rename to packages/core/src/utils/decoratorComposer.ts diff --git a/src/utils/generatedFolder.ts b/packages/core/src/utils/generatedFolder.ts similarity index 100% rename from src/utils/generatedFolder.ts rename to packages/core/src/utils/generatedFolder.ts diff --git a/src/tgql/loadGlobs.ts b/packages/core/src/utils/glob.ts similarity index 100% rename from src/tgql/loadGlobs.ts rename to packages/core/src/utils/glob.ts diff --git a/src/utils/index.ts b/packages/core/src/utils/index.ts similarity index 59% rename from src/utils/index.ts rename to packages/core/src/utils/index.ts index ab896038..9b720e5b 100644 --- a/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -1,4 +1,7 @@ +export * from './db.helpers'; export * from './decoratorComposer'; export * from './generatedFolder'; +export * from './glob'; export * from './object'; +export * from './schema-info'; export * from './string'; diff --git a/src/utils/object.test.ts b/packages/core/src/utils/object.test.ts similarity index 100% rename from src/utils/object.test.ts rename to packages/core/src/utils/object.test.ts diff --git a/src/utils/object.ts b/packages/core/src/utils/object.ts similarity index 100% rename from src/utils/object.ts rename to packages/core/src/utils/object.ts diff --git a/src/schema/getSchemaInfo.ts b/packages/core/src/utils/schema-info.ts similarity index 100% rename from src/schema/getSchemaInfo.ts rename to packages/core/src/utils/schema-info.ts diff --git a/src/utils/string.test.ts b/packages/core/src/utils/string.test.ts similarity index 100% rename from src/utils/string.test.ts rename to packages/core/src/utils/string.test.ts diff --git a/src/utils/string.ts b/packages/core/src/utils/string.ts similarity index 100% rename from src/utils/string.ts rename to packages/core/src/utils/string.ts diff --git a/packages/core/tsconfig.build.json b/packages/core/tsconfig.build.json new file mode 100644 index 00000000..a4944fa3 --- /dev/null +++ b/packages/core/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.build.json", + "compilerOptions": { + "outDir": "./dist", + "declarationDir": "dist/types" + }, + "include": ["src/**/*"] +} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 00000000..52d43eaa --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/core/tsconfig.test.json b/packages/core/tsconfig.test.json new file mode 100644 index 00000000..a3d1a2cd --- /dev/null +++ b/packages/core/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "strict": false + }, + "exclude": ["node_modules", "**/node_modules/*"], + "include": ["src/**/*", "test/**/*"] +} diff --git a/packages/server-express/LICENSE b/packages/server-express/LICENSE new file mode 100644 index 00000000..5c84ed6b --- /dev/null +++ b/packages/server-express/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Dan Caddigan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/server-express/README.md b/packages/server-express/README.md new file mode 100644 index 00000000..7f3288cc --- /dev/null +++ b/packages/server-express/README.md @@ -0,0 +1 @@ +## Warthog server express diff --git a/packages/server-express/jest.config.js b/packages/server-express/jest.config.js new file mode 100644 index 00000000..0a212654 --- /dev/null +++ b/packages/server-express/jest.config.js @@ -0,0 +1,18 @@ +module.exports = { + setupFilesAfterEnv: ['/src/test/setupFilesAfterEnv.ts'], + transform: { + '.ts': 'ts-jest' + }, + testRegex: '\\.test\\.ts$', + moduleFileExtensions: ['ts', 'js'], + modulePathIgnorePatterns: ['/examples/'], + watchPathIgnorePatterns: ['tmp/', '/generated/*'], + coverageDirectory: '/coverage/', + collectCoverageFrom: ['/src/**/*.ts'], + coveragePathIgnorePatterns: ['/node_modules/', 'src/test/*', '\\.test\\.ts$'], + globals: { + 'ts-jest': { + tsConfig: 'tsconfig.test.json' + } + } +}; diff --git a/packages/server-express/package.json b/packages/server-express/package.json new file mode 100644 index 00000000..239a130b --- /dev/null +++ b/packages/server-express/package.json @@ -0,0 +1,61 @@ +{ + "name": "@warthog/server-express", + "version": "0.0.0", + "description": "Warthog Server Express", + "main": "dist/index.js", + "types": "dist/types/index.d.ts", + "files": [ + "dist", + "package.json", + "LICENSE", + "README.md" + ], + "author": { + "name": "Dan Caddigan", + "url": "https://github.com/goldcaddy77" + }, + "homepage": "https://github.com/goldcaddy77/warthog/tree/master/packages/server-express#readme", + "repository": { + "type": "git", + "url": "https://github.com/goldcaddy77/warthog.git" + }, + "keywords": [ + "graphql", + "typeorm", + "express", + "typescript" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/goldcaddy77/warthog/issues" + }, + "scripts": { + "build": "rm -rf ./dist && tsc -p tsconfig.build.json && copyfiles -u 1 src/**/*.ejs dist/", + "test": " jest --verbose --coverage --runInBand", + "//verbose": "--verbose flag must be used to accurately test the CLI writing to stdout", + "test:prod": "yarn jest --coverage --ci --detectOpenHandles --runInBand --verbose", + "test:watch": "jest --verbose --watch" + }, + "dependencies": { + "@warthog/core": "^0.0.0", + "apollo-server": "^2.6.3", + "apollo-server-express": "^2.6.3", + "debug": "^4.1.1", + "graphql": "^14.1.1", + "graphql-binding": "^2.5.1", + "express": "^4.16.4", + "typedi": "^0.8.0", + "typeorm": "^0.2.18", + "typeorm-typedi-extensions": "^0.2.3" + }, + "devDependencies": { + "@types/debug": "^0.0.31", + "@types/express": "^4.16.0", + "copyfiles": "^2.1.1", + "jest": "^24.8.0", + "supertest": "^4.0.2", + "ts-jest": "^24.0.2", + "ts-node": "^7.0.1", + "typescript": "^3.7.2" + } +} diff --git a/src/core/Context.ts b/packages/server-express/src/context.ts similarity index 80% rename from src/core/Context.ts rename to packages/server-express/src/context.ts index 90616c1a..6583c101 100644 --- a/src/core/Context.ts +++ b/packages/server-express/src/context.ts @@ -1,7 +1,6 @@ import { Request } from 'express'; import { Connection } from 'typeorm'; -// TODO-MVP: update with actual context we're getting from Auth0 export interface BaseContext { connection: Connection; dataLoader: { diff --git a/src/core/http.ts b/packages/server-express/src/http.ts similarity index 93% rename from src/core/http.ts rename to packages/server-express/src/http.ts index 8340be84..72390a7c 100644 --- a/src/core/http.ts +++ b/packages/server-express/src/http.ts @@ -4,7 +4,7 @@ export interface GetResponse { } // Custom http `get` without dependencies -export async function get(url: string): Promise { +export function get(url: string): Promise { // return new pending promise return new Promise((resolve, reject) => { // select http or https module, depending on reqested url diff --git a/packages/server-express/src/index.ts b/packages/server-express/src/index.ts new file mode 100644 index 00000000..3c15f038 --- /dev/null +++ b/packages/server-express/src/index.ts @@ -0,0 +1,4 @@ +export * from './context'; +export * from './http'; +export * from './middleware'; +export * from './server'; diff --git a/src/middleware/DataLoaderMiddleware.ts b/packages/server-express/src/middleware/DataLoaderMiddleware.ts similarity index 97% rename from src/middleware/DataLoaderMiddleware.ts rename to packages/server-express/src/middleware/DataLoaderMiddleware.ts index 0d9b6e53..e6d3569e 100644 --- a/src/middleware/DataLoaderMiddleware.ts +++ b/packages/server-express/src/middleware/DataLoaderMiddleware.ts @@ -2,7 +2,7 @@ import DataLoader = require('dataloader'); import { MiddlewareInterface, NextFn, ResolverData } from 'type-graphql'; import { Service } from 'typedi'; -import { BaseContext } from '../core'; +import { BaseContext } from '../context'; interface Deleteable { deletedAt?: string; diff --git a/src/middleware/HealthMiddleware.ts b/packages/server-express/src/middleware/HealthMiddleware.ts similarity index 100% rename from src/middleware/HealthMiddleware.ts rename to packages/server-express/src/middleware/HealthMiddleware.ts diff --git a/src/middleware/index.ts b/packages/server-express/src/middleware/index.ts similarity index 66% rename from src/middleware/index.ts rename to packages/server-express/src/middleware/index.ts index 18b92666..e1c9df04 100644 --- a/src/middleware/index.ts +++ b/packages/server-express/src/middleware/index.ts @@ -1,3 +1,2 @@ export * from './DataLoaderMiddleware'; -// export * from './ErrorMiddleware'; export * from './HealthMiddleware'; diff --git a/src/core/server.test.ts b/packages/server-express/src/server.test.ts similarity index 93% rename from src/core/server.test.ts rename to packages/server-express/src/server.test.ts index c50c449a..dee8aa5a 100644 --- a/src/core/server.test.ts +++ b/packages/server-express/src/server.test.ts @@ -1,8 +1,8 @@ import { Server, ServerOptions } from './server'; -import { getTestServer } from '../test/test-server'; +import { getTestServer } from './test/test-server'; import express = require('express'); -import { setTestServerEnvironmentVariables } from '../test/server-vars'; +import { setTestServerEnvironmentVariables } from './test/server-vars'; describe('Server', () => { let server: Server; @@ -38,7 +38,6 @@ describe('Server', () => { server = buildServer({ expressApp: customExpressApp }); await server.start(); const binding = await server.getBinding(); - expect(binding).toBeTruthy(); expect(server.schema).toBeTruthy(); expect(appListenSpy).toHaveBeenCalledTimes(1); diff --git a/src/core/server.ts b/packages/server-express/src/server.ts similarity index 96% rename from src/core/server.ts rename to packages/server-express/src/server.ts index f88cd082..6be51858 100644 --- a/src/core/server.ts +++ b/packages/server-express/src/server.ts @@ -13,15 +13,17 @@ import { AuthChecker, buildSchema } from 'type-graphql'; // formatArgumentValida import { Container } from 'typedi'; import { Connection, ConnectionOptions, useContainer as TypeORMUseContainer } from 'typeorm'; -import { logger, Logger } from '../core/logger'; -import { getRemoteBinding } from '../gql'; -import { DataLoaderMiddleware, healthCheckMiddleware } from '../middleware'; -import { createDBConnection } from '../torm'; - -import { CodeGenerator } from './code-generator'; -import { Config } from './config'; - -import { BaseContext } from './Context'; +import { + logger, + Logger, + CodeGenerator, + Config, + getRemoteBinding, + createDBConnection +} from '@warthog/core'; + +import { BaseContext } from './context'; +import { DataLoaderMiddleware, healthCheckMiddleware } from './middleware'; import * as Debug from 'debug'; @@ -201,7 +203,6 @@ export class Server { await this.generateFiles(); } await this.buildGraphQLSchema(); - const contextGetter = this.appOptions.context || (async () => { @@ -276,7 +277,7 @@ export class Server { this.logger.info('Stopping HTTP Server'); this.httpServer.close(); this.logger.info('Closing DB Connection'); - await this.connection.close(); + if (this.connection) await this.connection.close(); } } diff --git a/src/test/functional/__snapshots__/server.test.ts.snap b/packages/server-express/src/test/functional/__snapshots__/server.test.ts.snap similarity index 100% rename from src/test/functional/__snapshots__/server.test.ts.snap rename to packages/server-express/src/test/functional/__snapshots__/server.test.ts.snap diff --git a/src/test/functional/fixtures.ts b/packages/server-express/src/test/functional/fixtures.ts similarity index 100% rename from src/test/functional/fixtures.ts rename to packages/server-express/src/test/functional/fixtures.ts diff --git a/src/test/functional/server.test.ts b/packages/server-express/src/test/functional/server.test.ts similarity index 97% rename from src/test/functional/server.test.ts rename to packages/server-express/src/test/functional/server.test.ts index b39ccd26..85cdda6f 100644 --- a/src/test/functional/server.test.ts +++ b/packages/server-express/src/test/functional/server.test.ts @@ -1,8 +1,7 @@ /* eslint-disable @typescript-eslint/camelcase */ -import { getBindingError, logger } from '../../'; -import { get, GetResponse } from '../../core/http'; -import { Server } from '../../core/server'; -import { cleanUpTestData } from '../../db'; +import { getBindingError, logger, cleanUpTestData } from '@warthog/core'; +import { get, GetResponse } from '../../http'; +import { Server } from '../../server'; import { Binding } from '../generated/binding'; import { KitchenSink } from '../modules'; @@ -460,7 +459,7 @@ async function updateKitchenSink( binding: any, data: object, where: object, - returnFields: string = '{ id, stringField, emailField, integerField, booleanField, floatField }' + returnFields = '{ id, stringField, emailField, integerField, booleanField, floatField }' ): Promise { return binding.mutation.updateKitchenSink( { diff --git a/src/test/generated/binding.ts b/packages/server-express/src/test/generated/binding.ts similarity index 100% rename from src/test/generated/binding.ts rename to packages/server-express/src/test/generated/binding.ts diff --git a/packages/server-express/src/test/generated/classes.ts b/packages/server-express/src/test/generated/classes.ts new file mode 100644 index 00000000..3dc45e5c --- /dev/null +++ b/packages/server-express/src/test/generated/classes.ts @@ -0,0 +1,588 @@ +// This file has been auto-generated by Warthog. Do not update directly as it +// will be re-written. If you need to change this file, update models or add +// new TypeGraphQL objects +// @ts-ignore +import { GraphQLDateTime as DateTime } from "graphql-iso-date"; +import { GraphQLID as ID } from "graphql"; + +// @ts-ignore +import { + ArgsType, + Field as TypeGraphQLField, + Float, + InputType as TypeGraphQLInputType, + Int +} from "type-graphql"; +// @ts-ignore +import { registerEnumType } from "type-graphql"; + +// @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires +const { GraphQLJSONObject } = require("graphql-type-json"); + +// @ts-ignore +import { BaseWhereInput, JsonObject, PaginationArgs } from "@warthog/core"; +// @ts-ignore +import { KitchenSink } from "../modules/kitchen-sink/kitchen-sink.model"; +// @ts-ignore +import { Dish } from "../modules/dish/dish.model"; + +export enum KitchenSinkOrderByEnum { + createdAt_ASC = "createdAt_ASC", + createdAt_DESC = "createdAt_DESC", + + updatedAt_ASC = "updatedAt_ASC", + updatedAt_DESC = "updatedAt_DESC", + + deletedAt_ASC = "deletedAt_ASC", + deletedAt_DESC = "deletedAt_DESC", + + stringField_ASC = "stringField_ASC", + stringField_DESC = "stringField_DESC", + + nullableStringField_ASC = "nullableStringField_ASC", + nullableStringField_DESC = "nullableStringField_DESC", + + dateField_ASC = "dateField_ASC", + dateField_DESC = "dateField_DESC", + + emailField_ASC = "emailField_ASC", + emailField_DESC = "emailField_DESC", + + integerField_ASC = "integerField_ASC", + integerField_DESC = "integerField_DESC", + + booleanField_ASC = "booleanField_ASC", + booleanField_DESC = "booleanField_DESC", + + floatField_ASC = "floatField_ASC", + floatField_DESC = "floatField_DESC", + + numericField_ASC = "numericField_ASC", + numericField_DESC = "numericField_DESC", + + numericFieldCustomPrecisionScale_ASC = "numericFieldCustomPrecisionScale_ASC", + numericFieldCustomPrecisionScale_DESC = "numericFieldCustomPrecisionScale_DESC", + + noFilterField_ASC = "noFilterField_ASC", + noFilterField_DESC = "noFilterField_DESC", + + characterField_ASC = "characterField_ASC", + characterField_DESC = "characterField_DESC" +} + +registerEnumType(KitchenSinkOrderByEnum, { + name: "KitchenSinkOrderByInput" +}); + +@TypeGraphQLInputType() +export class KitchenSinkWhereInput { + @TypeGraphQLField(() => String, { nullable: true }) + id_eq?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + id_in?: string[]; + + @TypeGraphQLField({ nullable: true }) + createdAt_eq?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_lt?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_lte?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_gt?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_gte?: String; + + @TypeGraphQLField(() => String, { nullable: true }) + createdById_eq?: string; + + @TypeGraphQLField({ nullable: true }) + updatedAt_eq?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_lt?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_lte?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_gt?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_gte?: String; + + @TypeGraphQLField(() => String, { nullable: true }) + updatedById_eq?: string; + + @TypeGraphQLField({ nullable: true }) + deletedAt_all?: Boolean; + + @TypeGraphQLField({ nullable: true }) + deletedAt_eq?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_lt?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_lte?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_gt?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_gte?: String; + + @TypeGraphQLField(() => String, { nullable: true }) + deletedById_eq?: string; + + @TypeGraphQLField({ nullable: true }) + stringField_eq?: string; + + @TypeGraphQLField({ nullable: true }) + stringField_contains?: string; + + @TypeGraphQLField({ nullable: true }) + stringField_startsWith?: string; + + @TypeGraphQLField({ nullable: true }) + stringField_endsWith?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + stringField_in?: string[]; + + @TypeGraphQLField({ nullable: true }) + nullableStringField_eq?: string; + + @TypeGraphQLField({ nullable: true }) + nullableStringField_contains?: string; + + @TypeGraphQLField({ nullable: true }) + nullableStringField_startsWith?: string; + + @TypeGraphQLField({ nullable: true }) + nullableStringField_endsWith?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + nullableStringField_in?: string[]; + + @TypeGraphQLField({ nullable: true }) + dateField_eq?: Date; + + @TypeGraphQLField({ nullable: true }) + dateField_lt?: Date; + + @TypeGraphQLField({ nullable: true }) + dateField_lte?: Date; + + @TypeGraphQLField({ nullable: true }) + dateField_gt?: Date; + + @TypeGraphQLField({ nullable: true }) + dateField_gte?: Date; + + @TypeGraphQLField({ nullable: true }) + emailField_eq?: string; + + @TypeGraphQLField({ nullable: true }) + emailField_contains?: string; + + @TypeGraphQLField({ nullable: true }) + emailField_startsWith?: string; + + @TypeGraphQLField({ nullable: true }) + emailField_endsWith?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + emailField_in?: string[]; + + @TypeGraphQLField(() => Int, { nullable: true }) + integerField_eq?: number; + + @TypeGraphQLField(() => Int, { nullable: true }) + integerField_gt?: number; + + @TypeGraphQLField(() => Int, { nullable: true }) + integerField_gte?: number; + + @TypeGraphQLField(() => Int, { nullable: true }) + integerField_lt?: number; + + @TypeGraphQLField(() => Int, { nullable: true }) + integerField_lte?: number; + + @TypeGraphQLField(() => [Int], { nullable: true }) + integerField_in?: number[]; + + @TypeGraphQLField(() => Boolean, { nullable: true }) + booleanField_eq?: Boolean; + + @TypeGraphQLField(() => [Boolean], { nullable: true }) + booleanField_in?: Boolean[]; + + @TypeGraphQLField(() => Float, { nullable: true }) + floatField_eq?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + floatField_gt?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + floatField_gte?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + floatField_lt?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + floatField_lte?: number; + + @TypeGraphQLField(() => [Float], { nullable: true }) + floatField_in?: number[]; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericField_eq?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericField_gt?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericField_gte?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericField_lt?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericField_lte?: number; + + @TypeGraphQLField(() => [Float], { nullable: true }) + numericField_in?: number[]; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericFieldCustomPrecisionScale_eq?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericFieldCustomPrecisionScale_gt?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericFieldCustomPrecisionScale_gte?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericFieldCustomPrecisionScale_lt?: number; + + @TypeGraphQLField(() => Float, { nullable: true }) + numericFieldCustomPrecisionScale_lte?: number; + + @TypeGraphQLField(() => [Float], { nullable: true }) + numericFieldCustomPrecisionScale_in?: number[]; + + @TypeGraphQLField({ nullable: true }) + noSortField_eq?: string; + + @TypeGraphQLField({ nullable: true }) + noSortField_contains?: string; + + @TypeGraphQLField({ nullable: true }) + noSortField_startsWith?: string; + + @TypeGraphQLField({ nullable: true }) + noSortField_endsWith?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + noSortField_in?: string[]; + + @TypeGraphQLField({ nullable: true }) + characterField_eq?: string; + + @TypeGraphQLField({ nullable: true }) + characterField_contains?: string; + + @TypeGraphQLField({ nullable: true }) + characterField_startsWith?: string; + + @TypeGraphQLField({ nullable: true }) + characterField_endsWith?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + characterField_in?: string[]; +} + +@TypeGraphQLInputType() +export class KitchenSinkWhereUniqueInput { + @TypeGraphQLField(() => String, { nullable: true }) + id?: string; + + @TypeGraphQLField(() => String, { nullable: true }) + emailField?: string; +} + +@TypeGraphQLInputType() +export class KitchenSinkCreateInput { + @TypeGraphQLField() + stringField!: string; + + @TypeGraphQLField({ nullable: true }) + nullableStringField?: string; + + @TypeGraphQLField({ nullable: true }) + dateField?: Date; + + @TypeGraphQLField() + emailField!: string; + + @TypeGraphQLField() + integerField!: number; + + @TypeGraphQLField() + booleanField!: boolean; + + @TypeGraphQLField() + floatField!: number; + + @TypeGraphQLField(() => GraphQLJSONObject, { nullable: true }) + jsonField?: JsonObject; + + @TypeGraphQLField({ nullable: true }) + numericField?: number; + + @TypeGraphQLField({ nullable: true }) + numericFieldCustomPrecisionScale?: number; + + @TypeGraphQLField({ nullable: true }) + noFilterField?: string; + + @TypeGraphQLField({ nullable: true }) + noSortField?: string; + + @TypeGraphQLField({ nullable: true }) + noFilterOrSortField?: string; + + @TypeGraphQLField({ nullable: true }) + characterField?: string; + + @TypeGraphQLField({ nullable: true }) + customTextFieldNoSortOrFilter?: string; +} + +@TypeGraphQLInputType() +export class KitchenSinkUpdateInput { + @TypeGraphQLField({ nullable: true }) + stringField?: string; + + @TypeGraphQLField({ nullable: true }) + nullableStringField?: string; + + @TypeGraphQLField({ nullable: true }) + dateField?: Date; + + @TypeGraphQLField({ nullable: true }) + emailField?: string; + + @TypeGraphQLField({ nullable: true }) + integerField?: number; + + @TypeGraphQLField({ nullable: true }) + booleanField?: boolean; + + @TypeGraphQLField({ nullable: true }) + floatField?: number; + + @TypeGraphQLField(() => GraphQLJSONObject, { nullable: true }) + jsonField?: JsonObject; + + @TypeGraphQLField({ nullable: true }) + numericField?: number; + + @TypeGraphQLField({ nullable: true }) + numericFieldCustomPrecisionScale?: number; + + @TypeGraphQLField({ nullable: true }) + noFilterField?: string; + + @TypeGraphQLField({ nullable: true }) + noSortField?: string; + + @TypeGraphQLField({ nullable: true }) + noFilterOrSortField?: string; + + @TypeGraphQLField({ nullable: true }) + characterField?: string; + + @TypeGraphQLField({ nullable: true }) + customTextFieldNoSortOrFilter?: string; +} + +@ArgsType() +export class KitchenSinkWhereArgs extends PaginationArgs { + @TypeGraphQLField(() => KitchenSinkWhereInput, { nullable: true }) + where?: KitchenSinkWhereInput; + + @TypeGraphQLField(() => KitchenSinkOrderByEnum, { nullable: true }) + orderBy?: KitchenSinkOrderByEnum; +} + +@ArgsType() +export class KitchenSinkCreateManyArgs { + @TypeGraphQLField(() => [KitchenSinkCreateInput]) + data!: KitchenSinkCreateInput[]; +} + +@ArgsType() +export class KitchenSinkUpdateArgs { + @TypeGraphQLField() data!: KitchenSinkUpdateInput; + @TypeGraphQLField() where!: KitchenSinkWhereUniqueInput; +} + +export enum DishOrderByEnum { + createdAt_ASC = "createdAt_ASC", + createdAt_DESC = "createdAt_DESC", + + updatedAt_ASC = "updatedAt_ASC", + updatedAt_DESC = "updatedAt_DESC", + + deletedAt_ASC = "deletedAt_ASC", + deletedAt_DESC = "deletedAt_DESC", + + name_ASC = "name_ASC", + name_DESC = "name_DESC", + + kitchenSinkId_ASC = "kitchenSinkId_ASC", + kitchenSinkId_DESC = "kitchenSinkId_DESC" +} + +registerEnumType(DishOrderByEnum, { + name: "DishOrderByInput" +}); + +@TypeGraphQLInputType() +export class DishWhereInput { + @TypeGraphQLField(() => String, { nullable: true }) + id_eq?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + id_in?: string[]; + + @TypeGraphQLField({ nullable: true }) + createdAt_eq?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_lt?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_lte?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_gt?: String; + + @TypeGraphQLField({ nullable: true }) + createdAt_gte?: String; + + @TypeGraphQLField(() => String, { nullable: true }) + createdById_eq?: string; + + @TypeGraphQLField({ nullable: true }) + updatedAt_eq?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_lt?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_lte?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_gt?: String; + + @TypeGraphQLField({ nullable: true }) + updatedAt_gte?: String; + + @TypeGraphQLField(() => String, { nullable: true }) + updatedById_eq?: string; + + @TypeGraphQLField({ nullable: true }) + deletedAt_all?: Boolean; + + @TypeGraphQLField({ nullable: true }) + deletedAt_eq?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_lt?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_lte?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_gt?: String; + + @TypeGraphQLField({ nullable: true }) + deletedAt_gte?: String; + + @TypeGraphQLField(() => String, { nullable: true }) + deletedById_eq?: string; + + @TypeGraphQLField({ nullable: true }) + name_eq?: string; + + @TypeGraphQLField({ nullable: true }) + name_contains?: string; + + @TypeGraphQLField({ nullable: true }) + name_startsWith?: string; + + @TypeGraphQLField({ nullable: true }) + name_endsWith?: string; + + @TypeGraphQLField(() => [String], { nullable: true }) + name_in?: string[]; + + @TypeGraphQLField(() => ID, { nullable: true }) + kitchenSinkId_eq?: string; + + @TypeGraphQLField(() => [ID], { nullable: true }) + kitchenSinkId_in?: string[]; +} + +@TypeGraphQLInputType() +export class DishWhereUniqueInput { + @TypeGraphQLField(() => String) + id?: string; +} + +@TypeGraphQLInputType() +export class DishCreateInput { + @TypeGraphQLField() + name!: string; + + @TypeGraphQLField(() => ID) + kitchenSinkId!: string; +} + +@TypeGraphQLInputType() +export class DishUpdateInput { + @TypeGraphQLField({ nullable: true }) + name?: string; + + @TypeGraphQLField(() => ID, { nullable: true }) + kitchenSinkId?: string; +} + +@ArgsType() +export class DishWhereArgs extends PaginationArgs { + @TypeGraphQLField(() => DishWhereInput, { nullable: true }) + where?: DishWhereInput; + + @TypeGraphQLField(() => DishOrderByEnum, { nullable: true }) + orderBy?: DishOrderByEnum; +} + +@ArgsType() +export class DishCreateManyArgs { + @TypeGraphQLField(() => [DishCreateInput]) + data!: DishCreateInput[]; +} + +@ArgsType() +export class DishUpdateArgs { + @TypeGraphQLField() data!: DishUpdateInput; + @TypeGraphQLField() where!: DishWhereUniqueInput; +} diff --git a/packages/server-express/src/test/generated/index.ts b/packages/server-express/src/test/generated/index.ts new file mode 100644 index 00000000..f37d9645 --- /dev/null +++ b/packages/server-express/src/test/generated/index.ts @@ -0,0 +1 @@ +export * from './classes'; \ No newline at end of file diff --git a/packages/server-express/src/test/generated/ormconfig.ts b/packages/server-express/src/test/generated/ormconfig.ts new file mode 100644 index 00000000..2be40eed --- /dev/null +++ b/packages/server-express/src/test/generated/ormconfig.ts @@ -0,0 +1,3 @@ +import { getBaseConfig } from '@warthog/core'; + +module.exports = getBaseConfig(); \ No newline at end of file diff --git a/packages/server-express/src/test/generated/schema.graphql b/packages/server-express/src/test/generated/schema.graphql new file mode 100644 index 00000000..3539200b --- /dev/null +++ b/packages/server-express/src/test/generated/schema.graphql @@ -0,0 +1,343 @@ +interface BaseGraphQLObject { + id: ID! + createdAt: DateTime! + createdById: String! + updatedAt: DateTime + updatedById: String + deletedAt: DateTime + deletedById: String + version: Int! +} + +type BaseModel implements BaseGraphQLObject { + id: ID! + createdAt: DateTime! + createdById: String! + updatedAt: DateTime + updatedById: String + deletedAt: DateTime + deletedById: String + version: Int! +} + +type BaseModelUUID implements BaseGraphQLObject { + id: ID! + createdAt: DateTime! + createdById: String! + updatedAt: DateTime + updatedById: String + deletedAt: DateTime + deletedById: String + version: Int! +} + +input BaseWhereInput { + id_eq: String + id_in: [String!] + createdAt_eq: String + createdAt_lt: String + createdAt_lte: String + createdAt_gt: String + createdAt_gte: String + createdById_eq: String + updatedAt_eq: String + updatedAt_lt: String + updatedAt_lte: String + updatedAt_gt: String + updatedAt_gte: String + updatedById_eq: String + deletedAt_all: Boolean + deletedAt_eq: String + deletedAt_lt: String + deletedAt_lte: String + deletedAt_gt: String + deletedAt_gte: String + deletedById_eq: String +} + +""" +The javascript `Date` as string. Type represents date and time as the ISO Date string. +""" +scalar DateTime + +interface DeleteResponse { + id: ID! +} + +type Dish implements BaseGraphQLObject { + id: ID! + createdAt: DateTime! + createdById: String! + updatedAt: DateTime + updatedById: String + deletedAt: DateTime + deletedById: String + version: Int! + name: String! + kitchenSink: KitchenSink! + kitchenSinkId: String! +} + +input DishCreateInput { + name: String! + kitchenSinkId: ID! +} + +enum DishOrderByInput { + createdAt_ASC + createdAt_DESC + updatedAt_ASC + updatedAt_DESC + deletedAt_ASC + deletedAt_DESC + name_ASC + name_DESC + kitchenSinkId_ASC + kitchenSinkId_DESC +} + +input DishUpdateInput { + name: String + kitchenSinkId: ID +} + +input DishWhereInput { + id_eq: String + id_in: [String!] + createdAt_eq: String + createdAt_lt: String + createdAt_lte: String + createdAt_gt: String + createdAt_gte: String + createdById_eq: String + updatedAt_eq: String + updatedAt_lt: String + updatedAt_lte: String + updatedAt_gt: String + updatedAt_gte: String + updatedById_eq: String + deletedAt_all: Boolean + deletedAt_eq: String + deletedAt_lt: String + deletedAt_lte: String + deletedAt_gt: String + deletedAt_gte: String + deletedById_eq: String + name_eq: String + name_contains: String + name_startsWith: String + name_endsWith: String + name_in: [String!] + kitchenSinkId_eq: ID + kitchenSinkId_in: [ID!] +} + +input DishWhereUniqueInput { + id: String! +} + +""" +The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +""" +scalar JSONObject + +type KitchenSink implements BaseGraphQLObject { + id: ID! + createdAt: DateTime! + createdById: String! + updatedAt: DateTime + updatedById: String + deletedAt: DateTime + deletedById: String + version: Int! + stringField: String! + nullableStringField: String + dateField: DateTime + emailField: String! + integerField: Int! + booleanField: Boolean! + floatField: Float! + jsonField: JSONObject + dishes: [Dish!] + numericField: Float + numericFieldCustomPrecisionScale: Float + noFilterField: String + noSortField: String + noFilterOrSortField: String + characterField: String + customTextFieldNoSortOrFilter: String +} + +input KitchenSinkCreateInput { + stringField: String! + nullableStringField: String + dateField: DateTime + emailField: String! + integerField: Float! + booleanField: Boolean! + floatField: Float! + jsonField: JSONObject + numericField: Float + numericFieldCustomPrecisionScale: Float + noFilterField: String + noSortField: String + noFilterOrSortField: String + characterField: String + customTextFieldNoSortOrFilter: String +} + +enum KitchenSinkOrderByInput { + createdAt_ASC + createdAt_DESC + updatedAt_ASC + updatedAt_DESC + deletedAt_ASC + deletedAt_DESC + stringField_ASC + stringField_DESC + nullableStringField_ASC + nullableStringField_DESC + dateField_ASC + dateField_DESC + emailField_ASC + emailField_DESC + integerField_ASC + integerField_DESC + booleanField_ASC + booleanField_DESC + floatField_ASC + floatField_DESC + numericField_ASC + numericField_DESC + numericFieldCustomPrecisionScale_ASC + numericFieldCustomPrecisionScale_DESC + noFilterField_ASC + noFilterField_DESC + characterField_ASC + characterField_DESC +} + +input KitchenSinkUpdateInput { + stringField: String + nullableStringField: String + dateField: DateTime + emailField: String + integerField: Float + booleanField: Boolean + floatField: Float + jsonField: JSONObject + numericField: Float + numericFieldCustomPrecisionScale: Float + noFilterField: String + noSortField: String + noFilterOrSortField: String + characterField: String + customTextFieldNoSortOrFilter: String +} + +input KitchenSinkWhereInput { + id_eq: String + id_in: [String!] + createdAt_eq: String + createdAt_lt: String + createdAt_lte: String + createdAt_gt: String + createdAt_gte: String + createdById_eq: String + updatedAt_eq: String + updatedAt_lt: String + updatedAt_lte: String + updatedAt_gt: String + updatedAt_gte: String + updatedById_eq: String + deletedAt_all: Boolean + deletedAt_eq: String + deletedAt_lt: String + deletedAt_lte: String + deletedAt_gt: String + deletedAt_gte: String + deletedById_eq: String + stringField_eq: String + stringField_contains: String + stringField_startsWith: String + stringField_endsWith: String + stringField_in: [String!] + nullableStringField_eq: String + nullableStringField_contains: String + nullableStringField_startsWith: String + nullableStringField_endsWith: String + nullableStringField_in: [String!] + dateField_eq: DateTime + dateField_lt: DateTime + dateField_lte: DateTime + dateField_gt: DateTime + dateField_gte: DateTime + emailField_eq: String + emailField_contains: String + emailField_startsWith: String + emailField_endsWith: String + emailField_in: [String!] + integerField_eq: Int + integerField_gt: Int + integerField_gte: Int + integerField_lt: Int + integerField_lte: Int + integerField_in: [Int!] + booleanField_eq: Boolean + booleanField_in: [Boolean!] + floatField_eq: Float + floatField_gt: Float + floatField_gte: Float + floatField_lt: Float + floatField_lte: Float + floatField_in: [Float!] + numericField_eq: Float + numericField_gt: Float + numericField_gte: Float + numericField_lt: Float + numericField_lte: Float + numericField_in: [Float!] + numericFieldCustomPrecisionScale_eq: Float + numericFieldCustomPrecisionScale_gt: Float + numericFieldCustomPrecisionScale_gte: Float + numericFieldCustomPrecisionScale_lt: Float + numericFieldCustomPrecisionScale_lte: Float + numericFieldCustomPrecisionScale_in: [Float!] + noSortField_eq: String + noSortField_contains: String + noSortField_startsWith: String + noSortField_endsWith: String + noSortField_in: [String!] + characterField_eq: String + characterField_contains: String + characterField_startsWith: String + characterField_endsWith: String + characterField_in: [String!] +} + +input KitchenSinkWhereUniqueInput { + id: String + emailField: String +} + +type Mutation { + createDish(data: DishCreateInput!): Dish! + updateDish(data: DishUpdateInput!, where: DishWhereUniqueInput!): Dish! + createManyDishs(data: [DishCreateInput!]!): [Dish!]! + deleteDish(where: DishWhereUniqueInput!): StandardDeleteResponse! + createKitchenSink(data: KitchenSinkCreateInput!): KitchenSink! + createManyKitchenSinks(data: [KitchenSinkCreateInput!]!): [KitchenSink!]! + updateKitchenSink(data: KitchenSinkUpdateInput!, where: KitchenSinkWhereUniqueInput!): KitchenSink! + deleteKitchenSink(where: KitchenSinkWhereUniqueInput!): StandardDeleteResponse! +} + +type Query { + dishes(offset: Int, limit: Int = 50, where: DishWhereInput, orderBy: DishOrderByInput): [Dish!]! + dish(where: DishWhereUniqueInput!): Dish! + kitchenSinks(offset: Int, limit: Int = 50, where: KitchenSinkWhereInput, orderBy: KitchenSinkOrderByInput): [KitchenSink!]! + kitchenSink(where: KitchenSinkWhereUniqueInput!): KitchenSink! +} + +type StandardDeleteResponse { + id: ID! +} diff --git a/packages/server-express/src/test/helpers.ts b/packages/server-express/src/test/helpers.ts new file mode 100644 index 00000000..d51ce618 --- /dev/null +++ b/packages/server-express/src/test/helpers.ts @@ -0,0 +1,54 @@ +export function spyOnStd() { + const spy: { + // TODO: for some reason, cli commands are not writing to stderr + clear: () => void; + stderr: jest.SpyInstance; + stdout: jest.SpyInstance; + getStdErr: Function; + getStdOut: Function; + getStdOutErr: Function; + } = { + clear: undefined as any, + stderr: undefined as any, + stdout: undefined as any, + getStdErr: undefined as any, + getStdOut: undefined as any, + getStdOutErr: undefined as any + }; + + beforeAll(() => { + spy.stderr = jest.spyOn(process.stderr, 'write').mockImplementation(() => false); + spy.stdout = jest.spyOn(process.stdout, 'write').mockImplementation(() => false); + }); + + beforeEach(() => { + spy.stderr.mockClear(); + spy.stdout.mockClear(); + }); + + afterAll(() => { + spy.stderr.mockRestore(); + spy.stdout.mockRestore(); + }); + + spy.clear = () => { + spy.stderr.mockClear(); + spy.stdout.mockClear(); + }; + + spy.getStdOut = () => { + return spy.stdout.mock.calls.join(' '); + }; + + spy.getStdErr = () => { + return spy.stderr.mock.calls.join(' '); + }; + + // Jest does some funny stdout, stderr redirection, so we need to check + // if message were written to either. + spy.getStdOutErr = () => { + return [spy.getStdOut(), spy.getStdErr()].join(' '); + }; + + return spy; +} diff --git a/packages/server-express/src/test/modules/dish/dish.model.ts b/packages/server-express/src/test/modules/dish/dish.model.ts new file mode 100644 index 00000000..2a3417d6 --- /dev/null +++ b/packages/server-express/src/test/modules/dish/dish.model.ts @@ -0,0 +1,14 @@ +import { BaseModel, ManyToOne, Model, StringField } from '@warthog/core'; + +import { KitchenSink } from '../kitchen-sink/kitchen-sink.model'; + +@Model() +export class Dish extends BaseModel { + @StringField({ maxLength: 30 }) + name?: string; + + @ManyToOne(() => KitchenSink, (kitchenSink: KitchenSink) => kitchenSink.dishes, { + nullable: false + }) + kitchenSink?: KitchenSink; +} diff --git a/packages/server-express/src/test/modules/dish/dish.resolver.ts b/packages/server-express/src/test/modules/dish/dish.resolver.ts new file mode 100644 index 00000000..65f65ea9 --- /dev/null +++ b/packages/server-express/src/test/modules/dish/dish.resolver.ts @@ -0,0 +1,88 @@ +import { + Arg, + Args, + Authorized, + Ctx, + FieldResolver, + Mutation, + Query, + Resolver, + Root +} from 'type-graphql'; +import { Inject } from 'typedi'; + +import { Fields, StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + +import { + DishCreateInput, + DishCreateManyArgs, + DishUpdateArgs, + DishWhereArgs, + DishWhereInput, + DishWhereUniqueInput +} from '../../generated'; + +import { KitchenSink } from '../kitchen-sink/kitchen-sink.model'; + +import { Dish } from './dish.model'; +import { DishService } from './dish.service'; + +@Resolver(Dish) +export class DishResolver { + constructor(@Inject('DishService') public readonly service: DishService) {} + + @Authorized('kitchenSink:read') + @FieldResolver(() => KitchenSink) + kitchenSink(@Root() dish: Dish, @Ctx() ctx: BaseContext): Promise { + return ctx.dataLoader.loaders.Dish.kitchenSink.load(dish); + } + + @Authorized('dish:read') + @Query(() => [Dish]) + async dishes( + @Args() { where, orderBy, limit, offset }: DishWhereArgs, + @Fields() fields: string[] + ): Promise { + return this.service.find(where, orderBy, limit, offset, fields); + } + + @Authorized('dish:read') + @Query(() => Dish) + async dish(@Arg('where') where: DishWhereUniqueInput): Promise { + return this.service.findOne(where); + } + + @Authorized('dish:create') + @Mutation(() => Dish) + async createDish(@Arg('data') data: DishCreateInput, @UserId() userId: string): Promise { + return this.service.create(data, userId); + } + + @Authorized('dish:update') + @Mutation(() => Dish) + async updateDish( + @Args() { data, where }: DishUpdateArgs, + @UserId() userId: string + ): Promise { + return this.service.update(data, where, userId); + } + + @Authorized('dish:create') + @Mutation(() => [Dish]) + async createManyDishs( + @Args() { data }: DishCreateManyArgs, + @UserId() userId: string + ): Promise { + return this.service.createMany(data, userId); + } + + @Authorized('dish:delete') + @Mutation(() => StandardDeleteResponse) + async deleteDish( + @Arg('where') where: DishWhereUniqueInput, + @UserId() userId: string + ): Promise { + return this.service.delete(where, userId); + } +} diff --git a/packages/server-express/src/test/modules/dish/dish.service.ts b/packages/server-express/src/test/modules/dish/dish.service.ts new file mode 100644 index 00000000..6647651b --- /dev/null +++ b/packages/server-express/src/test/modules/dish/dish.service.ts @@ -0,0 +1,13 @@ +import { Service } from 'typedi'; +import { Repository } from 'typeorm'; +import { InjectRepository } from 'typeorm-typedi-extensions'; + +import { BaseService } from '@warthog/core'; +import { Dish } from './dish.model'; + +@Service('DishService') +export class DishService extends BaseService { + constructor(@InjectRepository(Dish) protected readonly repository: Repository) { + super(Dish, repository); + } +} diff --git a/packages/server-express/src/test/modules/index.ts b/packages/server-express/src/test/modules/index.ts new file mode 100644 index 00000000..61fd6cfa --- /dev/null +++ b/packages/server-express/src/test/modules/index.ts @@ -0,0 +1,2 @@ +export * from './dish/dish.model'; +export * from './kitchen-sink/kitchen-sink.model'; diff --git a/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.model.ts b/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.model.ts new file mode 100644 index 00000000..a917f049 --- /dev/null +++ b/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.model.ts @@ -0,0 +1,87 @@ +import { Column } from 'typeorm'; + +import { + BaseModel, + BooleanField, + CustomField, + DateField, + EmailField, + // EnumField, + FloatField, + IntField, + JSONField, + OneToMany, + Model, + NumericField, + StringField, + JsonObject +} from '@warthog/core'; + +import { Dish } from '../dish/dish.model'; + +// Note: this must be exported and in the same file where it's attached with @EnumField +// Also - must use string enums +// export enum StringEnum { +// FOO = 'FOO', +// BAR = 'BAR' +// } + +@Model() +export class KitchenSink extends BaseModel { + @StringField() + stringField?: string; + + @StringField({ nullable: true }) + nullableStringField?: string; + + @DateField({ nullable: true }) + dateField?: Date; + + @EmailField() + emailField!: string; + + @IntField() + integerField?: number; + + @BooleanField() + booleanField?: boolean; + + @FloatField() + floatField?: number; + + @JSONField({ nullable: true }) + jsonField?: JsonObject; + + @OneToMany(() => Dish, (dish: Dish) => dish.kitchenSink) + dishes!: Dish[]; + + @Column({ nullable: true }) + dbOnlyColumn?: string; + + @NumericField({ nullable: true }) + numericField?: number; + + @NumericField({ nullable: true, precision: 5, scale: 2 }) + numericFieldCustomPrecisionScale?: number; + + @StringField({ filter: false, nullable: true }) + noFilterField?: string; + + @StringField({ sort: false, nullable: true }) + noSortField?: string; + + @StringField({ filter: false, sort: false, nullable: true }) + noFilterOrSortField?: string; + + @StringField({ dataType: 'character', nullable: true }) + characterField?: string; + + @CustomField({ + api: { type: 'string', nullable: true, sort: false, filter: false }, + db: { type: 'text', nullable: true } + }) + customTextFieldNoSortOrFilter?: string; + + // @EnumField('StringEnum', StringEnum) + // stringEnumField: StringEnum; +} diff --git a/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts b/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts new file mode 100644 index 00000000..a910a45b --- /dev/null +++ b/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.resolver.ts @@ -0,0 +1,91 @@ +import { + Arg, + Args, + Authorized, + Ctx, + FieldResolver, + Mutation, + Query, + Resolver, + Root +} from 'type-graphql'; +import { Inject } from 'typedi'; + +import { Fields, StandardDeleteResponse, UserId } from '@warthog/core'; +import { BaseContext } from '@warthog/server-express'; + +import { + KitchenSinkCreateInput, + KitchenSinkCreateManyArgs, + KitchenSinkUpdateArgs, + KitchenSinkWhereArgs, + KitchenSinkWhereInput, + KitchenSinkWhereUniqueInput +} from '../../generated'; + +import { Dish } from '../dish/dish.model'; + +import { KitchenSink } from './kitchen-sink.model'; +import { KitchenSinkService } from './kitchen-sink.service'; + +@Resolver(KitchenSink) +export class KitchenSinkResolver { + constructor(@Inject('KitchenSinkService') public readonly service: KitchenSinkService) {} + + // @Authorized('dish:read') + @FieldResolver() + dishes(@Root() kitchenSink: KitchenSink, @Ctx() ctx: BaseContext): Promise { + return ctx.dataLoader.loaders.KitchenSink.dishes.load(kitchenSink); + } + + @Authorized('kitchenSink:read') + @Query(() => [KitchenSink]) + async kitchenSinks( + @Args() { where, orderBy, limit, offset }: KitchenSinkWhereArgs, + @Fields() fields: string[] + ): Promise { + return this.service.find(where, orderBy, limit, offset, fields); + } + + @Authorized('kitchenSink:read') + @Query(() => KitchenSink) + async kitchenSink(@Arg('where') where: KitchenSinkWhereUniqueInput): Promise { + return this.service.findOne(where); + } + + @Authorized('kitchenSink:create') + @Mutation(() => KitchenSink) + async createKitchenSink( + @Arg('data') data: KitchenSinkCreateInput, + @UserId() userId: string + ): Promise { + return this.service.create(data, userId); + } + + @Authorized('kitchenSink:create') + @Mutation(() => [KitchenSink]) + async createManyKitchenSinks( + @Args() { data }: KitchenSinkCreateManyArgs, + @UserId() userId: string + ): Promise { + return this.service.createMany(data, userId); + } + + @Authorized('kitchenSink:update') + @Mutation(() => KitchenSink) + async updateKitchenSink( + @Args() { data, where }: KitchenSinkUpdateArgs, + @UserId() userId: string + ): Promise { + return this.service.update(data, where, userId); + } + + @Authorized('kitchenSink:delete') + @Mutation(() => StandardDeleteResponse) + async deleteKitchenSink( + @Arg('where') where: KitchenSinkWhereUniqueInput, + @UserId() userId: string + ): Promise { + return this.service.delete(where, userId); + } +} diff --git a/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.service.ts b/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.service.ts new file mode 100644 index 00000000..f455a184 --- /dev/null +++ b/packages/server-express/src/test/modules/kitchen-sink/kitchen-sink.service.ts @@ -0,0 +1,16 @@ +import { Service } from 'typedi'; +import { Repository } from 'typeorm'; +import { InjectRepository } from 'typeorm-typedi-extensions'; + +import { BaseService } from '@warthog/core'; + +import { KitchenSink } from './kitchen-sink.model'; + +@Service('KitchenSinkService') +export class KitchenSinkService extends BaseService { + constructor( + @InjectRepository(KitchenSink) protected readonly repository: Repository + ) { + super(KitchenSink, repository); + } +} diff --git a/packages/server-express/src/test/server-vars.ts b/packages/server-express/src/test/server-vars.ts new file mode 100644 index 00000000..f7623d11 --- /dev/null +++ b/packages/server-express/src/test/server-vars.ts @@ -0,0 +1,51 @@ +import { StringMap } from '@warthog/core'; + +export function setTestServerEnvironmentVariables(overrides?: StringMap) { + clearConfig(); + + const defaultVars = getStandardEnvironmentVariables(); + Object.keys(defaultVars).forEach(key => { + process.env[key] = defaultVars[key]; + }); + + if (!overrides) { + return; + } + + Object.keys(overrides).forEach(key => { + process.env[key] = overrides[key]; + }); +} + +export function getStandardEnvironmentVariables(): StringMap { + return { + WARTHOG_APP_HOST: 'localhost', + WARTHOG_APP_PORT: '4000', + WARTHOG_APP_PROTOCOL: 'http', + WARTHOG_AUTO_GENERATE_FILES: 'true', + WARTHOG_AUTO_OPEN_PLAYGROUND: 'false', + WARTHOG_DB_CONNECTION: 'sqlite', + WARTHOG_DB_DATABASE: 'warthog-test', + WARTHOG_DB_ENTITIES: 'src/test/modules/**/*.model.ts', + WARTHOG_DB_HOST: 'localhost', + WARTHOG_DB_LOGGING: 'none', + WARTHOG_DB_MIGRATIONS_DIR: './tmp/test/migrations', + WARTHOG_DB_OVERRIDE: 'true', // Set so that we can do DB stuff outside of NODE_ENV=development + WARTHOG_DB_USERNAME: 'foo', + WARTHOG_DB_PASSWORD: '', + WARTHOG_DB_SYNCHRONIZE: 'true', + WARTHOG_GENERATED_FOLDER: './src/test/generated', + WARTHOG_RESOLVERS_PATH: './src/test/modules/**/*.resolver.ts', + WARTHOG_MODULE_IMPORT_PATH: '@warthog/core' + }; +} + +export function clearConfig() { + const WARTHOG_PREFIX = 'WARTHOG_'; + const TYPEORM_PREFIX = 'TYPEORM_'; + Object.keys(process.env).forEach(key => { + if (key.startsWith(WARTHOG_PREFIX) || key.startsWith(TYPEORM_PREFIX)) { + delete process.env[key]; + } + }); +} diff --git a/packages/server-express/src/test/setupFilesAfterEnv.ts b/packages/server-express/src/test/setupFilesAfterEnv.ts new file mode 100644 index 00000000..d2c9bc6e --- /dev/null +++ b/packages/server-express/src/test/setupFilesAfterEnv.ts @@ -0,0 +1 @@ +import 'reflect-metadata'; diff --git a/packages/server-express/src/test/test-server.ts b/packages/server-express/src/test/test-server.ts new file mode 100644 index 00000000..7fff737b --- /dev/null +++ b/packages/server-express/src/test/test-server.ts @@ -0,0 +1,28 @@ +import { authChecker } from '@warthog/core'; +import { Server, ServerOptions } from '../server'; + +// This spins up a mock Warthog server using the models and resolvers in the test/modules directory +export function getTestServer(options: ServerOptions) { + return new Server({ + authChecker, + context: () => { + return { + user: { + id: 'abc123', + permissions: [ + 'kitchenSink:create', + 'kitchenSink:read', + 'kitchenSink:update', + 'kitchenSink:delete', + 'dish:create', + 'dish:read', + 'dish:update' + ] + } + }; + }, + introspection: true, + openPlayground: false, + ...options + }); +} diff --git a/packages/server-express/tsconfig.build.json b/packages/server-express/tsconfig.build.json new file mode 100644 index 00000000..a4944fa3 --- /dev/null +++ b/packages/server-express/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.build.json", + "compilerOptions": { + "outDir": "./dist", + "declarationDir": "dist/types" + }, + "include": ["src/**/*"] +} diff --git a/packages/server-express/tsconfig.json b/packages/server-express/tsconfig.json new file mode 100644 index 00000000..52d43eaa --- /dev/null +++ b/packages/server-express/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/server-express/tsconfig.test.json b/packages/server-express/tsconfig.test.json new file mode 100644 index 00000000..a3d1a2cd --- /dev/null +++ b/packages/server-express/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "strict": false + }, + "exclude": ["node_modules", "**/node_modules/*"], + "include": ["src/**/*", "test/**/*"] +} diff --git a/src/db/index.ts b/src/db/index.ts deleted file mode 100644 index c5f595cf..00000000 --- a/src/db/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './helpers'; diff --git a/src/metadata/index.ts b/src/metadata/index.ts deleted file mode 100644 index c3c7e5de..00000000 --- a/src/metadata/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './metadata-storage'; diff --git a/src/middleware/ErrorMiddleware.ts.bak b/src/middleware/ErrorMiddleware.ts.bak deleted file mode 100644 index 974a5080..00000000 --- a/src/middleware/ErrorMiddleware.ts.bak +++ /dev/null @@ -1,22 +0,0 @@ -import { ArgumentValidationError, MiddlewareInterface, NextFn, ResolverData } from 'type-graphql'; -import { Service } from 'typedi'; - -import { BaseContext, logger } from '../core'; - -@Service() -export class ErrorLoggerMiddleware implements MiddlewareInterface { - constructor() {} - - async use({ context }: ResolverData, next: NextFn) { - try { - return await next(); - } catch (err) { - if (!(err instanceof ArgumentValidationError)) { - // hide errors from db like printing sql query - logger.error(context.user); - throw new Error('Unknown error occurred. Try again later!'); - } - throw err; - } - } -} diff --git a/src/schema/index.ts b/src/schema/index.ts deleted file mode 100644 index f5300175..00000000 --- a/src/schema/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './SchemaGenerator'; -export * from './getSchemaInfo'; -export * from './type-conversion'; diff --git a/src/test/examples/create-id-model.ts b/src/test/examples/create-id-model.ts deleted file mode 100644 index 173f2b02..00000000 --- a/src/test/examples/create-id-model.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Arg, Mutation, Resolver } from 'type-graphql'; -import { Inject, Service } from 'typedi'; -import { Repository } from 'typeorm'; -import { InjectRepository } from 'typeorm-typedi-extensions'; - -import { BaseModel, BaseService, Model, StringField } from '../../'; - -import { CreateIDTestCreateInput } from './create-id-model/generated'; - -@Model() -export class CreateIDTest extends BaseModel { - @StringField() - stringField?: string; -} - -@Service('CreateIDTestService') -export class CreateIDTestService extends BaseService { - constructor( - @InjectRepository(CreateIDTest) protected readonly repository: Repository - ) { - super(CreateIDTest, repository); - } -} -@Resolver(CreateIDTest) -export class CreateIDTestResolver { - constructor(@Inject('CreateIDTestService') public readonly service: CreateIDTestService) {} - - @Mutation(() => CreateIDTest) - async createKitchenSink(@Arg('data') data: CreateIDTestCreateInput): Promise { - return this.service.create(data, '1'); - } -} diff --git a/src/test/examples/create-id-model/generated/classes.ts b/src/test/examples/create-id-model/generated/classes.ts deleted file mode 100644 index d1e6589b..00000000 --- a/src/test/examples/create-id-model/generated/classes.ts +++ /dev/null @@ -1,97 +0,0 @@ -// This file has been auto-generated by Warthog. Do not update directly as it -// will be re-written. If you need to change this file, update models or add -// new TypeGraphQL objects -import { GraphQLID as ID } from "graphql"; -import { - ArgsType, - Field as TypeGraphQLField, - Float, - InputType as TypeGraphQLInputType, - Int -} from "type-graphql"; -import { registerEnumType } from "type-graphql"; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { GraphQLJSONObject } = require("graphql-type-json"); - -import { BaseWhereInput, PaginationArgs } from "../../../../"; -// @ts-ignore -import { CreateIDTest } from "../../create-id-model"; - -export enum CreateIDTestOrderByEnum { - createdAt_ASC = "createdAt_ASC", - createdAt_DESC = "createdAt_DESC", - - updatedAt_ASC = "updatedAt_ASC", - updatedAt_DESC = "updatedAt_DESC", - - deletedAt_ASC = "deletedAt_ASC", - deletedAt_DESC = "deletedAt_DESC", - - stringField_ASC = "stringField_ASC", - stringField_DESC = "stringField_DESC" -} - -registerEnumType(CreateIDTestOrderByEnum, { - name: "CreateIDTestOrderByInput" -}); - -@TypeGraphQLInputType() -export class CreateIDTestWhereInput extends BaseWhereInput { - @TypeGraphQLField({ nullable: true }) - stringField_eq?: string; - - @TypeGraphQLField({ nullable: true }) - stringField_contains?: string; - - @TypeGraphQLField({ nullable: true }) - stringField_startsWith?: string; - - @TypeGraphQLField({ nullable: true }) - stringField_endsWith?: string; - - @TypeGraphQLField(() => [String], { nullable: true }) - stringField_in?: string[]; -} - -@TypeGraphQLInputType() -export class CreateIDTestWhereUniqueInput { - @TypeGraphQLField(() => String) - id?: string; -} - -@TypeGraphQLInputType() -export class CreateIDTestCreateInput { - @TypeGraphQLField({ nullable: true }) - id?: string; - - @TypeGraphQLField() - stringField!: string; -} - -@TypeGraphQLInputType() -export class CreateIDTestUpdateInput { - @TypeGraphQLField({ nullable: true }) - stringField?: string; -} - -@ArgsType() -export class CreateIDTestWhereArgs extends PaginationArgs { - @TypeGraphQLField(() => CreateIDTestWhereInput, { nullable: true }) - where?: CreateIDTestWhereInput; - - @TypeGraphQLField(() => CreateIDTestOrderByEnum, { nullable: true }) - orderBy?: CreateIDTestOrderByEnum; -} - -@ArgsType() -export class CreateIDTestCreateManyArgs { - @TypeGraphQLField(() => [CreateIDTestCreateInput]) - data!: CreateIDTestCreateInput[]; -} - -@ArgsType() -export class CreateIDTestUpdateArgs { - @TypeGraphQLField() data!: CreateIDTestUpdateInput; - @TypeGraphQLField() where!: CreateIDTestWhereUniqueInput; -} diff --git a/src/test/examples/create-id-model/generated/ormconfig.ts b/src/test/examples/create-id-model/generated/ormconfig.ts deleted file mode 100644 index 95f073f9..00000000 --- a/src/test/examples/create-id-model/generated/ormconfig.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getBaseConfig } from '../../../../'; - -module.exports = getBaseConfig(); \ No newline at end of file diff --git a/src/test/generated/ormconfig.ts b/src/test/generated/ormconfig.ts deleted file mode 100644 index 8eea4934..00000000 --- a/src/test/generated/ormconfig.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getBaseConfig } from '../../'; - -module.exports = getBaseConfig(); \ No newline at end of file diff --git a/tools/bootstrap-all.sh b/tools/bootstrap-all.sh index b146f4c2..4863abf7 100755 --- a/tools/bootstrap-all.sh +++ b/tools/bootstrap-all.sh @@ -1,12 +1,12 @@ set -e +yarn +yarn build + for d in examples/*/ do cd $d pwd - # yarn upgrade && npx syncyarnlock -s -k && yarn - # rm -rf generated - # yarn db:drop yarn bootstrap # yarn codegen cd - diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..3ad96c32 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "declaration": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "forceConsistentCasingInFileNames": true, + "keyofStringsOnly": true, + "lib": ["es2016", "dom", "es5", "scripthost", "esnext", "esnext.asynciterable"], + "module": "commonjs", + "moduleResolution": "node", + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": false, + "outDir": "./dist", + "pretty": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "target": "es5", + "typeRoots": ["node_modules/@types", "./typings", "./typings/typings.d.ts"], + "types": ["jest", "isomorphic-fetch", "node"] + }, + "exclude": [ + "node_modules", + "**/node_modules/*", + "**/*.test.ts", + "**/test/*", + "**/generated/*", + "**/tmp/*", + "**/dist/*", + "examples" + ] +} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 0f3a3fed..96b914ba 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -2,6 +2,6 @@ // eslint complains that the example folders aren't in our tsconfig path, // so we give eslint it's own config file "extends": "./tsconfig.json", - "include": ["src/**/*", "examples/**/*"], + "include": ["packages/*/src/**/*", "examples/**/*"], "exclude": ["node_modules/**/*", "**/generated/*"] } diff --git a/tsconfig.json b/tsconfig.json index 836b9c08..e3e1727a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,30 +1,9 @@ { + "extends": "./tsconfig.build.json", "compilerOptions": { - "allowSyntheticDefaultImports": true, - "baseUrl": "src", - "declaration": true, - "declarationDir": "dist/types", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "forceConsistentCasingInFileNames": true, - "keyofStringsOnly": true, - "lib": ["es2016", "dom", "es5", "scripthost", "esnext", "esnext.asynciterable"], - "module": "commonjs", - "moduleResolution": "node", - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "noUnusedLocals": false, - "outDir": "./dist", - "pretty": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "strictNullChecks": true, - "target": "es5", - "typeRoots": ["node_modules/@types", "./typings", "./typings/typings.d.ts"], - "types": ["jest", "isomorphic-fetch", "node"] - }, - "exclude": ["node_modules", "**/node_modules/*", "src/**/*.test.ts", "**/generated/*"], - "include": ["src/**/*"] + "baseUrl": ".", + "paths": { + "@warthog/*": ["packages/*/src"] + } + } } diff --git a/yarn.lock b/yarn.lock index 5b1efb36..8a3825a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -151,6 +151,80 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@evocateur/libnpmaccess@^3.1.2": + version "3.1.2" + resolved "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845" + integrity sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg== + dependencies: + "@evocateur/npm-registry-fetch" "^4.0.0" + aproba "^2.0.0" + figgy-pudding "^3.5.1" + get-stream "^4.0.0" + npm-package-arg "^6.1.0" + +"@evocateur/libnpmpublish@^1.2.2": + version "1.2.2" + resolved "https://registry.npmjs.org/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz#55df09d2dca136afba9c88c759ca272198db9f1a" + integrity sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg== + dependencies: + "@evocateur/npm-registry-fetch" "^4.0.0" + aproba "^2.0.0" + figgy-pudding "^3.5.1" + get-stream "^4.0.0" + lodash.clonedeep "^4.5.0" + normalize-package-data "^2.4.0" + npm-package-arg "^6.1.0" + semver "^5.5.1" + ssri "^6.0.1" + +"@evocateur/npm-registry-fetch@^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#8c4c38766d8d32d3200fcb0a83f064b57365ed66" + integrity sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g== + dependencies: + JSONStream "^1.3.4" + bluebird "^3.5.1" + figgy-pudding "^3.4.1" + lru-cache "^5.1.1" + make-fetch-happen "^5.0.0" + npm-package-arg "^6.1.0" + safe-buffer "^5.1.2" + +"@evocateur/pacote@^9.6.3": + version "9.6.5" + resolved "https://registry.npmjs.org/@evocateur/pacote/-/pacote-9.6.5.tgz#33de32ba210b6f17c20ebab4d497efc6755f4ae5" + integrity sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w== + dependencies: + "@evocateur/npm-registry-fetch" "^4.0.0" + bluebird "^3.5.3" + cacache "^12.0.3" + chownr "^1.1.2" + figgy-pudding "^3.5.1" + get-stream "^4.1.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^5.1.1" + make-fetch-happen "^5.0.0" + minimatch "^3.0.4" + minipass "^2.3.5" + mississippi "^3.0.0" + mkdirp "^0.5.1" + normalize-package-data "^2.5.0" + npm-package-arg "^6.1.0" + npm-packlist "^1.4.4" + npm-pick-manifest "^3.0.0" + osenv "^0.1.5" + promise-inflight "^1.0.1" + promise-retry "^1.1.1" + protoduck "^5.0.1" + rimraf "^2.6.3" + safe-buffer "^5.2.0" + semver "^5.7.0" + ssri "^6.0.1" + tar "^4.4.10" + unique-filename "^1.1.1" + which "^1.3.1" + "@iamstarkov/listr-update-renderer@0.4.1": version "0.4.1" resolved "https://registry.npmjs.org/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz#d7c48092a2dcf90fd672b6c8b458649cb350c77e" @@ -311,6 +385,699 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^12.0.9" +"@lerna/add@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/add/-/add-3.20.0.tgz#bea7edf36fc93fb72ec34cb9ba854c48d4abf309" + integrity sha512-AnH1oRIEEg/VDa3SjYq4x1/UglEAvrZuV0WssHUMN81RTZgQk3we+Mv3qZNddrZ/fBcZu2IAdN/EQ3+ie2JxKQ== + dependencies: + "@evocateur/pacote" "^9.6.3" + "@lerna/bootstrap" "3.20.0" + "@lerna/command" "3.18.5" + "@lerna/filter-options" "3.20.0" + "@lerna/npm-conf" "3.16.0" + "@lerna/validation-error" "3.13.0" + dedent "^0.7.0" + npm-package-arg "^6.1.0" + p-map "^2.1.0" + semver "^6.2.0" + +"@lerna/bootstrap@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-3.20.0.tgz#635d71046830f208e851ab429a63da1747589e37" + integrity sha512-Wylullx3uthKE7r4izo09qeRGL20Y5yONlQEjPCfnbxCC2Elu+QcPu4RC6kqKQ7b+g7pdC3OOgcHZjngrwr5XQ== + dependencies: + "@lerna/command" "3.18.5" + "@lerna/filter-options" "3.20.0" + "@lerna/has-npm-version" "3.16.5" + "@lerna/npm-install" "3.16.5" + "@lerna/package-graph" "3.18.5" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/rimraf-dir" "3.16.5" + "@lerna/run-lifecycle" "3.16.2" + "@lerna/run-topologically" "3.18.5" + "@lerna/symlink-binary" "3.17.0" + "@lerna/symlink-dependencies" "3.17.0" + "@lerna/validation-error" "3.13.0" + dedent "^0.7.0" + get-port "^4.2.0" + multimatch "^3.0.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + p-finally "^1.0.0" + p-map "^2.1.0" + p-map-series "^1.0.0" + p-waterfall "^1.0.0" + read-package-tree "^5.1.6" + semver "^6.2.0" + +"@lerna/changed@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/changed/-/changed-3.20.0.tgz#66b97ebd6c8f8d207152ee524a0791846a9097ae" + integrity sha512-+hzMFSldbRPulZ0vbKk6RD9f36gaH3Osjx34wrrZ62VB4pKmjyuS/rxVYkCA3viPLHoiIw2F8zHM5BdYoDSbjw== + dependencies: + "@lerna/collect-updates" "3.20.0" + "@lerna/command" "3.18.5" + "@lerna/listable" "3.18.5" + "@lerna/output" "3.13.0" + +"@lerna/check-working-tree@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz#b4f8ae61bb4523561dfb9f8f8d874dd46bb44baa" + integrity sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ== + dependencies: + "@lerna/collect-uncommitted" "3.16.5" + "@lerna/describe-ref" "3.16.5" + "@lerna/validation-error" "3.13.0" + +"@lerna/child-process@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/child-process/-/child-process-3.16.5.tgz#38fa3c18064aa4ac0754ad80114776a7b36a69b2" + integrity sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg== + dependencies: + chalk "^2.3.1" + execa "^1.0.0" + strong-log-transformer "^2.0.0" + +"@lerna/clean@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/clean/-/clean-3.20.0.tgz#ba777e373ddeae63e57860df75d47a9e5264c5b2" + integrity sha512-9ZdYrrjQvR5wNXmHfDsfjWjp0foOkCwKe3hrckTzkAeQA1ibyz5llGwz5e1AeFrV12e2/OLajVqYfe+qdkZUgg== + dependencies: + "@lerna/command" "3.18.5" + "@lerna/filter-options" "3.20.0" + "@lerna/prompt" "3.18.5" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/rimraf-dir" "3.16.5" + p-map "^2.1.0" + p-map-series "^1.0.0" + p-waterfall "^1.0.0" + +"@lerna/cli@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/cli/-/cli-3.18.5.tgz#c90c461542fcd35b6d5b015a290fb0dbfb41d242" + integrity sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA== + dependencies: + "@lerna/global-options" "3.13.0" + dedent "^0.7.0" + npmlog "^4.1.2" + yargs "^14.2.2" + +"@lerna/collect-uncommitted@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz#a494d61aac31cdc7aec4bbe52c96550274132e63" + integrity sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg== + dependencies: + "@lerna/child-process" "3.16.5" + chalk "^2.3.1" + figgy-pudding "^3.5.1" + npmlog "^4.1.2" + +"@lerna/collect-updates@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-3.20.0.tgz#62f9d76ba21a25b7d9fbf31c02de88744a564bd1" + integrity sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/describe-ref" "3.16.5" + minimatch "^3.0.4" + npmlog "^4.1.2" + slash "^2.0.0" + +"@lerna/command@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/command/-/command-3.18.5.tgz#14c6d2454adbfd365f8027201523e6c289cd3cd9" + integrity sha512-36EnqR59yaTU4HrR1C9XDFti2jRx0BgpIUBeWn129LZZB8kAB3ov1/dJNa1KcNRKp91DncoKHLY99FZ6zTNpMQ== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/package-graph" "3.18.5" + "@lerna/project" "3.18.0" + "@lerna/validation-error" "3.13.0" + "@lerna/write-log-file" "3.13.0" + clone-deep "^4.0.1" + dedent "^0.7.0" + execa "^1.0.0" + is-ci "^2.0.0" + npmlog "^4.1.2" + +"@lerna/conventional-commits@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/conventional-commits/-/conventional-commits-3.18.5.tgz#08efd2e5b45acfaf3f151a53a3ec7ecade58a7bc" + integrity sha512-qcvXIEJ3qSgalxXnQ7Yxp5H9Ta5TVyai6vEor6AAEHc20WiO7UIdbLDCxBtiiHMdGdpH85dTYlsoYUwsCJu3HQ== + dependencies: + "@lerna/validation-error" "3.13.0" + conventional-changelog-angular "^5.0.3" + conventional-changelog-core "^3.1.6" + conventional-recommended-bump "^5.0.0" + fs-extra "^8.1.0" + get-stream "^4.0.0" + lodash.template "^4.5.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + pify "^4.0.1" + semver "^6.2.0" + +"@lerna/create-symlink@3.16.2": + version "3.16.2" + resolved "https://registry.npmjs.org/@lerna/create-symlink/-/create-symlink-3.16.2.tgz#412cb8e59a72f5a7d9463e4e4721ad2070149967" + integrity sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw== + dependencies: + "@zkochan/cmd-shim" "^3.1.0" + fs-extra "^8.1.0" + npmlog "^4.1.2" + +"@lerna/create@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/create/-/create-3.18.5.tgz#11ac539f069248eaf7bc4c42e237784330f4fc47" + integrity sha512-cHpjocbpKmLopCuZFI7cKEM3E/QY8y+yC7VtZ4FQRSaLU8D8i2xXtXmYaP1GOlVNavji0iwoXjuNpnRMInIr2g== + dependencies: + "@evocateur/pacote" "^9.6.3" + "@lerna/child-process" "3.16.5" + "@lerna/command" "3.18.5" + "@lerna/npm-conf" "3.16.0" + "@lerna/validation-error" "3.13.0" + camelcase "^5.0.0" + dedent "^0.7.0" + fs-extra "^8.1.0" + globby "^9.2.0" + init-package-json "^1.10.3" + npm-package-arg "^6.1.0" + p-reduce "^1.0.0" + pify "^4.0.1" + semver "^6.2.0" + slash "^2.0.0" + validate-npm-package-license "^3.0.3" + validate-npm-package-name "^3.0.0" + whatwg-url "^7.0.0" + +"@lerna/describe-ref@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-3.16.5.tgz#a338c25aaed837d3dc70b8a72c447c5c66346ac0" + integrity sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw== + dependencies: + "@lerna/child-process" "3.16.5" + npmlog "^4.1.2" + +"@lerna/diff@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/diff/-/diff-3.18.5.tgz#e9e2cb882f84d5b84f0487c612137305f07accbc" + integrity sha512-u90lGs+B8DRA9Z/2xX4YaS3h9X6GbypmGV6ITzx9+1Ga12UWGTVlKaCXBgONMBjzJDzAQOK8qPTwLA57SeBLgA== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/command" "3.18.5" + "@lerna/validation-error" "3.13.0" + npmlog "^4.1.2" + +"@lerna/exec@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/exec/-/exec-3.20.0.tgz#29f0c01aee2340eb46f90706731fef2062a49639" + integrity sha512-pS1mmC7kzV668rHLWuv31ClngqeXjeHC8kJuM+W2D6IpUVMGQHLcCTYLudFgQsuKGVpl0DGNYG+sjLhAPiiu6A== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/command" "3.18.5" + "@lerna/filter-options" "3.20.0" + "@lerna/profiler" "3.20.0" + "@lerna/run-topologically" "3.18.5" + "@lerna/validation-error" "3.13.0" + p-map "^2.1.0" + +"@lerna/filter-options@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-3.20.0.tgz#0f0f5d5a4783856eece4204708cc902cbc8af59b" + integrity sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g== + dependencies: + "@lerna/collect-updates" "3.20.0" + "@lerna/filter-packages" "3.18.0" + dedent "^0.7.0" + figgy-pudding "^3.5.1" + npmlog "^4.1.2" + +"@lerna/filter-packages@3.18.0": + version "3.18.0" + resolved "https://registry.npmjs.org/@lerna/filter-packages/-/filter-packages-3.18.0.tgz#6a7a376d285208db03a82958cfb8172e179b4e70" + integrity sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ== + dependencies: + "@lerna/validation-error" "3.13.0" + multimatch "^3.0.0" + npmlog "^4.1.2" + +"@lerna/get-npm-exec-opts@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz#d1b552cb0088199fc3e7e126f914e39a08df9ea5" + integrity sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw== + dependencies: + npmlog "^4.1.2" + +"@lerna/get-packed@3.16.0": + version "3.16.0" + resolved "https://registry.npmjs.org/@lerna/get-packed/-/get-packed-3.16.0.tgz#1b316b706dcee86c7baa55e50b087959447852ff" + integrity sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw== + dependencies: + fs-extra "^8.1.0" + ssri "^6.0.1" + tar "^4.4.8" + +"@lerna/github-client@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/github-client/-/github-client-3.16.5.tgz#2eb0235c3bf7a7e5d92d73e09b3761ab21f35c2e" + integrity sha512-rHQdn8Dv/CJrO3VouOP66zAcJzrHsm+wFuZ4uGAai2At2NkgKH+tpNhQy2H1PSC0Ezj9LxvdaHYrUzULqVK5Hw== + dependencies: + "@lerna/child-process" "3.16.5" + "@octokit/plugin-enterprise-rest" "^3.6.1" + "@octokit/rest" "^16.28.4" + git-url-parse "^11.1.2" + npmlog "^4.1.2" + +"@lerna/gitlab-client@3.15.0": + version "3.15.0" + resolved "https://registry.npmjs.org/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz#91f4ec8c697b5ac57f7f25bd50fe659d24aa96a6" + integrity sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q== + dependencies: + node-fetch "^2.5.0" + npmlog "^4.1.2" + whatwg-url "^7.0.0" + +"@lerna/global-options@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/global-options/-/global-options-3.13.0.tgz#217662290db06ad9cf2c49d8e3100ee28eaebae1" + integrity sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ== + +"@lerna/has-npm-version@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz#ab83956f211d8923ea6afe9b979b38cc73b15326" + integrity sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q== + dependencies: + "@lerna/child-process" "3.16.5" + semver "^6.2.0" + +"@lerna/import@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/import/-/import-3.18.5.tgz#a9c7d8601870729851293c10abd18b3707f7ba5e" + integrity sha512-PH0WVLEgp+ORyNKbGGwUcrueW89K3Iuk/DDCz8mFyG2IG09l/jOF0vzckEyGyz6PO5CMcz4TI1al/qnp3FrahQ== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/command" "3.18.5" + "@lerna/prompt" "3.18.5" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/validation-error" "3.13.0" + dedent "^0.7.0" + fs-extra "^8.1.0" + p-map-series "^1.0.0" + +"@lerna/info@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/info/-/info-3.20.0.tgz#3a5212f3029f2bc6255f9533bdf4bcb120ef329a" + integrity sha512-Rsz+KQF9mczbGUbPTrtOed1N0C+cA08Qz0eX/oI+NNjvsryZIju/o7uedG4I3P55MBiAioNrJI88fHH3eTgYug== + dependencies: + "@lerna/command" "3.18.5" + "@lerna/output" "3.13.0" + envinfo "^7.3.1" + +"@lerna/init@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/init/-/init-3.18.5.tgz#86dd0b2b3290755a96975069b5cb007f775df9f5" + integrity sha512-oCwipWrha98EcJAHm8AGd2YFFLNI7AW9AWi0/LbClj1+XY9ah+uifXIgYGfTk63LbgophDd8936ZEpHMxBsbAg== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/command" "3.18.5" + fs-extra "^8.1.0" + p-map "^2.1.0" + write-json-file "^3.2.0" + +"@lerna/link@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/link/-/link-3.18.5.tgz#f24347e4f0b71d54575bd37cfa1794bc8ee91b18" + integrity sha512-xTN3vktJpkT7Nqc3QkZRtHO4bT5NvuLMtKNIBDkks0HpGxC9PRyyqwOoCoh1yOGbrWIuDezhfMg3Qow+6I69IQ== + dependencies: + "@lerna/command" "3.18.5" + "@lerna/package-graph" "3.18.5" + "@lerna/symlink-dependencies" "3.17.0" + p-map "^2.1.0" + slash "^2.0.0" + +"@lerna/list@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/list/-/list-3.20.0.tgz#7e67cc29c5cf661cfd097e8a7c2d3dcce7a81029" + integrity sha512-fXTicPrfioVnRzknyPawmYIVkzDRBaQqk9spejS1S3O1DOidkihK0xxNkr8HCVC0L22w6f92g83qWDp2BYRUbg== + dependencies: + "@lerna/command" "3.18.5" + "@lerna/filter-options" "3.20.0" + "@lerna/listable" "3.18.5" + "@lerna/output" "3.13.0" + +"@lerna/listable@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/listable/-/listable-3.18.5.tgz#e82798405b5ed8fc51843c8ef1e7a0e497388a1a" + integrity sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg== + dependencies: + "@lerna/query-graph" "3.18.5" + chalk "^2.3.1" + columnify "^1.5.4" + +"@lerna/log-packed@3.16.0": + version "3.16.0" + resolved "https://registry.npmjs.org/@lerna/log-packed/-/log-packed-3.16.0.tgz#f83991041ee77b2495634e14470b42259fd2bc16" + integrity sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ== + dependencies: + byte-size "^5.0.1" + columnify "^1.5.4" + has-unicode "^2.0.1" + npmlog "^4.1.2" + +"@lerna/npm-conf@3.16.0": + version "3.16.0" + resolved "https://registry.npmjs.org/@lerna/npm-conf/-/npm-conf-3.16.0.tgz#1c10a89ae2f6c2ee96962557738685300d376827" + integrity sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA== + dependencies: + config-chain "^1.1.11" + pify "^4.0.1" + +"@lerna/npm-dist-tag@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz#9ef9abb7c104077b31f6fab22cc73b314d54ac55" + integrity sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ== + dependencies: + "@evocateur/npm-registry-fetch" "^4.0.0" + "@lerna/otplease" "3.18.5" + figgy-pudding "^3.5.1" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + +"@lerna/npm-install@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-3.16.5.tgz#d6bfdc16f81285da66515ae47924d6e278d637d3" + integrity sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/get-npm-exec-opts" "3.13.0" + fs-extra "^8.1.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + signal-exit "^3.0.2" + write-pkg "^3.1.0" + +"@lerna/npm-publish@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/npm-publish/-/npm-publish-3.18.5.tgz#240e4039959fd9816b49c5b07421e11b5cb000af" + integrity sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg== + dependencies: + "@evocateur/libnpmpublish" "^1.2.2" + "@lerna/otplease" "3.18.5" + "@lerna/run-lifecycle" "3.16.2" + figgy-pudding "^3.5.1" + fs-extra "^8.1.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + pify "^4.0.1" + read-package-json "^2.0.13" + +"@lerna/npm-run-script@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz#9c2ec82453a26c0b46edc0bb7c15816c821f5c15" + integrity sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ== + dependencies: + "@lerna/child-process" "3.16.5" + "@lerna/get-npm-exec-opts" "3.13.0" + npmlog "^4.1.2" + +"@lerna/otplease@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/otplease/-/otplease-3.18.5.tgz#b77b8e760b40abad9f7658d988f3ea77d4fd0231" + integrity sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog== + dependencies: + "@lerna/prompt" "3.18.5" + figgy-pudding "^3.5.1" + +"@lerna/output@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/output/-/output-3.13.0.tgz#3ded7cc908b27a9872228a630d950aedae7a4989" + integrity sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg== + dependencies: + npmlog "^4.1.2" + +"@lerna/pack-directory@3.16.4": + version "3.16.4" + resolved "https://registry.npmjs.org/@lerna/pack-directory/-/pack-directory-3.16.4.tgz#3eae5f91bdf5acfe0384510ed53faddc4c074693" + integrity sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng== + dependencies: + "@lerna/get-packed" "3.16.0" + "@lerna/package" "3.16.0" + "@lerna/run-lifecycle" "3.16.2" + figgy-pudding "^3.5.1" + npm-packlist "^1.4.4" + npmlog "^4.1.2" + tar "^4.4.10" + temp-write "^3.4.0" + +"@lerna/package-graph@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/package-graph/-/package-graph-3.18.5.tgz#c740e2ea3578d059e551633e950690831b941f6b" + integrity sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA== + dependencies: + "@lerna/prerelease-id-from-version" "3.16.0" + "@lerna/validation-error" "3.13.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + semver "^6.2.0" + +"@lerna/package@3.16.0": + version "3.16.0" + resolved "https://registry.npmjs.org/@lerna/package/-/package-3.16.0.tgz#7e0a46e4697ed8b8a9c14d59c7f890e0d38ba13c" + integrity sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw== + dependencies: + load-json-file "^5.3.0" + npm-package-arg "^6.1.0" + write-pkg "^3.1.0" + +"@lerna/prerelease-id-from-version@3.16.0": + version "3.16.0" + resolved "https://registry.npmjs.org/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz#b24bfa789f5e1baab914d7b08baae9b7bd7d83a1" + integrity sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA== + dependencies: + semver "^6.2.0" + +"@lerna/profiler@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/profiler/-/profiler-3.20.0.tgz#0f6dc236f4ea8f9ea5f358c6703305a4f32ad051" + integrity sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg== + dependencies: + figgy-pudding "^3.5.1" + fs-extra "^8.1.0" + npmlog "^4.1.2" + upath "^1.2.0" + +"@lerna/project@3.18.0": + version "3.18.0" + resolved "https://registry.npmjs.org/@lerna/project/-/project-3.18.0.tgz#56feee01daeb42c03cbdf0ed8a2a10cbce32f670" + integrity sha512-+LDwvdAp0BurOAWmeHE3uuticsq9hNxBI0+FMHiIai8jrygpJGahaQrBYWpwbshbQyVLeQgx3+YJdW2TbEdFWA== + dependencies: + "@lerna/package" "3.16.0" + "@lerna/validation-error" "3.13.0" + cosmiconfig "^5.1.0" + dedent "^0.7.0" + dot-prop "^4.2.0" + glob-parent "^5.0.0" + globby "^9.2.0" + load-json-file "^5.3.0" + npmlog "^4.1.2" + p-map "^2.1.0" + resolve-from "^4.0.0" + write-json-file "^3.2.0" + +"@lerna/prompt@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/prompt/-/prompt-3.18.5.tgz#628cd545f225887d060491ab95df899cfc5218a1" + integrity sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ== + dependencies: + inquirer "^6.2.0" + npmlog "^4.1.2" + +"@lerna/publish@3.20.2": + version "3.20.2" + resolved "https://registry.npmjs.org/@lerna/publish/-/publish-3.20.2.tgz#a45d29813099b3249657ea913d0dc3f8ebc5cc2e" + integrity sha512-N7Y6PdhJ+tYQPdI1tZum8W25cDlTp4D6brvRacKZusweWexxaopbV8RprBaKexkEX/KIbncuADq7qjDBdQHzaA== + dependencies: + "@evocateur/libnpmaccess" "^3.1.2" + "@evocateur/npm-registry-fetch" "^4.0.0" + "@evocateur/pacote" "^9.6.3" + "@lerna/check-working-tree" "3.16.5" + "@lerna/child-process" "3.16.5" + "@lerna/collect-updates" "3.20.0" + "@lerna/command" "3.18.5" + "@lerna/describe-ref" "3.16.5" + "@lerna/log-packed" "3.16.0" + "@lerna/npm-conf" "3.16.0" + "@lerna/npm-dist-tag" "3.18.5" + "@lerna/npm-publish" "3.18.5" + "@lerna/otplease" "3.18.5" + "@lerna/output" "3.13.0" + "@lerna/pack-directory" "3.16.4" + "@lerna/prerelease-id-from-version" "3.16.0" + "@lerna/prompt" "3.18.5" + "@lerna/pulse-till-done" "3.13.0" + "@lerna/run-lifecycle" "3.16.2" + "@lerna/run-topologically" "3.18.5" + "@lerna/validation-error" "3.13.0" + "@lerna/version" "3.20.2" + figgy-pudding "^3.5.1" + fs-extra "^8.1.0" + npm-package-arg "^6.1.0" + npmlog "^4.1.2" + p-finally "^1.0.0" + p-map "^2.1.0" + p-pipe "^1.2.0" + semver "^6.2.0" + +"@lerna/pulse-till-done@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz#c8e9ce5bafaf10d930a67d7ed0ccb5d958fe0110" + integrity sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA== + dependencies: + npmlog "^4.1.2" + +"@lerna/query-graph@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/query-graph/-/query-graph-3.18.5.tgz#df4830bb5155273003bf35e8dda1c32d0927bd86" + integrity sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA== + dependencies: + "@lerna/package-graph" "3.18.5" + figgy-pudding "^3.5.1" + +"@lerna/resolve-symlink@3.16.0": + version "3.16.0" + resolved "https://registry.npmjs.org/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz#37fc7095fabdbcf317c26eb74e0d0bde8efd2386" + integrity sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ== + dependencies: + fs-extra "^8.1.0" + npmlog "^4.1.2" + read-cmd-shim "^1.0.1" + +"@lerna/rimraf-dir@3.16.5": + version "3.16.5" + resolved "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz#04316ab5ffd2909657aaf388ea502cb8c2f20a09" + integrity sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA== + dependencies: + "@lerna/child-process" "3.16.5" + npmlog "^4.1.2" + path-exists "^3.0.0" + rimraf "^2.6.2" + +"@lerna/run-lifecycle@3.16.2": + version "3.16.2" + resolved "https://registry.npmjs.org/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz#67b288f8ea964db9ea4fb1fbc7715d5bbb0bce00" + integrity sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A== + dependencies: + "@lerna/npm-conf" "3.16.0" + figgy-pudding "^3.5.1" + npm-lifecycle "^3.1.2" + npmlog "^4.1.2" + +"@lerna/run-topologically@3.18.5": + version "3.18.5" + resolved "https://registry.npmjs.org/@lerna/run-topologically/-/run-topologically-3.18.5.tgz#3cd639da20e967d7672cb88db0f756b92f2fdfc3" + integrity sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg== + dependencies: + "@lerna/query-graph" "3.18.5" + figgy-pudding "^3.5.1" + p-queue "^4.0.0" + +"@lerna/run@3.20.0": + version "3.20.0" + resolved "https://registry.npmjs.org/@lerna/run/-/run-3.20.0.tgz#a479f7c42bdf9ebabb3a1e5a2bdebb7a8d201151" + integrity sha512-9U3AqeaCeB7KsGS9oyKNp62s9vYoULg/B4cqXTKZkc+OKL6QOEjYHYVSBcMK9lUXrMjCjDIuDSX3PnTCPxQ2Dw== + dependencies: + "@lerna/command" "3.18.5" + "@lerna/filter-options" "3.20.0" + "@lerna/npm-run-script" "3.16.5" + "@lerna/output" "3.13.0" + "@lerna/profiler" "3.20.0" + "@lerna/run-topologically" "3.18.5" + "@lerna/timer" "3.13.0" + "@lerna/validation-error" "3.13.0" + p-map "^2.1.0" + +"@lerna/symlink-binary@3.17.0": + version "3.17.0" + resolved "https://registry.npmjs.org/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz#8f8031b309863814883d3f009877f82e38aef45a" + integrity sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ== + dependencies: + "@lerna/create-symlink" "3.16.2" + "@lerna/package" "3.16.0" + fs-extra "^8.1.0" + p-map "^2.1.0" + +"@lerna/symlink-dependencies@3.17.0": + version "3.17.0" + resolved "https://registry.npmjs.org/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz#48d6360e985865a0e56cd8b51b308a526308784a" + integrity sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q== + dependencies: + "@lerna/create-symlink" "3.16.2" + "@lerna/resolve-symlink" "3.16.0" + "@lerna/symlink-binary" "3.17.0" + fs-extra "^8.1.0" + p-finally "^1.0.0" + p-map "^2.1.0" + p-map-series "^1.0.0" + +"@lerna/timer@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/timer/-/timer-3.13.0.tgz#bcd0904551db16e08364d6c18e5e2160fc870781" + integrity sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw== + +"@lerna/validation-error@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-3.13.0.tgz#c86b8f07c5ab9539f775bd8a54976e926f3759c3" + integrity sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA== + dependencies: + npmlog "^4.1.2" + +"@lerna/version@3.20.2": + version "3.20.2" + resolved "https://registry.npmjs.org/@lerna/version/-/version-3.20.2.tgz#3709141c0f537741d9bc10cb24f56897bcb30428" + integrity sha512-ckBJMaBWc+xJen0cMyCE7W67QXLLrc0ELvigPIn8p609qkfNM0L0CF803MKxjVOldJAjw84b8ucNWZLvJagP/Q== + dependencies: + "@lerna/check-working-tree" "3.16.5" + "@lerna/child-process" "3.16.5" + "@lerna/collect-updates" "3.20.0" + "@lerna/command" "3.18.5" + "@lerna/conventional-commits" "3.18.5" + "@lerna/github-client" "3.16.5" + "@lerna/gitlab-client" "3.15.0" + "@lerna/output" "3.13.0" + "@lerna/prerelease-id-from-version" "3.16.0" + "@lerna/prompt" "3.18.5" + "@lerna/run-lifecycle" "3.16.2" + "@lerna/run-topologically" "3.18.5" + "@lerna/validation-error" "3.13.0" + chalk "^2.3.1" + dedent "^0.7.0" + load-json-file "^5.3.0" + minimatch "^3.0.4" + npmlog "^4.1.2" + p-map "^2.1.0" + p-pipe "^1.2.0" + p-reduce "^1.0.0" + p-waterfall "^1.0.0" + semver "^6.2.0" + slash "^2.0.0" + temp-write "^3.4.0" + write-json-file "^3.2.0" + +"@lerna/write-log-file@3.13.0": + version "3.13.0" + resolved "https://registry.npmjs.org/@lerna/write-log-file/-/write-log-file-3.13.0.tgz#b78d9e4cfc1349a8be64d91324c4c8199e822a26" + integrity sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A== + dependencies: + npmlog "^4.1.2" + write-file-atomic "^2.3.0" + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -324,6 +1091,11 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + "@nodelib/fs.walk@^1.2.3": version "1.2.4" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" @@ -341,6 +1113,11 @@ is-plain-object "^3.0.0" universal-user-agent "^4.0.0" +"@octokit/plugin-enterprise-rest@^3.6.1": + version "3.6.2" + resolved "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-3.6.2.tgz#74de25bef21e0182b4fa03a8678cd00a4e67e561" + integrity sha512-3wF5eueS5OHQYuAEudkpN+xVeUsg8vYEMMenEzLphUZ7PRZ8OJtDcsreL3ad9zxXmBbaFWzLmFcdob5CLyZftA== + "@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": version "1.2.0" resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.0.tgz#a64d2a9d7a13555570cd79722de4a4d76371baaa" @@ -382,6 +1159,24 @@ once "^1.4.0" universal-user-agent "^4.0.0" +"@octokit/rest@^16.28.4": + version "16.36.0" + resolved "https://registry.npmjs.org/@octokit/rest/-/rest-16.36.0.tgz#99892c57ba632c2a7b21845584004387b56c2cb7" + integrity sha512-zoZj7Ya4vWBK4fjTwK2Cnmu7XBB1p9ygSvTk2TthN6DVJXM4hQZQoAiknWFLJWSTix4dnA3vuHtjPZbExYoCZA== + dependencies: + "@octokit/request" "^5.2.0" + "@octokit/request-error" "^1.0.2" + atob-lite "^2.0.0" + before-after-hook "^2.0.0" + btoa-lite "^1.0.0" + deprecation "^2.0.0" + lodash.get "^4.4.2" + lodash.set "^4.3.2" + lodash.uniq "^4.5.0" + octokit-pagination-methods "^1.1.0" + once "^1.4.0" + universal-user-agent "^4.0.0" + "@octokit/types@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.0.1.tgz#0caf0364e010296265621593ac9a37f40ef75dad" @@ -531,11 +1326,6 @@ dependencies: "@types/node" "*" -"@types/app-root-path@^1.2.4": - version "1.2.4" - resolved "https://registry.npmjs.org/@types/app-root-path/-/app-root-path-1.2.4.tgz#a78b703282b32ac54de768f5512ecc3569919dc7" - integrity sha1-p4twMoKzKsVN52j1US7MNWmRncc= - "@types/babel__core@^7.1.0": version "7.1.2" resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz#608c74f55928033fce18b99b213c16be4b3d114f" @@ -577,11 +1367,6 @@ "@types/connect" "*" "@types/node" "*" -"@types/caller@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@types/caller/-/caller-1.0.0.tgz#21044c8254e95e57c86a2079bd99430d5f892c62" - integrity sha512-zbyHsdYFn5gCQFn+fF7Ad9En1fJdj3o0YP7DPTD9J3at4M9auNfoLrVYH4hFdLfFDhnB0kTZw3RAKp4iD516uw== - "@types/connect@*": version "3.4.32" resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz#aa0e9616b9435ccad02bc52b5b454ffc2c70ba28" @@ -739,11 +1524,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== -"@types/lodash@^4.14.119": - version "4.14.119" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.119.tgz#be847e5f4bc3e35e46d041c394ead8b603ad8b39" - integrity sha512-Z3TNyBL8Vd/M9D9Ms2S3LmFq2sSMzahodD6rCS9V2N44HUMINb75jNkSuwAx7eo2ufqTdfOdtGQpNbieUjPQmw== - "@types/long@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef" @@ -766,11 +1546,6 @@ dependencies: "@types/node" "*" -"@types/node-emoji@^1.8.0": - version "1.8.0" - resolved "https://registry.npmjs.org/@types/node-emoji/-/node-emoji-1.8.0.tgz#6bc88a880cdcb3c165e2828d056db242e8829a8b" - integrity sha512-+LiY4f3HMAgQGjte8Lg4K6xpTR+glwZolVrreU+ShACr6H/IzYN1VQAitHVeQrNKgZeuOegxE3IACh7Jo2qk0w== - "@types/node@*", "@types/node@^10.1.0", "@types/node@^10.12.18": version "10.12.18" resolved "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" @@ -920,6 +1695,15 @@ lodash.unescape "4.0.1" semver "^6.3.0" +"@zkochan/cmd-shim@^3.1.0": + version "3.1.0" + resolved "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" + integrity sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg== + dependencies: + is-windows "^1.0.0" + mkdirp-promise "^5.0.1" + mz "^2.5.0" + JSONStream@^1.0.4, JSONStream@^1.3.4, JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1296,7 +2080,7 @@ app-module-path@^2.2.0: resolved "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= -app-root-path@^2.0.1, app-root-path@^2.1.0: +app-root-path@^2.0.1: version "2.1.0" resolved "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a" integrity sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo= @@ -1351,6 +2135,11 @@ arr-union@^3.1.0: resolved "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-differ@^2.0.3: + version "2.1.0" + resolved "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" + integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== + array-equal@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -1371,7 +2160,7 @@ array-ify@^1.0.0: resolved "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-union@^1.0.1: +array-union@^1.0.1, array-union@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= @@ -1789,6 +2578,11 @@ call-limit@^1.1.1: resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.1.tgz#ef15f2670db3f1992557e2d965abc459e6e358d4" integrity sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ== +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1818,6 +2612,14 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + camelcase-keys@^4.0.0: version "4.2.0" resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" @@ -1827,6 +2629,11 @@ camelcase-keys@^4.0.0: map-obj "^2.0.0" quick-lru "^1.0.0" +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + camelcase@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" @@ -2040,6 +2847,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + clone@^1.0.2: version "1.0.4" resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -2101,7 +2917,7 @@ colors@^1.1.2, colors@^1.3.3: resolved "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== -columnify@~1.5.4: +columnify@^1.5.4, columnify@~1.5.4: version "1.5.4" resolved "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= @@ -2166,7 +2982,17 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -config-chain@^1.1.12: +concat-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" + integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.0.2" + typedarray "^0.0.6" + +config-chain@^1.1.11, config-chain@^1.1.12: version "1.1.12" resolved "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== @@ -2209,6 +3035,38 @@ conventional-changelog-angular@^5.0.0: compare-func "^1.3.1" q "^1.5.1" +conventional-changelog-angular@^5.0.3: + version "5.0.6" + resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz#269540c624553aded809c29a3508fdc2b544c059" + integrity sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA== + dependencies: + compare-func "^1.3.1" + q "^1.5.1" + +conventional-changelog-core@^3.1.6: + version "3.2.3" + resolved "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb" + integrity sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ== + dependencies: + conventional-changelog-writer "^4.0.6" + conventional-commits-parser "^3.0.3" + dateformat "^3.0.0" + get-pkg-repo "^1.0.0" + git-raw-commits "2.0.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^2.0.3" + lodash "^4.2.1" + normalize-package-data "^2.3.5" + q "^1.5.1" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" + through2 "^3.0.0" + +conventional-changelog-preset-loader@^2.1.1: + version "2.3.0" + resolved "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz#580fa8ab02cef22c24294d25e52d7ccd247a9a6a" + integrity sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ== + conventional-changelog-writer@^4.0.0: version "4.0.2" resolved "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.2.tgz#eb493ed84269e7a663da36e49af51c54639c9a67" @@ -2225,6 +3083,22 @@ conventional-changelog-writer@^4.0.0: split "^1.0.0" through2 "^2.0.0" +conventional-changelog-writer@^4.0.6: + version "4.0.11" + resolved "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4" + integrity sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw== + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^2.0.2" + dateformat "^3.0.0" + handlebars "^4.4.0" + json-stringify-safe "^5.0.1" + lodash "^4.17.15" + meow "^5.0.0" + semver "^6.0.0" + split "^1.0.0" + through2 "^3.0.0" + conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz#55a135de1802f6510b6758e0a6aa9e0b28618db3" @@ -2233,19 +3107,54 @@ conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.1: is-subset "^0.1.1" modify-values "^1.0.0" +conventional-commits-filter@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz#f122f89fbcd5bb81e2af2fcac0254d062d1039c1" + integrity sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ== + dependencies: + lodash.ismatch "^4.4.0" + modify-values "^1.0.0" + conventional-commits-parser@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" integrity sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg== dependencies: JSONStream "^1.0.4" - is-text-path "^1.0.0" - lodash "^4.2.1" - meow "^4.0.0" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-commits-parser@^3.0.3: + version "3.0.8" + resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710" + integrity sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^5.0.0" split2 "^2.0.0" - through2 "^2.0.0" + through2 "^3.0.0" trim-off-newlines "^1.0.0" +conventional-recommended-bump@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz#5af63903947b6e089e77767601cb592cabb106ba" + integrity sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ== + dependencies: + concat-stream "^2.0.0" + conventional-changelog-preset-loader "^2.1.1" + conventional-commits-filter "^2.0.2" + conventional-commits-parser "^3.0.3" + git-raw-commits "2.0.0" + git-semver-tags "^2.0.3" + meow "^4.0.0" + q "^1.5.1" + convert-source-map@^1.1.0, convert-source-map@^1.4.0: version "1.6.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" @@ -2345,7 +3254,7 @@ cosmiconfig@^5.0.1, cosmiconfig@^5.0.7: js-yaml "^3.9.0" parse-json "^4.0.0" -cosmiconfig@^5.2.1: +cosmiconfig@^5.1.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -2428,6 +3337,13 @@ cyclist@~0.2.2: resolved "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= + dependencies: + number-is-nan "^1.0.0" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2500,7 +3416,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -2608,7 +3524,7 @@ destroy@~1.0.4: resolved "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-indent@~5.0.0: +detect-indent@^5.0.0, detect-indent@~5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= @@ -2649,6 +3565,13 @@ diff@^3.1.0: resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +dir-glob@^2.2.2: + version "2.2.2" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== + dependencies: + path-type "^3.0.0" + dir-glob@^3.0.0, dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -2677,7 +3600,7 @@ dot-prop@^3.0.0: dependencies: is-obj "^1.0.0" -dot-prop@^4.1.0: +dot-prop@^4.1.0, dot-prop@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== @@ -2711,6 +3634,11 @@ duplexer3@^0.1.4: resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= + duplexify@^3.4.2, duplexify@^3.6.0: version "3.6.1" resolved "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125" @@ -2798,6 +3726,11 @@ env-paths@^1.0.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-1.0.0.tgz#4168133b42bb05c38a35b1ae4397c8298ab369e0" integrity sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA= +envinfo@^7.3.1: + version "7.5.0" + resolved "https://registry.npmjs.org/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" + integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== + err-code@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" @@ -3195,11 +4128,6 @@ extsprintf@^1.2.0: resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -faker@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz#1e45bbbecc6774b3c195fad2835109c6d748cc3f" - integrity sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8= - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -3210,6 +4138,18 @@ fast-diff@^1.1.2: resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-glob@^2.2.6: + version "2.2.7" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + fast-glob@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.0.tgz#77375a7e3e6f6fc9b18f061cddd28b8d1eec75ae" @@ -3462,9 +4402,9 @@ fs-capacitor@^1.0.0: resolved "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-1.0.1.tgz#ff9dbfa14dfaf4472537720f19c3088ed9278df0" integrity sha512-XdZK0Q78WP29Vm3FGgJRhRhrBm51PagovzWtW2kJ3Q6cYJbGtZqWSGTSPwvtEkyjIirFd7b8Yes/dpOYjt4RRQ== -fs-extra@^8.0.0: +fs-extra@^8.0.0, fs-extra@^8.1.0: version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== dependencies: graceful-fs "^4.2.0" @@ -3606,6 +4546,27 @@ get-own-enumerable-property-symbols@^3.0.0: resolved "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg== +get-pkg-repo@^1.0.0: + version "1.4.0" + resolved "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0= + dependencies: + hosted-git-info "^2.1.4" + meow "^3.3.0" + normalize-package-data "^2.3.0" + parse-github-repo-url "^1.3.0" + through2 "^2.0.0" + +get-port@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" + integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= + get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" @@ -3659,13 +4620,75 @@ git-log-parser@^1.2.0: through2 "~2.0.0" traverse "~0.6.6" -glob-parent@^5.1.0: +git-raw-commits@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" + integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= + dependencies: + gitconfiglocal "^1.0.0" + pify "^2.3.0" + +git-semver-tags@^2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-2.0.3.tgz#48988a718acf593800f99622a952a77c405bfa34" + integrity sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA== + dependencies: + meow "^4.0.0" + semver "^6.0.0" + +git-up@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/git-up/-/git-up-4.0.1.tgz#cb2ef086653640e721d2042fe3104857d89007c0" + integrity sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw== + dependencies: + is-ssh "^1.3.0" + parse-url "^5.0.0" + +git-url-parse@^11.1.2: + version "11.1.2" + resolved "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.1.2.tgz#aff1a897c36cc93699270587bea3dbcbbb95de67" + integrity sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ== + dependencies: + git-up "^4.0.0" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= + dependencies: + ini "^1.3.2" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.0.0, glob-parent@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== dependencies: is-glob "^4.0.1" +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -3751,6 +4774,20 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +globby@^9.2.0: + version "9.2.0" + resolved "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" + integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^1.0.2" + dir-glob "^2.2.2" + fast-glob "^2.2.6" + glob "^7.1.3" + ignore "^4.0.3" + pify "^4.0.1" + slash "^2.0.0" + gluegun@^3.3.1: version "3.3.1" resolved "https://registry.npmjs.org/gluegun/-/gluegun-3.3.1.tgz#0d3a709676a3219ec16906f94bd8c560e843017f" @@ -3961,6 +4998,17 @@ handlebars@^4.1.2: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.4.0: + version "4.6.0" + resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.6.0.tgz#33af6c3eda930d7a924f5d8f1c6d8edc3180512e" + integrity sha512-i1ZUP7Qp2JdkMaFon2a+b0m5geE8Z4ZTLaGkgrObkEd+OkUKyRbRWw4KxuFCoHfdETSY1yf9/574eVoNSiK7pw== + dependencies: + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -3996,7 +5044,7 @@ has-symbols@^1.0.0: resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= -has-unicode@^2.0.0, has-unicode@~2.0.1: +has-unicode@^2.0.0, has-unicode@^2.0.1, has-unicode@~2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -4196,7 +5244,7 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^4.0.6: +ignore@^4.0.3, ignore@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== @@ -4254,6 +5302,13 @@ imurmurhash@^0.1.4: resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= + dependencies: + repeating "^2.0.0" + indent-string@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" @@ -4287,7 +5342,7 @@ inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -4306,6 +5361,25 @@ init-package-json@^1.10.3: validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" +inquirer@^6.2.0: + version "6.5.2" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + inquirer@^6.2.2: version "6.3.1" resolved "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" @@ -4481,11 +5555,18 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^2.1.1: +is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= + dependencies: + number-is-nan "^1.0.0" + is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -4503,6 +5584,13 @@ is-generator-fn@^2.0.0: resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + is-glob@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" @@ -4573,7 +5661,7 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" -is-plain-obj@^1.1.0: +is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= @@ -4619,6 +5707,13 @@ is-retry-allowed@^1.0.0: resolved "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= +is-ssh@^1.3.0: + version "1.3.1" + resolved "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.1.tgz#f349a8cadd24e65298037a522cf7520f2e81a0f3" + integrity sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg== + dependencies: + protocols "^1.1.0" + is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -4641,7 +5736,7 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.0" -is-text-path@^1.0.0: +is-text-path@^1.0.0, is-text-path@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= @@ -4658,7 +5753,7 @@ is-utf8@^0.2.0: resolved "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.2: +is-windows@^1.0.0, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -5320,6 +6415,30 @@ left-pad@^1.3.0: resolved "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== +lerna@^3.20.1: + version "3.20.2" + resolved "https://registry.npmjs.org/lerna/-/lerna-3.20.2.tgz#abf84e73055fe84ee21b46e64baf37b496c24864" + integrity sha512-bjdL7hPLpU3Y8CBnw/1ys3ynQMUjiK6l9iDWnEGwFtDy48Xh5JboR9ZJwmKGCz9A/sarVVIGwf1tlRNKUG9etA== + dependencies: + "@lerna/add" "3.20.0" + "@lerna/bootstrap" "3.20.0" + "@lerna/changed" "3.20.0" + "@lerna/clean" "3.20.0" + "@lerna/cli" "3.18.5" + "@lerna/create" "3.18.5" + "@lerna/diff" "3.18.5" + "@lerna/exec" "3.20.0" + "@lerna/import" "3.18.5" + "@lerna/info" "3.20.0" + "@lerna/init" "3.18.5" + "@lerna/link" "3.18.5" + "@lerna/list" "3.20.0" + "@lerna/publish" "3.20.2" + "@lerna/run" "3.20.0" + "@lerna/version" "3.20.2" + import-local "^2.0.0" + npmlog "^4.1.2" + leven@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -5575,6 +6694,17 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +load-json-file@^5.3.0: + version "5.3.0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" + integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== + dependencies: + graceful-fs "^4.1.15" + parse-json "^4.0.0" + pify "^4.0.1" + strip-bom "^3.0.0" + type-fest "^0.3.0" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -5634,6 +6764,11 @@ lodash._createset@~4.0.0: resolved "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + lodash._root@~3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" @@ -5679,6 +6814,11 @@ lodash.get@^4.4.2: resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= +lodash.ismatch@^4.4.0: + version "4.4.0" + resolved "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" + integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= + lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" @@ -5744,6 +6884,21 @@ lodash.startcase@^4.4.0: resolved "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" integrity sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg= +lodash.template@^4.0.2, lodash.template@^4.5.0: + version "4.5.0" + resolved "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.toarray@^4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" @@ -5804,9 +6959,9 @@ lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5 resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -lodash@^4.17.13, lodash@^4.17.15: +lodash@^4.17.12, lodash@^4.17.15: version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== log-symbols@^1.0.2: @@ -5933,7 +7088,7 @@ map-cache@^0.2.2: resolved "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= -map-obj@^1.0.0: +map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= @@ -6045,6 +7200,22 @@ mem@^4.0.0: mimic-fn "^1.0.0" p-is-promise "^1.1.0" +meow@^3.3.0: + version "3.7.0" + resolved "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + meow@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" @@ -6060,6 +7231,21 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" +meow@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -6240,7 +7426,14 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*, mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -6279,6 +7472,16 @@ ms@^2.0.0, ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +multimatch@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" + integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA== + dependencies: + array-differ "^2.0.3" + array-union "^1.0.2" + arrify "^1.0.1" + minimatch "^3.0.4" + mute-stream@0.0.7: version "0.0.7" resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -6289,7 +7492,7 @@ mute-stream@~0.0.4: resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.4.0: +mz@^2.4.0, mz@^2.5.0: version "2.7.0" resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== @@ -6364,7 +7567,7 @@ nice-try@^1.0.4: resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-emoji@^1.4.1, node-emoji@^1.8.1: +node-emoji@^1.4.1: version "1.8.1" resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz#6eec6bfb07421e2148c75c6bba72421f8530a826" integrity sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg== @@ -6385,6 +7588,11 @@ node-fetch@2.3.0, node-fetch@^2.1.2, node-fetch@^2.2.0, node-fetch@^2.3.0: resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== +node-fetch@^2.5.0: + version "2.6.0" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== + node-gyp@^5.0.2, node-gyp@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.0.5.tgz#f6cf1da246eb8c42b097d7cd4d6c3ce23a4163af" @@ -6487,7 +7695,7 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-package-data@^2.5.0: +normalize-package-data@^2.3.0, normalize-package-data@^2.3.5, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -6504,6 +7712,11 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" +normalize-url@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== + normalize-url@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.1.0.tgz#307e74c87473efa81969ad1b4bb91f1990178904" @@ -6534,9 +7747,9 @@ npm-install-checks@^3.0.2: dependencies: semver "^2.3.0 || 3.x || 4 || 5" -npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.4: +npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.2, npm-lifecycle@^3.1.4: version "3.1.4" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz#de6975c7d8df65f5150db110b57cce498b0b604c" + resolved "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz#de6975c7d8df65f5150db110b57cce498b0b604c" integrity sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A== dependencies: byline "^5.0.0" @@ -6581,6 +7794,14 @@ npm-packlist@^1.1.12, npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" +npm-packlist@^1.4.4: + version "1.4.7" + resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" + integrity sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-packlist@^1.4.6: version "1.4.6" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" @@ -7073,6 +8294,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-map-series@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" + integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= + dependencies: + p-reduce "^1.0.0" + p-map@^1.1.1: version "1.2.0" resolved "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" @@ -7083,6 +8311,23 @@ p-map@^2.0.0: resolved "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz#be18c5a5adeb8e156460651421aceca56c213a50" integrity sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w== +p-map@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== + +p-pipe@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" + integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= + +p-queue@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346" + integrity sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg== + dependencies: + eventemitter3 "^3.1.0" + p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" @@ -7111,6 +8356,13 @@ p-try@^2.0.0: resolved "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== +p-waterfall@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00" + integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA= + dependencies: + p-reduce "^1.0.0" + package-json@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" @@ -7182,6 +8434,11 @@ parent-require@^1.0.0: resolved "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977" integrity sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc= +parse-github-repo-url@^1.3.0: + version "1.4.1" + resolved "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" + integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= + parse-github-url@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" @@ -7212,6 +8469,24 @@ parse-json@^5.0.0: json-parse-better-errors "^1.0.1" lines-and-columns "^1.1.6" +parse-path@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/parse-path/-/parse-path-4.0.1.tgz#0ec769704949778cb3b8eda5e994c32073a1adff" + integrity sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA== + dependencies: + is-ssh "^1.3.0" + protocols "^1.4.0" + +parse-url@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/parse-url/-/parse-url-5.0.1.tgz#99c4084fc11be14141efa41b3d117a96fcb9527f" + integrity sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg== + dependencies: + is-ssh "^1.3.0" + normalize-url "^3.3.0" + parse-path "^4.0.0" + protocols "^1.4.0" + parse5@4.0.0, parse5@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -7227,6 +8502,11 @@ pascalcase@^0.1.1: resolved "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -7393,7 +8673,7 @@ picomatch@^2.0.5: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5" integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA== -pify@^2.0.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= @@ -7503,7 +8783,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.18.2: +prettier@~1.18.2: version "1.18.2" resolved "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== @@ -7588,6 +8868,11 @@ protobufjs@^6.8.6: "@types/node" "^10.1.0" long "^4.0.0" +protocols@^1.1.0, protocols@^1.4.0: + version "1.4.7" + resolved "https://registry.npmjs.org/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" + integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== + protoduck@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" @@ -7791,9 +9076,9 @@ read-package-json@^2.1.0: optionalDependencies: graceful-fs "^4.1.2" -read-package-tree@^5.3.1: +read-package-tree@^5.1.6, read-package-tree@^5.3.1: version "5.3.1" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" + resolved "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== dependencies: read-package-json "^2.0.0" @@ -7900,9 +9185,9 @@ readable-stream@1.1.x, readable-stream@~1.1.10: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^3.4.0: +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.4.0: version "3.4.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== dependencies: inherits "^2.0.3" @@ -7946,6 +9231,14 @@ realpath-native@^1.1.0: dependencies: util.promisify "^1.0.0" +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + redent@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" @@ -8022,6 +9315,13 @@ repeat-string@^1.6.1: resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" @@ -8325,9 +9625,9 @@ semver@^5.6.0: resolved "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== -semver@^5.7.1: +semver@^5.7.0, semver@^5.7.1: version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== semver@^6.0.0, semver@^6.1.1: @@ -8335,7 +9635,7 @@ semver@^6.0.0, semver@^6.1.1: resolved "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== -semver@^6.3.0: +semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -8409,6 +9709,13 @@ sha@^3.0.0: dependencies: graceful-fs "^4.1.2" +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -8556,6 +9863,13 @@ socks@~2.2.0: ip "^1.1.5" smart-buffer "^4.0.1" +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + dependencies: + is-plain-obj "^1.0.0" + sorted-object@~2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz#7d631f4bd3a798a24af1dffcfbfe83337a5df5fc" @@ -8895,6 +10209,13 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + dependencies: + get-stdin "^4.0.1" + strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" @@ -8905,6 +10226,15 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strong-log-transformer@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" + integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== + dependencies: + duplexer "^0.1.1" + minimist "^1.2.0" + through "^2.3.4" + subscriptions-transport-ws@^0.9.11: version "0.9.15" resolved "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.15.tgz#68a8b7ba0037d8c489fb2f5a102d1494db297d0d" @@ -9000,7 +10330,7 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" -tar@^4.4.10, tar@^4.4.12, tar@^4.4.13: +tar@^4.4.10, tar@^4.4.12, tar@^4.4.13, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -9018,6 +10348,18 @@ temp-dir@^1.0.0: resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= +temp-write@^3.4.0: + version "3.4.0" + resolved "https://registry.npmjs.org/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" + integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= + dependencies: + graceful-fs "^4.1.2" + is-stream "^1.1.0" + make-dir "^1.0.0" + pify "^3.0.0" + temp-dir "^1.0.0" + uuid "^3.0.1" + tempy@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/tempy/-/tempy-0.3.0.tgz#6f6c5b295695a16130996ad5ab01a8bd726e8bf8" @@ -9081,7 +10423,14 @@ through2@^2.0.0, through2@^2.0.1, through2@^2.0.2, through2@~2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@2, "through@>=2.2.7 <3", through@^2.3.6: +through2@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: version "2.3.8" resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -9178,6 +10527,11 @@ traverse@~0.6.6: resolved "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + trim-newlines@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" @@ -9253,9 +10607,9 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-fest@^0.3.1: +type-fest@^0.3.0, type-fest@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== type-fest@^0.6.0: @@ -9415,6 +10769,11 @@ unzip-response@^2.0.1: resolved "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= +upath@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + update-notifier@^2.3.0, update-notifier@^2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" @@ -9490,17 +10849,17 @@ utils-merge@1.0.1: resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= +uuid@^3.0.1, uuid@^3.3.3: + version "3.3.3" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + uuid@^3.1.0, uuid@^3.3.2: version "3.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== -uuid@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" - integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== - -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: +validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== @@ -9717,15 +11076,47 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^2.4.3: +write-file-atomic@^2.4.2, write-file-atomic@^2.4.3: version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" signal-exit "^3.0.2" +write-json-file@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" + integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + pify "^3.0.0" + sort-keys "^2.0.0" + write-file-atomic "^2.0.0" + +write-json-file@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" + integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.15" + make-dir "^2.1.0" + pify "^4.0.1" + sort-keys "^2.0.0" + write-file-atomic "^2.4.2" + +write-pkg@^3.1.0: + version "3.2.0" + resolved "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" + integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== + dependencies: + sort-keys "^2.0.0" + write-json-file "^2.2.0" + write@1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" @@ -9809,7 +11200,7 @@ yargonaut@^1.1.2: figlet "^1.1.1" parent-require "^1.0.0" -yargs-parser@10.x: +yargs-parser@10.x, yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== @@ -9949,6 +11340,23 @@ yargs@^14.0.0: y18n "^4.0.0" yargs-parser "^15.0.0" +yargs@^14.2.2: + version "14.2.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" + integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA== + dependencies: + cliui "^5.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^15.0.0" + yargs@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/yargs/-/yargs-5.0.0.tgz#3355144977d05757dbb86d6e38ec056123b3a66e"