1 | {"version":3,"sources":["helpers/args-extractors.ts","helpers/typescript.builder.ts","helpers/set-config.ts","helpers/basic.template.ts","app/app.tokens.ts","helpers/parse-ast.ts","helpers/dynamic-schema/mutators/build-arguments.ts","helpers/lazy-types.ts","helpers/parse-types.schema.ts","helpers/dynamic-schema/mutators/build-types.ts","helpers/isFunction.ts","helpers/get-first-item.ts","helpers/parse-args-schema.ts","helpers/dynamic-schema/mutators/build-resolvers.ts","helpers/transpiler-cache.ts","helpers/transpile-and-load.ts","helpers/dynamic-schema/mutators/build-externals.ts","helpers/advanced-schema.ts","helpers/basic-schema.ts","helpers/is-invalid-path.ts","helpers/traverse-map.ts","helpers/load-yml.ts","helpers/load-file.ts","helpers/traverse/test.ts","helpers/is-array.ts","helpers/traverse/traverse.ts","helpers/component.parser.ts","helpers/react-to-changes.ts","helpers/watch-bundles.ts","helpers/is-runner-installed.ts","app/core/services/serve-components.service.ts","app/core/core.module.ts","app/client/types/client-view.type.ts","app/client/types/client.type.ts","app/client/types/status.type.ts","app/client/client.controller.ts","app/client/client.module.ts","app/app.module.ts","helpers/self-child.ts","main.ts"],"names":[],"mappings":";AACa,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IADA,QAAA,SAAW,CAAA,GAAK,QAAQ,KAAK,WAAW,SAAS,IACjD,QAAA,cAAgB,EAAC,EAAG,GAAU,EAAM,EAAO,CAAA,GAAK,MACvD,GAAA,QAAQ,KAAK,WAAW,SAAS,GAAI,CACjC,MAAA,EAAwB,QAAQ,KAAK,QAAQ,KAAK,QAAQ,GAAK,GACjE,OAAC,EAGD,EAAsB,SAAS,MAC1B,EAEF,EAAK,GALH,EAOJ,OAAA;;ACUI,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAtBb,MAAA,EAAA,QAAA,iBAEa,QAAA,oBAAsB,EAAC,EAAkB,GAAI,IACnD,EAAM,OAGJ,IAAI,QAAQ,CAAC,EAAS,KACrB,MAAA,EAAQ,EAAA,MAAM,MAAO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AA,EAAA,UAAA,OAAA,EAAA,YA/DO,IAAA,EATJ,EAAA,UAAU,IAAI,cAAe,CAC3B,gBAAgB,GACP,EAEH,eAAe,EAAkB,EAAQ,GAoEpD,OAAA,EAAA,UAAA,OAAA,EAAA,YAlEc,OAAA,OAIP,IACF,QAAa,EAAA,UAAU,MACvB,MAAO,IACH,MAAA,EAAU,GACZ,GAAA,GAAQ,EAAK,SAAU,CACnB,MAAA,QAA0B,EAAA,mBAC9B,EAAK,SAAS,IAAI,IAAS,CAAE,KAAA,KAC7B,WAEF,EAAQ,QACH,EAAkB,IAAI,GAAK,EAAA,aAAa,QAAQ,EAAE,mBAGrD,GAAQ,EAAK,oBACT,EAAA,wBAAwB,EAAK,cAErC,EAAA,mBAAmB,EAAA,UAAW,IACzB,EACH,EAAA,WAAW,QAAQ,CACjB,QAAS,CACP,YAAa,EAAA,cAAc,YAAY,EAAM,GACrC,SAAN,GAEF,qBAAqB,EACrB,aAAc,YACd,gBAAiB,CACf,YAAa,cAGjB,OAAQ,CACN,eAAgB,eAElB,OAAQ,CACN,WAAY,EAAA,cAAc,YAAY,GACtC,KAAM,CACJ,KAAM,EAAA,cAAc,SAAU,IAAM,GAAK,OAAO,IAChD,OAAQ,CACN,KAAM,CACJ,OAAQ,CAAC,KACT,kBAAmB,CACjB,OACA,aACA,SACA,kBACA,kBACA,gCACA,8BACA,iCACA,SACA,aACA,SACA,yBAOX,UAAU,IAAM,QAAQ,IAAI,WAAY,QAAQ,IAAI,KAAK,YAG9D","file":"main.js","sourceRoot":"../src","sourcesContent":["export const includes = i => process.argv.toString().includes(i);\nexport const nextOrDefault = (i, fb: any = true, type = p => p) => {\n if (process.argv.toString().includes(i)) {\n const isNextArgumentPresent = process.argv[process.argv.indexOf(i) + 1];\n if (!isNextArgumentPresent) {\n return fb;\n }\n if (isNextArgumentPresent.includes('--')) {\n return fb;\n }\n return type(isNextArgumentPresent);\n }\n return fb;\n};\n","import { spawn } from 'child_process';\n\nexport const TranspileTypescript = (paths: string[] = [], outDir: string) => {\n if (!paths.length) {\n return Promise.resolve(0)\n }\n return new Promise((resolve, reject) => {\n const child = spawn('npx', [\n 'gapi',\n 'build',\n '--glob',\n `${paths.toString()}`,\n '--outDir',\n outDir\n ]);\n // child.stdout.pipe(process.stdout);\n child.stderr.pipe(process.stderr);\n child.on('close', (code: number) => resolve(code));\n });\n};\n\n\nexport const TranspileTypescriptParcel = (paths: string[] = [], outDir: string) => {\n if (!paths.length) {\n return Promise.resolve(0)\n }\n return new Promise((resolve) => {\n const child = spawn('npx', [\n 'parcel',\n 'build',\n `${paths.join(' ')}`,\n '--out-dir',\n outDir\n ]);\n child.stdout.pipe(process.stdout);\n child.stderr.pipe(process.stderr);\n child.on('close', (code: number) => resolve(code));\n });\n};","import { promisify } from 'util';\nimport { exists, Stats, writeFile, stat, readFile, unlink, readFileSync } from 'fs';\nimport { TranspileTypescript } from './typescript.builder';\nimport { join } from 'path';\nimport { load } from 'js-yaml';\n\nexport async function getConfig(configFilename: string) {\n let config;\n try {\n config = require('esm')(module)(\n join(process.cwd(), `${configFilename}.js`)\n );\n // console.log('JS Config', config)\n } catch (e) {}\n if (await promisify(exists)(`./${configFilename}.yml`)) {\n const file = readFileSync(`./${configFilename}.yml`, {encoding: 'utf-8'})\n config = load(file);\n // console.log('YML Config', config)\n }\n if (await promisify(exists)(`./${configFilename}.ts`)) {\n // console.log('Typescript Config', config)\n const isMigrateTempConfigExists = await promisify(exists)(\n './.gj/config.temp'\n );\n const TranspileAndWriteTemp = async (stats: Stats) => {\n await TranspileTypescript([`/${configFilename}.ts`], './.gj');\n // console.log('Transpile complete!');\n await promisify(writeFile)(\n './.gj/config.temp',\n stats.mtime.toISOString(),\n { encoding: 'utf-8' }\n );\n };\n const stats = await promisify(stat)(`./${configFilename}.ts`);\n if (isMigrateTempConfigExists) {\n const temp = await promisify(readFile)('./.gj/config.temp', {\n encoding: 'utf-8'\n });\n if (new Date(temp).toISOString() !== stats.mtime.toISOString()) {\n // console.log(`${configFilename} configuration is new transpiling...`);\n await TranspileAndWriteTemp(stats);\n }\n } else {\n // console.log(`Transpile ${configFilename}.ts...`);\n await TranspileAndWriteTemp(stats);\n }\n config = require(join(process.cwd(), `./.gj`, `${configFilename}.js`));\n\n try {\n await promisify(unlink)(join('./.gj', `${configFilename}.js.map`));\n } catch (e) {}\n }\n try {\n config = JSON.parse(\n await promisify(readFile)(join(process.cwd(), `${configFilename}.json`), {\n encoding: 'utf-8'\n })\n );\n // console.log('Json Config', config)\n } catch (e) {}\n\n return config;\n}\n","export const basicTemplate = {\n $mode: 'basic',\n $types: {\n user: {\n pesho: 'string'\n }\n },\n $schema: './schema.graphql',\n $resolvers: {\n findUser: {\n gosho: 'omg',\n pesho: 515151,\n pesho2: 515151,\n pesho3: 515151,\n dadadada: 515151,\n pesho4: 515151,\n pesho5: [515151],\n pesho6: ['515151']\n },\n findUser2: {\n gosho: 'omg',\n pesho: 22,\n pesho2: 515151,\n pesho3: 515151,\n pesho4: 515151,\n pesho5: 515151\n }\n }\n};\n","import { InjectionToken } from '@rxdi/core';\nimport { GraphQLInputFieldConfigMap } from 'graphql';\nimport { IClientViewType } from './@introspection';\n\nfunction strEnum<T extends string>(o: Array<T>): { [K in T]: K } {\n return o.reduce((res, key) => {\n res[key] = key;\n return res;\n }, Object.create(null));\n}\n\nexport const BooleanUnion = strEnum([\n 'Boolean',\n 'Bool',\n 'boolean',\n 'Boolean[]',\n 'boolean[]',\n '[Boolean]',\n '[Bool]',\n 'boolean!',\n 'Boolean!',\n '[Boolean]!',\n 'boolean[]!',\n 'Boolean[]!'\n]);\n\nexport const StringUnion = strEnum([\n 'String',\n 'string',\n 'String[]',\n 'string[]',\n '[String]',\n 'string!',\n 'String!',\n 'String[]!',\n 'string[]!',\n '[String]!'\n]);\n\nexport const IntegerUnion = strEnum([\n 'Int',\n 'integer',\n 'number',\n 'Number',\n 'Num',\n 'int',\n 'Number[]',\n 'number[]',\n '[Number]',\n 'number!',\n '[Int]',\n 'Number!',\n 'number[]!',\n 'Number[]!',\n '[Number]!',\n '[Int]!'\n]);\n\nexport type BooleanUnion = keyof typeof BooleanUnion;\nexport type StringUnion = keyof typeof StringUnion;\nexport type IntegerUnion = keyof typeof IntegerUnion;\nexport type GlobalUnion = BooleanUnion | StringUnion | IntegerUnion;\nexport interface PredictedTranspilation {\n originalPath: string;\n filePath: string;\n transpilerPath: string;\n newPath: string;\n link: string;\n}\n\nexport const Roots = {\n booleanNode: BooleanUnion,\n stringNode: StringUnion,\n numberNode: IntegerUnion\n};\n\nexport type Args = { [key: string]: GlobalUnion };\nexport type Externals = {\n map: string;\n file: string;\n module?: any;\n transpiledFile?: string;\n};\n\nexport interface ResolverDependencies {\n provide: string;\n map: string;\n container: any;\n}\n\nexport interface Resolver {\n [key: string]: {\n type: string;\n args: Args;\n resolve: any;\n method:\n | 'Query'\n | 'Mutation'\n | 'Subscription'\n | 'query'\n | 'mutation'\n | 'subscription';\n deps?: ResolverDependencies[];\n };\n}\n\nexport interface ConfigViews {\n [key: string]: IClientViewType;\n}\nexport interface Config {\n $mode: 'basic' | 'advanced';\n $imports?: string[];\n $components?: string[] | PredictedTranspilation[];\n $types: { [key: string]: Args };\n $resolvers: Resolver;\n $directives: string;\n $externals: Externals[];\n $args: any;\n $views?: ConfigViews;\n _meta: { [key: string]: string }; // Folder mapping for every module\n}\n\nexport const TypesToken = new InjectionToken<\n Map<string, GraphQLInputFieldConfigMap>\n>('(@rxdi/graphqj): types-token');\nexport const ArgumentsToken = new InjectionToken<Map<string, Args>>(\n '(@rxdi/graphqj): arguments-token'\n);\nexport const ResolversToken = new InjectionToken<Map<string, Args>>(\n '(@rxdi/graphqj): resolvers-token'\n);\nexport const GuardsToken = new InjectionToken<Map<string, Args>>(\n '(@rxdi/graphqj): resolvers-token'\n);\nexport const IsBundlerInstalled = new InjectionToken<{\n parcel: boolean;\n gapi: boolean;\n}>('(@rxdi/graphqj): is-bundler-installed');\nexport const Config = new InjectionToken<Config>();\n\nexport type TypesToken = Map<string, Args>;\nexport type ArgumentsToken = Map<string, Args>;\nexport type ResolversToken = Map<string, Args>;\nexport type GuardsToken = Map<string, Args>;\nexport type IsBundlerInstalled = { parcel: boolean; gapi: boolean };\n","import {\n GraphQLString,\n GraphQLBoolean,\n GraphQLInt,\n GraphQLNonNull,\n GraphQLList,\n GraphQLScalarType,\n GraphQLType\n} from 'graphql';\nimport { GlobalUnion } from '../app/app.tokens';\n\nexport function ParseArgs(ck: GlobalUnion) {\n let type: { type: GraphQLScalarType | GraphQLList<GraphQLType> };\n /* Basic */\n if (ck === 'string' || ck === 'String') {\n type = { type: GraphQLString };\n }\n\n if (ck === 'boolean' || ck === 'Boolean' || ck === 'Bool') {\n type = { type: GraphQLBoolean };\n }\n\n if (ck === 'number' || ck === 'Number' || ck === 'Int') {\n type = { type: GraphQLInt };\n }\n\n /* False negative */\n if (ck === 'string!' || ck === 'String!') {\n type = { type: new GraphQLNonNull(GraphQLString) };\n }\n\n if (ck === 'boolean!' || ck === 'Boolean!') {\n type = { type: new GraphQLNonNull(GraphQLBoolean) };\n }\n\n if (ck === 'number!' || ck === 'Number!' || ck === 'Int') {\n type = { type: new GraphQLNonNull(GraphQLInt) };\n }\n\n /* Array */\n if (ck === 'string[]' || ck === 'String[]' || ck === '[String]') {\n type = { type: new GraphQLList(GraphQLString) };\n }\n\n if (\n ck === 'boolean[]' ||\n ck === 'Boolean[]' ||\n ck === '[Boolean]' ||\n ck === '[Bool]'\n ) {\n type = { type: new GraphQLList(GraphQLBoolean) };\n }\n\n if (\n ck === 'number[]' ||\n ck === 'Number[]' ||\n ck === '[Number]' ||\n ck === '[Int]'\n ) {\n type = { type: new GraphQLList(GraphQLInt) };\n }\n\n /* False negative Array */\n if (ck === 'string[]!' || ck === 'String[]!' || ck === '[String]!') {\n type = {\n type: new GraphQLNonNull(new GraphQLList(GraphQLString))\n };\n }\n\n if (\n ck === 'boolean[]!' ||\n ck === 'Boolean[]!' ||\n ck === '[Boolean]!' ||\n ck === '[Bool]'\n ) {\n type = {\n type: new GraphQLNonNull(new GraphQLList(GraphQLBoolean))\n };\n }\n\n if (\n ck === 'number[]!' ||\n ck === 'Number[]!' ||\n ck === '[Number]!' ||\n ck === '[Int]!'\n ) {\n type = {\n type: new GraphQLNonNull(new GraphQLList(GraphQLInt))\n };\n }\n return type;\n}\n","import { Config, TypesToken } from '../../../app/app.tokens';\nimport { ParseArgs } from '../../parse-ast';\nimport { Container } from '@rxdi/core';\n\nexport function buildArguments(config: Config) {\n Object.keys(config.$args).forEach(reusableArgumentKey => {\n const args = {};\n Object.keys(config.$args[reusableArgumentKey]).forEach(o => {\n args[o] = ParseArgs(config.$args[reusableArgumentKey][o]);\n Container.get(TypesToken).set(reusableArgumentKey, args);\n });\n });\n}\n","export const lazyTypes = new Map()","import {\n GraphQLString,\n GraphQLInt,\n GraphQLList,\n GraphQLScalarType,\n GraphQLType\n} from 'graphql';\nimport { GlobalUnion } from '../app/app.tokens';\nimport { Container, InjectionToken } from '@rxdi/core';\nimport { of, isObservable } from 'rxjs';\nimport { lazyTypes } from './lazy-types';\n\nexport function ParseTypesSchema(\n ck: GlobalUnion,\n key: string,\n parentType: string,\n interceptors: InjectionToken<(...args: any[]) => any>[],\n types: { [key: string]: any }\n) {\n let type: { type: GraphQLScalarType | GraphQLList<GraphQLType> };\n if (ck === 'string' || ck === 'String') {\n type = { type: GraphQLString };\n }\n\n if (ck === 'boolean' || ck === 'Boolean') {\n type = { type: GraphQLString };\n }\n\n if (ck === 'number' || ck === 'Number') {\n type = { type: GraphQLInt };\n }\n\n if (ck === 'string[]' || ck === 'String[]' || ck === '[String]') {\n type = { type: new GraphQLList(GraphQLString) };\n }\n\n if (ck === 'boolean[]' || ck === 'Boolean[]' || ck === '[Boolean]') {\n type = { type: new GraphQLList(GraphQLString) };\n }\n\n if (ck === 'number[]' || ck === 'Number[]' || ck === '[Number]') {\n type = { type: new GraphQLList(GraphQLInt) };\n }\n const isRecursiveType = ck\n .replace('(', '')\n .replace(')', '')\n .replace('!', '')\n .replace('[', '')\n .replace(']', '');\n if (parentType === isRecursiveType) {\n lazyTypes.set(parentType, {\n ...lazyTypes.get(parentType),\n [key]: isRecursiveType\n });\n type = { type: types[parentType] } as any; // хмм\n }\n if (!type) {\n throw new Error(`Wrong plugged type ${ck}`);\n }\n type['resolve'] = async function(...args) {\n let defaultValue = args[0][key];\n for (const interceptor of interceptors) {\n defaultValue = await Container.get(interceptor)(\n of(defaultValue),\n args[0],\n args[1],\n args[2],\n args[3]\n );\n if (isObservable(defaultValue)) {\n defaultValue = await defaultValue.toPromise();\n }\n }\n return defaultValue;\n };\n return type;\n}\n","import {\n Config,\n TypesToken,\n Roots,\n GlobalUnion,\n Externals,\n Args\n} from '../../../app/app.tokens';\nimport { ParseTypesSchema } from '../../parse-types.schema';\nimport { Container, createUniqueHash, InjectionToken } from '@rxdi/core';\nimport { GraphQLObjectType, GraphQLSchema } from 'graphql';\n\nfunction setPart(externals: Externals[], resolver: string, symbolMap: string) {\n const isCurlyPresent = resolver.includes('{');\n let leftBracket = '(';\n let rightBracket = ')';\n\n if (isCurlyPresent) {\n leftBracket = '{';\n rightBracket = '}';\n }\n\n const directive = resolver.split(leftBracket);\n let decorator: string[];\n\n if (resolver.includes('@')) {\n decorator = directive[1].replace(rightBracket, '').split('@');\n } else {\n const parts = directive[1].replace(rightBracket, '').split(symbolMap);\n for (var i = parts.length; i-- > 1; ) {\n parts.splice(i, 0, symbolMap);\n }\n decorator = parts;\n }\n decorator = decorator.filter(i => !!i);\n\n const symbol = decorator[0];\n const methodToExecute = decorator[1].replace(/ +?/g, '');\n\n const { token, interceptor } = getSymbolInjectionToken(\n symbol,\n methodToExecute,\n externals\n );\n return {\n token,\n interceptor\n };\n}\n\nfunction getSymbolInjectionToken(\n symbol: string,\n method: string,\n externals: Externals[]\n) {\n const interceptor = findInterceptor(symbol, method, externals);\n return {\n token: new InjectionToken(createUniqueHash(`${interceptor}`)),\n interceptor\n };\n}\n\nfunction getInjectorSymbols(symbols: Externals[] = [], directives: string[]) {\n return symbols\n .map(symbol => {\n const [isPresent] = directives.filter(d => d.includes(symbol.map));\n if (isPresent) {\n const injector = isPresent.replace(/[^\\w\\s]/gi, '').replace(/ +?/g, '');\n const method = symbol.module[injector];\n if (!method) {\n throw new Error(`Missing method ${injector} inside ${symbol.file}`);\n }\n return {\n symbol: symbol.map,\n token: new InjectionToken(createUniqueHash(`${method}`)),\n module: symbol.module,\n method,\n injector\n };\n }\n })\n .filter(i => !!i);\n}\n\nfunction findInterceptor(\n symbol: string,\n method: string,\n externals: Externals[]\n) {\n const usedExternalModule = externals.find(s => s.map === symbol);\n if (!usedExternalModule.module[method]) {\n throw new Error(\n `Missing method ${method} inside ${usedExternalModule.file}`\n );\n }\n return usedExternalModule.module[method];\n}\n\nexport function buildTypes(\n config: Config,\n types,\n buildedSchema: GraphQLSchema\n) {\n Object.keys(config.$types).forEach(type => {\n if (types[type]) {\n return;\n }\n const currentType = config.$types[type];\n Object.keys(currentType).forEach(key => {\n types[type] = types[type] || {};\n\n let resolver = currentType[key];\n const interceptors = [];\n\n if (config.$externals) {\n const [symbol] = config.$externals\n .map(e => e.map)\n .filter(s => resolver.includes(s));\n if (symbol) {\n const hasMultipleSymbols = [\n ...new Set(\n resolver.split('=>').map(r => r.replace(/ +?/g, '').trim())\n )\n ];\n if (hasMultipleSymbols.length > 2) {\n const directives = hasMultipleSymbols.slice(\n 1,\n hasMultipleSymbols.length\n );\n for (const injectorSymbol of getInjectorSymbols(\n config.$externals,\n directives\n )) {\n Container.set(injectorSymbol.token, injectorSymbol.method);\n interceptors.push(injectorSymbol.token);\n }\n } else {\n const { token, interceptor } = setPart(\n config.$externals,\n resolver,\n symbol\n );\n Container.set(token, interceptor);\n interceptors.push(token);\n }\n resolver = Object.keys(Roots)\n .map(node => {\n const types = Object.keys(Roots[node]).filter(key =>\n resolver.includes(key)\n );\n if (types.length) {\n return types[0];\n }\n })\n .filter(i => !!i)[0] as GlobalUnion;\n }\n }\n types[type][key] = ParseTypesSchema(\n resolver,\n key,\n type,\n interceptors,\n types\n );\n });\n buildedSchema[type] = new GraphQLObjectType({\n name: type,\n fields: () => types[type]\n });\n });\n}\n","export function isFunction<T>(object: T) {\n return typeof object === 'function';\n}\n","import { isFunction } from './isFunction';\n\n/**\n * Gets first item of the object without iterating all objects inside\n */\nexport function getFirstItem<T>(object: T) {\n if (!object) {\n return null;\n }\n let firstKey: string;\n for (var key in object) {\n firstKey = key;\n break;\n }\n if (!object[firstKey]) {\n throw new Error(`Missing method ${firstKey}`);\n }\n if (isFunction(object[firstKey])) {\n object = object[firstKey];\n }\n return object;\n}\n","import { GraphQLInputObjectType, GraphQLNonNull } from 'graphql';\nimport { Container } from '@rxdi/core';\nimport { ParseArgs } from './parse-ast';\nimport { Config, TypesToken } from '../app/app.tokens';\n\nconst InputObjectTypes = new Map<string, GraphQLInputObjectType>();\n\nexport const buildArgumentsSchema = (config: Config, resolver: string) => {\n let args = config.$resolvers[resolver].args || {};\n let fields = {};\n const Arguments = Container.get(TypesToken);\n Object.keys(args).forEach(a => {\n const name = args[a].replace('!', '');\n if (Arguments.has(name)) {\n let reusableType = new GraphQLInputObjectType({\n name,\n fields: () => Arguments.get(name)\n });\n if (InputObjectTypes.has(name)) {\n reusableType = InputObjectTypes.get(name);\n }\n InputObjectTypes.set(name, reusableType);\n if (args[a].includes('!')) {\n fields = {\n payload: {\n type: new GraphQLNonNull(reusableType)\n }\n };\n } else {\n fields = {\n payload: {\n type: reusableType\n }\n };\n }\n return;\n }\n fields[a] = ParseArgs(args[a]);\n });\n return fields;\n};\n","import { Config, ResolverDependencies } from '../../../app/app.tokens';\nimport { isFunction } from '../../isFunction';\nimport { lazyTypes } from '../../lazy-types';\n\nimport { getFirstItem } from '../../get-first-item';\nimport { buildArgumentsSchema } from '../../parse-args-schema';\n\nimport { Container } from '@rxdi/core';\nimport { BootstrapService, GraphQLSchema } from '@gapi/core';\n\nexport function buildResolvers(\n config: Config,\n types,\n buildedSchema: GraphQLSchema\n) {\n Object.keys(config.$resolvers).forEach(resolver => {\n const type = config.$resolvers[resolver].type;\n const method = (\n config.$resolvers[resolver].method || 'query'\n ).toLocaleLowerCase();\n let deps = config.$resolvers[resolver].deps || [];\n\n const mapDependencies = <T>(\n dependencies: ResolverDependencies[]\n ): { [map: string]: ResolverDependencies } =>\n dependencies\n .map(({ provide, map }) => ({\n container: Container.get<keyof T>(provide),\n provide,\n map\n }))\n .reduce((acc, curr) => ({ ...acc, [curr.map]: curr.container }), {});\n\n if (!buildedSchema[type]) {\n throw new Error(\n `Missing type '${type}', Available types: '${Object.keys(\n types\n ).toString()}'`\n );\n }\n let resolve = config.$resolvers[resolver].resolve;\n if (resolve && !isFunction(resolve) && !Array.isArray(resolve)) {\n /* Take the first method inside file for resolver */\n resolve = getFirstItem(resolve);\n }\n const oldResolve = resolve;\n resolve = isFunction(resolve) ? resolve : () => oldResolve;\n\n Array.from(lazyTypes.keys()).forEach(type => {\n Object.keys(lazyTypes.get(type)).forEach(k => {\n buildedSchema[type].getFields()[k].type = buildedSchema[type];\n // types[type].getFields()[k].resolve = resolve;\n });\n });\n Container.get(BootstrapService).Fields[method][resolver] = {\n type: buildedSchema[type],\n method_name: resolver,\n args: buildArgumentsSchema(config, resolver),\n public: true,\n method_type: method,\n target: mapDependencies(deps),\n resolve\n } as any;\n });\n}\n","export const transpilerCache: Map<string, any> = new Map();\n","import { TranspileTypescript } from './typescript.builder';\nimport { join, parse, isAbsolute } from 'path';\nimport { Externals } from '../app/app.tokens';\nimport { transpilerCache } from './transpiler-cache';\nconst clearModule = require('clear-module');\n\nexport async function TranspileAndLoad(path: string, outDir: string) {\n path = convertToRelative(path);\n if (transpilerCache.has(path)) {\n return transpilerCache.get(path);\n }\n await TranspileTypescript([path], outDir);\n const transpiledPath = getTranspiledFilePath(path, outDir);\n clearModule(transpiledPath)\n const file = require(transpiledPath);\n transpilerCache.set(path, file);\n return file;\n}\n\nfunction getTranspiledFilePath(path: string, outDir: string) {\n return join(\n process.cwd(),\n outDir,\n parse(join(process.cwd(), outDir, path)).base.replace('ts', 'js')\n );\n}\n\nfunction convertToRelative(path: string) {\n path = path[0] === '.' ? path.substr(1) : path;\n return isAbsolute(path) ? (path = path.replace(process.cwd(), '')) : path;\n}\n\nexport async function TranspileAndGetAll(\n externals: Externals[],\n outDir: string\n) {\n // console.log('Before All');\n await TranspileTypescript(\n externals\n .map(external => external.file)\n .map(path => convertToRelative(path)),\n outDir\n );\n return externals.map(path => ({\n ...path,\n transpiledFile: join(\n process.cwd(),\n outDir,\n parse(path.file).base.replace('ts', 'js')\n )\n }));\n}\n","import { Container } from '@rxdi/core';\nimport { TranspileAndGetAll } from '../../transpile-and-load';\nimport { Config } from '../../../app/app.tokens';\nimport { join } from 'path';\n\nexport async function buildExternals(config: Config) {\n const compiledPaths = await TranspileAndGetAll(\n config.$externals,\n './.gj/out'\n );\n config.$externals = compiledPaths.map(external => {\n if (external.file.includes('.ts')) {\n external.module = require(external.transpiledFile);\n } else {\n const m = require('esm')(module)(join(process.cwd(), external.file));\n external.module = m['default'] || m;\n }\n Container.reset(external.map);\n Container.remove(external.map);\n Container.set(external.map, external.module);\n return external;\n });\n return config.$externals;\n}\n","import { GraphQLSchema } from 'graphql';\nimport { Config } from '../app/app.tokens';\nimport { buildArguments } from '../helpers/dynamic-schema/mutators/build-arguments';\nimport { buildTypes } from '../helpers/dynamic-schema/mutators/build-types';\nimport { buildResolvers } from '../helpers/dynamic-schema/mutators/build-resolvers';\nimport { buildExternals } from './dynamic-schema/mutators/build-externals';\n\nexport async function MakeAdvancedSchema(config: Config) {\n const types = {};\n const buildedSchema: GraphQLSchema = {} as any;\n config.$args = config.$args || {};\n config.$types = config.$types || {};\n if (config.$externals && config.$externals.length) {\n config.$externals = await buildExternals(config);\n } \n buildArguments(config);\n buildTypes(config, types, buildedSchema);\n buildResolvers(config, types, buildedSchema);\n return buildedSchema;\n}\n","import {\n GraphQLString,\n GraphQLInt,\n GraphQLList,\n GraphQLObjectType,\n GraphQLBoolean\n} from 'graphql';\nimport { BootstrapService, Container } from '@gapi/core';\nimport { Config } from '../app/app.tokens';\n\nexport function MakeBasicSchema(config: Config) {\n Object.keys(config.$resolvers).forEach(method_name => {\n const resolve = config.$resolvers[method_name];\n const fields = {};\n const args = {};\n\n Object.keys(resolve).forEach(key => {\n const resolver = resolve[key];\n if (typeof resolver === 'string') {\n fields[key] = { type: GraphQLString };\n }\n\n if (typeof resolver === 'number') {\n fields[key] = { type: GraphQLInt };\n }\n if (typeof resolver === 'boolean') {\n fields[key] = { type: GraphQLBoolean };\n }\n if (typeof resolver !== 'string' && resolver.length) {\n if (typeof resolver[0] === 'string') {\n fields[key] = { type: new GraphQLList(GraphQLString) };\n }\n\n if (typeof resolver[0] === 'number') {\n fields[key] = { type: new GraphQLList(GraphQLInt) };\n }\n if (typeof resolver[0] === 'boolean') {\n fields[key] = { type: new GraphQLList(GraphQLBoolean) };\n }\n }\n });\n Container.get(BootstrapService).Fields.query[method_name] = {\n type: new GraphQLObjectType({\n name: `${method_name}_type`,\n fields: () => fields\n }),\n args,\n method_name,\n public: true,\n method_type: 'query',\n target: () => {},\n resolve: typeof resolve === 'function' ? resolve : () => resolve\n } as any;\n });\n}\n","import { parse } from 'path';\n\nexport function isInValidPath(path: string, options = {} as any) {\n if (path === '' || typeof path !== 'string') return true;\n\n // https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath\n const MAX_PATH = options.extended ? 32767 : 260;\n if (typeof path !== 'string' || path.length > MAX_PATH - 12) {\n return true;\n }\n\n const rootPath = parse(path).root;\n if (rootPath) path = path.slice(rootPath.length);\n\n // https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#Naming_Conventions\n if (options.file) {\n return /[<>:\"/\\\\|?*]/.test(path);\n }\n return /[<>:\"|?*]/.test(path);\n}\n","export const traverseMap: { parent: string; path: string }[] = [];\n","import { promisify } from 'util';\nimport { load } from 'js-yaml';\nimport { readFile } from 'fs';\n\nexport async function loadYml(path: string) {\n return load(await promisify(readFile)(path, { encoding: 'utf-8' }));\n}\n","import { promisify } from 'util';\nimport { TranspileAndLoad } from './transpile-and-load';\nimport { exists, readFile } from 'fs';\nimport { isInValidPath } from './is-invalid-path';\nimport { traverseMap } from './traverse-map';\nimport { join, normalize } from 'path';\nimport { loadYml } from './load-yml';\nimport { IsBundlerInstalled } from '../app/app.tokens';\nimport clearModule = require('clear-module');\nimport { Container } from '@rxdi/core';\n\nexport async function loadFile(path: string) {\n let loadedModule: any;\n if (isInValidPath(path)) {\n return path;\n }\n if (!(await promisify(exists)(path))) {\n const lastElement = traverseMap[traverseMap.length - 1];\n if (lastElement) {\n path = join(\n process.cwd(),\n lastElement.parent,\n path.replace(process.cwd(), '')\n );\n }\n }\n if (path.includes('.yml')) {\n loadedModule = loadYml(path);\n } else if (path.includes('.json')) {\n path = normalize(join(process.cwd(), path));\n clearModule(path)\n loadedModule = require(path);\n } else if (path.includes('.html') || path.includes('.graphql') || path.includes('.gql')) {\n loadedModule = await promisify(readFile)(path, { encoding: 'utf-8' });\n } else if (Container.get(IsBundlerInstalled).gapi && path.includes('.ts') || path.includes('.js')) {\n loadedModule = await TranspileAndLoad(path, './.gj/out');\n } else {\n loadedModule = require('esm')(module, {cache: false})(path);\n }\n\n const parent = path\n .substring(0, path.lastIndexOf('/'))\n .replace(process.cwd(), '');\n\n traverseMap.push({ parent, path });\n return loadedModule;\n}\n","import { loadFile } from '../load-file';\nimport { join } from 'path';\nimport { Container } from '@rxdi/core';\nimport { FSWatcher } from 'chokidar';\nexport function replaceInjectSymbol(path: string) {\n return path.replace('💉', '')\n}\nexport async function deep<T>(value: T): Promise<T> {\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n if (Array.isArray(value)) {\n return deepArray(value) as any;\n }\n return deepObject(value);\n}\n\nexport const meta = new Map<string, string>();\nexport async function deepObject<T>(source: T) {\n const result = {};\n let path: string;\n let meta = {};\n for (let [key, value] of Object.entries(source)) {\n if (typeof value === 'string' && value.includes('💉')) {\n path = `${replaceInjectSymbol(value)}`\n const mod = await loadFile(join(process.cwd(), path));\n result[key] = await deep(mod);\n meta[key] = path;\n try {\n Container.get<FSWatcher>('watcher').add(join(process.cwd(), path))\n } catch (e) {}\n Object.defineProperty(result, `_meta`, { value: meta, enumerable: false, writable: true });\n } else {\n result[key] = await deep(value);\n }\n }\n return result as T;\n}\n\nexport async function deepArray<T>(collection: T[]) {\n return await Promise.all(collection.map(async value => deep(value)));\n}\n","export function isArray<T>(o: T) {\n return Object.prototype.toString.call(o) === '[object Array]';\n}\n","import { isArray } from '../is-array';\n\nexport async function traverse<T>(x: T, find: (k: string, v: T) => Promise<boolean>) {\n if (isArray(x)) {\n await traverseArray(x, find);\n } else if (typeof x === 'object' && x !== null) {\n await traverseObject(x, find);\n }\n null;\n}\n\nexport async function traverseObject<T>(\n obj: T,\n find: (k: string, v: T) => Promise<boolean>\n) {\n for (let [k, v] of Object.entries(obj)) {\n if (obj.hasOwnProperty(k)) {\n if (await find(k, v)) {\n break;\n } else {\n await traverse(obj[k], find);\n }\n }\n }\n}\n\nexport async function traverseArray<T>(\n arr: T,\n find: (k: string, v: T) => Promise<boolean>\n) {\n for (const x of arr as any) {\n return await traverse(x, find);\n }\n}\n","import { promisify } from 'util';\nimport { exists } from 'fs';\nimport { join, basename } from 'path';\nimport { ConfigViews, PredictedTranspilation } from '../app/app.tokens';\nimport {\n TranspileTypescript,\n TranspileTypescriptParcel\n} from './typescript.builder';\n\n\nexport async function transpileComponent(path: string = ''): Promise<PredictedTranspilation> {\n if (!path || path && !path.includes('💉')) {\n return;\n }\n const originalPath = `${path}`;\n path = path.replace('💉', '');\n let filePath = join(process.cwd(), path);\n let transpilerPath: string = filePath;\n filePath = join(process.cwd(), 'node_modules', path);\n if (await promisify(exists)(filePath)) {\n transpilerPath = `./node_modules/${path}`;\n }\n return {\n originalPath,\n filePath,\n transpilerPath,\n newPath: join(\n process.cwd(),\n 'components',\n path.replace(basename(path), '')\n ),\n link: `http://0.0.0.0:9000/components/${basename(path).replace('ts', 'js')}`\n };\n}\nexport async function mapComponentsPath(views: ConfigViews) {\n return (await Promise.all(\n []\n .concat(...Object.keys(views).map(v => views[v].components))\n .filter(i => !!i)\n .map(c => transpileComponent(c))\n )).filter(i => !!i);\n}\n\nexport function modifyViewsConfig(\n views: ConfigViews,\n components: { originalPath: string; link: string }[]\n) {\n Object.keys(views).forEach(v => {\n if (!views[v].components) {\n return;\n }\n views[v].components = views[v].components.map(c => {\n const exists = components.find(p => p.originalPath === c);\n if (exists) {\n return exists.link;\n }\n return c;\n });\n });\n return views;\n}\nexport async function transpileComponentsForViews(views: ConfigViews) {\n const components = await mapComponentsPath(views);\n for (const { transpilerPath } of components) {\n await TranspileTypescriptParcel(\n [transpilerPath],\n join(process.cwd(), 'components')\n );\n }\n modifyViewsConfig(views, components);\n return views;\n}\n\n\nexport async function predictConfig(components: string[]) {\n return Promise.all(components.map(async c => (await transpileComponent(c))))\n}\n\nexport async function transpileComponentsInit(components: string[]) {\n const config = await predictConfig(components);\n for (const predictedConfig of config) {\n await TranspileTypescriptParcel(\n [predictedConfig.transpilerPath],\n join(process.cwd(), 'components')\n );\n }\n return config;\n}\n","import { traverse } from './traverse/traverse';\nimport { BootstrapService, Container, ApolloService, PubSubService, GraphQLSchema, printSchema } from '@gapi/core';\nimport { getFirstItem } from './get-first-item';\nimport { loadFile } from './load-file';\nimport { Config } from '../app/app.tokens';\nimport { MakeAdvancedSchema } from './advanced-schema';\nimport { deep } from './traverse/test';\nimport { lazyTypes } from './lazy-types';\nimport { configWatchers } from './watch-bundles';\nimport { MakeBasicSchema } from './basic-schema';\nimport { transpilerCache } from './transpiler-cache';\nimport { FSWatcher } from 'chokidar';\nimport { transpileComponentsForViews, transpileComponentsInit } from './component.parser';\n\nfunction findMetaKey(path: string, meta: { [key: string]: string }) {\n return Object.keys(meta).find(k => meta[k] === path);\n}\n\nfunction getMetaPath(path: string) {\n return `.${path.replace(process.cwd(), '')}`;\n}\n\nlet isRunning: boolean;\n\nexport async function reactToChanges(path: string, config: Config) {\n if (isRunning) {\n console.log(\n `✋ Bundle is updating previews change! Unable to update ${path}`\n );\n return;\n }\n const timer = Date.now();\n console.log(`💡 Bundle changed: ${path}`);\n isRunning = true;\n try {\n transpilerCache.delete(path.replace(process.cwd(), ''))\n transpilerCache.delete(path.replace(process.cwd(), '').replace('.', ''))\n const newFile = await loadFile(path);\n if (configWatchers.filter(p => path.includes(p)).length) {\n config = await deep(newFile);\n } else if (config._meta) {\n // First level deepnest\n const metaKey = findMetaKey(getMetaPath(path), config._meta);\n if (metaKey) {\n config[metaKey] = await deep(newFile);\n }\n } else {\n // Traverse recursive and find metadata for specific file and update it\n await traverse(config, async (k, v) => {\n if (typeof v === 'object' && v._meta) {\n const foundMetaKey = findMetaKey(getMetaPath(path), v._meta);\n if (foundMetaKey) {\n v[foundMetaKey] = await deep(getFirstItem(newFile));\n return true;\n }\n }\n return false;\n });\n }\n\n lazyTypes.clear();\n Container.get(BootstrapService).Fields = {\n mutation: {},\n query: {},\n subscription: {}\n };\n if (config.$mode === 'basic') {\n await MakeBasicSchema(config);\n }\n if (config.$mode === 'advanced') {\n await MakeAdvancedSchema(config);\n }\n Container.get(ApolloService).init();\n isRunning = false;\n // await SchemaIntrospection()\n } catch (e) {\n isRunning = false;\n console.error(e);\n }\n\n config.$views = await transpileComponentsForViews(config.$views)\n\n if(config.$components) {\n config.$components = (await transpileComponentsInit(config.$components as string[])).map(c => c && c.link ? c.link : c) as any;\n }\n\n Container.reset(Config)\n Container.remove(Config)\n Container.set(Config, config);\n\n Container.get(PubSubService).publish('listenForChanges', config.$views);\n Container.reset('main-config-compiled')\n Container.remove('main-config-compiled')\n Container.set('main-config-compiled', config)\n console.log(`📦 Bundle realoaded! ${Date.now() - timer}ms`, path);\n}\n","import { watch } from 'chokidar';\nimport { Config } from '../app/app.tokens';\nimport { reactToChanges } from './react-to-changes';\nimport { Container } from '@rxdi/core';\n\nexport const configWatchers = ['gj.yml', 'gj.json', 'gj.js', 'gj.ts'];\nexport function watchBundles(paths: string[], config: Config) {\n const ignored = (p: string) => p.includes('node_modules');\n \n const watcher = watch([...new Set(paths), ...configWatchers.map(p => `./${p}`)], { ignored }).on(\n 'change',\n async path => reactToChanges(path, config)\n );\n Container.set('watcher', watcher);\n}\n\n\n\n// @Injectable()\n// export class BundleWatcher {\n// private configWatchers = ['./gj.yml', './gj.json', './gj.js', './gj.ts'];\n// private ignored = (p: string) => p.includes('node_modules');\n// private watcher: FSWatcher;\n// constructor() {\n// this.watcher = watch([...this.configWatchers], {\n// ignored: this.ignored\n// })\n// }\n// unwatch(path: string[] | string) {\n// this.watcher.unwatch(path);\n// }\n// addBundles(paths: string[]) {\n// this.watcher.add(paths);\n// }\n// onChange(config: Config) {\n// this.watcher.on('change', async path => reactToChanges(path, config));\n// }\n// stop() {\n// this.watcher.close();\n// }\n\n// getWatcher() {\n// return this.watcher;\n// }\n// }\n","import { exec } from 'child_process';\nimport { promisify } from 'util';\n\nasync function run(cmd: string) {\n let res: boolean;\n try {\n if ((await promisify(exec)(cmd)).stderr) {\n res = false;\n } else {\n res = true;\n }\n } catch (e) {\n res = false;\n }\n return res;\n}\n\nexport async function isParcelInstalled() {\n return await run('parcel help');\n}\n\nexport async function isGapiInstalled() {\n return await run('gapi daemon status');\n}\n","import { Inject, Plugin } from '@rxdi/core';\nimport { HAPI_SERVER } from '@rxdi/hapi';\nimport { Server } from 'hapi';\nimport { includes } from '../../../helpers/args-extractors';\n\n@Plugin()\nexport class ServeComponents {\n constructor(@Inject(HAPI_SERVER) private server: Server) {}\n\n async register() {\n if (includes('--client')) {\n this.server.route({\n method: 'GET',\n path: '/components/{param*}',\n handler: {\n directory: {\n path: `${process.cwd()}/components`,\n index: ['index.html', 'default.html']\n }\n }\n });\n this.server.route({\n method: 'GET',\n path: '/{param*}',\n handler: {\n directory: {\n path: __dirname,\n redirectToSlash: true,\n listing: false, index: ['index.html']\n }\n }\n });\n }\n }\n}\n","import { Module } from '@rxdi/core';\nimport { ServeComponents } from './services/serve-components.service';\n\n@Module({\n plugins: [ServeComponents]\n})\nexport class CoreModule {}","import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLEnumType } from 'graphql';\n\nexport const ClientViewType = new GraphQLObjectType({\n name: 'ClientViewType',\n fields: () => ({\n html: {\n type: GraphQLString\n },\n components: {\n type: new GraphQLList(GraphQLString)\n },\n name: {\n type: GraphQLString\n },\n policy: {\n type: GraphQLString\n },\n query: {\n type: GraphQLString\n },\n props: {\n type: new GraphQLList(GraphQLString)\n },\n output: {\n type: GraphQLString\n }\n })\n});\n","import { GraphQLObjectType, GraphQLList, GraphQLString } from 'graphql';\nimport { ClientViewType } from './client-view.type';\n\nexport const ClientType = new GraphQLObjectType({\n name: 'ClientType',\n fields: {\n components: {\n type: new GraphQLList(GraphQLString)\n },\n views: {\n type: new GraphQLList(ClientViewType)\n },\n schema: {\n type: GraphQLString\n }\n }\n});\n","import { GraphQLObjectType, GraphQLString } from 'graphql';\n\nexport const ClientReadyStatusType = new GraphQLObjectType({\n name: 'ClientReadyStatusType',\n fields: () => ({\n status: {\n type: GraphQLString\n }\n })\n});\n","import {\n Controller,\n GraphQLControllerOptions,\n Type,\n Subscription,\n Subscribe,\n PubSubService,\n Inject,\n Container,\n Mutation,\n BootstrapService,\n printSchema\n} from '@gapi/core';\nimport { ClientType } from './types/client.type';\nimport { Config, ConfigViews } from '../app.tokens';\nimport { ClientReadyStatusType } from './types/status.type';\nimport { mapComponentsPath, modifyViewsConfig, predictConfig } from '../../helpers/component.parser';\n\nexport const viewsToArray = <T>(a: { [key: string]: T }): Array<T> =>\n Object.keys(a).reduce(\n (acc, curr) => [...acc, { ...a[curr], name: curr }],\n []\n );\n@Controller<GraphQLControllerOptions>({\n guards: [],\n type: []\n})\nexport class ClientController {\n constructor(\n private pubsub: PubSubService,\n @Inject(Config) private config: Config\n ) {}\n\n @Type(ClientType)\n @Subscribe(function(this: ClientController) {\n return this.pubsub.asyncIterator('listenForChanges');\n })\n @Subscription()\n async listenForChanges(views: ConfigViews) {\n const config = Container.get<Config>('main-config-compiled');\n const res = {\n components: config.$components || [],\n views: viewsToArray(views),\n schema: printSchema(Container.get(BootstrapService).schema)\n };\n return res;\n }\n\n @Type(ClientReadyStatusType)\n @Mutation()\n async clientReady(root, payload, context) {\n const config = Container.get<Config>('main-config-compiled');\n config.$views = modifyViewsConfig(config.$views, await mapComponentsPath(config.$views));\n this.pubsub.publish('listenForChanges', config.$views);\n return {\n status: 'READY'\n };\n }\n}\n","import { Module } from '@rxdi/core';\nimport { ClientController } from './client.controller';\n\n@Module({\n controllers: [ClientController],\n})\nexport class ClientModule {}\n","import { writeFile, readFileSync, exists } from 'fs';\nimport { promisify } from 'util';\nimport { includes, nextOrDefault } from '../helpers/args-extractors';\nimport { VoyagerModule } from '@gapi/voyager';\nimport { getConfig } from '../helpers/set-config';\nimport { basicTemplate } from '../helpers/basic.template';\nimport { MakeAdvancedSchema } from '../helpers/advanced-schema';\nimport { MakeBasicSchema } from '../helpers/basic-schema';\nimport { join } from 'path';\nimport { deep } from '../helpers/traverse/test';\nimport { traverseMap } from '../helpers/traverse-map';\nimport { watchBundles } from '../helpers/watch-bundles';\nimport { isGapiInstalled } from '../helpers/is-runner-installed';\nimport {\n Module,\n SCHEMA_OVERRIDE,\n GraphQLSchema,\n printSchema,\n buildSchema,\n mergeSchemas,\n GRAPHQL_PLUGIN_CONFIG,\n GraphQLDirective,\n Container\n} from '@gapi/core';\n\nimport { TypesToken, Config, IsBundlerInstalled } from './app.tokens';\n\nimport { TranspileAndLoad } from '../helpers/transpile-and-load';\nimport { buildExternals } from '../helpers/dynamic-schema/mutators/build-externals';\nimport { CoreModule } from './core/core.module';\nimport { ClientModule } from './client/client.module';\n\n@Module({\n imports: [CoreModule, VoyagerModule.forRoot(), ClientModule],\n providers: [\n {\n provide: TypesToken,\n useValue: new Map()\n },\n {\n provide: IsBundlerInstalled,\n useValue: { parcel: false, gapi: false }\n },\n {\n provide: SCHEMA_OVERRIDE,\n useFactory: () => (schema: GraphQLSchema) => {\n let externalSchema;\n try {\n const config = JSON.parse(\n readFileSync(join(process.cwd(), 'gj.json'), {\n encoding: 'utf-8'\n })\n );\n config.$schema = config.$schema || nextOrDefault('--schema', false);\n if (config.$schema) {\n externalSchema = readFileSync(config.$schema, {\n encoding: 'utf-8'\n });\n externalSchema = buildSchema(externalSchema);\n }\n } catch (e) {}\n const schemas = [externalSchema, schema].filter(i => !!i);\n let mergedSchemas: GraphQLSchema;\n if (schemas.length === 1) {\n mergedSchemas = schema;\n } else {\n mergedSchemas = mergeSchemas({\n schemas\n });\n }\n\n if (includes('--verbose')) {\n console.log(`\nSchema:\n${printSchema(mergedSchemas)}\n `);\n }\n\n if (process.argv.toString().includes('--generate')) {\n promisify(writeFile)('./schema.graphql', printSchema(mergedSchemas), {\n encoding: 'utf-8'\n }).then(() => {\n console.log('Schema created!');\n process.exit(0);\n });\n }\n return mergedSchemas;\n }\n },\n {\n provide: Config,\n useFactory: async () => {\n let config = await getConfig(\n nextOrDefault('--config', 'graphqj-config')\n );\n if (!config) {\n config = await getConfig('gj');\n }\n if (!config) {\n config = basicTemplate;\n }\n return config['default'] || config;\n }\n },\n {\n provide: 'Run',\n deps: [Config, GRAPHQL_PLUGIN_CONFIG, IsBundlerInstalled],\n lazy: true,\n useFactory: async (\n config: Config,\n graphqlConfig: GRAPHQL_PLUGIN_CONFIG,\n isBundlerInstalled: IsBundlerInstalled\n ) => {\n config = await config;\n config = await deep(config);\n isBundlerInstalled.gapi = await isGapiInstalled();\n config.$externals = config.$externals || [];\n\n if (config.$externals && config.$externals.length) {\n config.$externals = await buildExternals(config);\n }\n\n let filePath = join(process.cwd(), config.$directives || '');\n let directives: GraphQLDirective[] | any[];\n\n if ((await promisify(exists)(filePath)) && filePath !== process.cwd()) {\n if (filePath.includes('.ts')) {\n directives = await TranspileAndLoad(\n config.$directives.replace('.', ''),\n './.gj/out'\n );\n } else {\n directives = require('esm')(module)(filePath);\n }\n graphqlConfig.directives = (await Promise.all(\n Object.keys(directives).map(d =>\n typeof directives[d] === 'function' ? directives[d]() : null\n )\n )).filter(i => !!i);\n }\n\n if (config.$mode === 'basic') {\n await MakeBasicSchema(config);\n }\n if (config.$mode === 'advanced') {\n await MakeAdvancedSchema(config);\n }\n // if (config.$components) {\n // traverseMap.push(...(config.$components as string[]).map(c => ({path: c.replace('💉', ''), parent: null})))\n // }\n process.argv.push('--hot-reload', '--client')\n if (includes('--hot-reload')) {\n config.$externals.forEach(e =>\n traverseMap.push({ parent: null, path: e.file })\n );\n watchBundles(traverseMap.map(f => f.path), config);\n }\n \n Container.set('main-config-compiled', config)\n console.log(\n 'You can extract this schema by running --generate command'\n );\n return true;\n }\n }\n ]\n})\nexport class AppModule {}\n","import { spawn, ChildProcessWithoutNullStreams } from 'child_process';\nimport { Observable } from 'rxjs';\n\nexport const SelfChild = (configFile: string) => {\n return new Observable<ChildProcessWithoutNullStreams>(observer => {\n const args = []\n args.push('--config')\n args.push(configFile)\n const child = spawn('gj', args);\n child.stdout.pipe(process.stdout);\n child.stderr.pipe(process.stderr);\n process.on('exit', () => child.kill());\n observer.next(child);\n return () => {\n observer.complete();\n child.kill();\n console.log(`Child process: ${child.pid} killed`);\n };\n });\n};\n","import { BootstrapFramework, Container, setup } from '@rxdi/core';\nimport { AppModule } from './app/app.module';\nimport { CoreModule } from '@gapi/core';\nimport { nextOrDefault, includes } from './helpers/args-extractors';\nimport { writeFile, existsSync } from 'fs';\nimport { promisify } from 'util';\nimport { watch } from 'chokidar';\nimport { SelfChild } from './helpers/self-child';\nimport { Subscription } from 'rxjs';\nimport { Config, Externals } from './app/app.tokens';\nimport { switchMap } from 'rxjs/operators';\nimport {\n TranspileAndLoad,\n TranspileAndGetAll\n} from './helpers/transpile-and-load';\nimport { getFirstItem } from './helpers/get-first-item';\nimport { loadFile } from './helpers/load-file';\nimport { getConfig } from './helpers/set-config';\nimport { transpileComponentsInit } from './helpers/component.parser';\nif (includes('--watch')) {\n let subscription: Subscription;\n const configPath = nextOrDefault('--config');\n if (!existsSync(configPath)) {\n throw new Error(`File missing ${configPath}`);\n }\n const ignored = (p: string) => p.includes('node_modules');\n\n watch(configPath, { ignored }).on('change', async (event, path) => {\n if (subscription) {\n subscription.unsubscribe();\n }\n subscription = SelfChild(configPath).subscribe(process => {\n console.log('Child process started: ', process.pid);\n });\n });\n\n watch(configPath, { ignored }).on('ready', async (event, path) => {\n if (subscription) {\n subscription.unsubscribe();\n }\n subscription = SelfChild(configPath).subscribe(process => {\n console.log('Child process started: ', process.pid);\n });\n });\n} else if (includes('init')) {\n if (includes('advanced')) {\n promisify(writeFile)(\n './gj.json',\n `\n{\n \"$mode\": \"advanced\",\n \"$types\": {\n \"user\": {\n \"name\": \"String\",\n \"email\": \"String\",\n \"phone\": \"Number\",\n \"arrayOfNumbers\": \"Number[]\",\n \"arrayOfStrings\": \"String[]\"\n }\n },\n \"$resolvers\": {\n \"findUser\": {\n \"type\": \"user\",\n \"resolve\": {\n \"name\": \"Kristiyan Tachev\",\n \"email\": \"test@gmail.com\",\n \"phone\": 414141,\n \"arrayOfNumbers\": [515151, 412414],\n \"arrayOfStrings\": [\"515151\", \"412414\"]\n }\n }\n }\n}`,\n { encoding: 'utf-8' }\n );\n } else if (includes('es6')) {\n promisify(writeFile)(\n './gj.js',\n `\nexport default {\n $mode: 'advanced',\n $types: {\n user: {\n name: 'String',\n email: 'String',\n phone: 'Number',\n arrayOfNumbers: 'Number[]',\n arrayOfStrings: 'String[]'\n }\n },\n $resolvers: {\n findUser: {\n type: 'user',\n args: {\n userId: \"String!\",\n userId2: \"String\",\n },\n resolve: async (root, payload, context) => ({\n name: 'Kristiyan Tachev',\n email: 'test@gmail.com',\n phone: 4141423,\n arrayOfNumbers: [515151, 412414],\n arrayOfStrings: ['515151', '412414']\n })\n }\n }\n};\n`,\n { encoding: 'utf-8' }\n );\n } else if (includes('typescript')) {\n promisify(writeFile)(\n './gj.ts',\n `\nexport default {\n $mode: 'advanced',\n $types: {\n user: {\n name: 'String',\n email: 'String',\n phone: 'Number',\n arrayOfNumbers: 'Number[]',\n arrayOfStrings: 'String[]'\n }\n },\n $resolvers: {\n findUser: {\n type: 'user',\n args: {\n userId: \"String!\",\n userId2: \"String\",\n },\n resolve: async (root, payload: { userId: string; userId2?: string }) => ({\n name: 'Kristiyan Tachev',\n email: 'test@gmail.com',\n phone: 4141423,\n arrayOfNumbers: [515151, 412414],\n arrayOfStrings: ['515151', '412414']\n })\n }\n }\n};\n`,\n { encoding: 'utf-8' }\n );\n } else if (includes('yml')) {\n promisify(writeFile)(\n './gj.yml',\n `\n$mode: advanced\n$types:\n user:\n name: String\n email: String\n phone: Number\n arrayOfNumbers: Number[]\n arrayOfStrings: String[]\n\n$resolvers:\n findUser:\n type: user\n args:\n userId: String\n resolve:\n name: Kristiyan Tachev\n email: test@gmail.com\n phone: 414141\n arrayOfNumbers: \n - 515151\n - 412414\n arrayOfStrings:\n - '515151'\n - '412414'\n\n findUser2:\n type: user\n args:\n userId: String!\n resolve:\n name: Kristiyan Tachev\n email: test@gmail.com\n phone: 414141\n arrayOfNumbers: \n - 515151\n - 412414\n arrayOfStrings:\n - '515151'\n - '412414'\n`,\n { encoding: 'utf-8' }\n );\n } else {\n promisify(writeFile)(\n './gj.json',\n `\n{\n \"$mode\": \"basic\",\n \"$resolvers\": {\n \"findUser\": {\n \"name\": \"Kristiyan Tachev\",\n \"email\": \"test@gmail.com\",\n \"phone\": 414141,\n \"arrayOfNumbers\": [515151, 412414],\n \"arrayOfStrings\": [\"515151\", \"412414\"]\n }\n }\n}\n`,\n { encoding: 'utf-8' }\n );\n }\n} else {\n async function main() {\n Container.set('pubsub-auth', {\n onSubConnection(connectionParams) {\n return connectionParams;\n },\n async onSubOperation(connectionParams, params, webSocket) {\n connectionParams;\n return params;\n }\n });\n let file: Config;\n try {\n file = await getConfig('gj');\n } catch (e) {}\n const imports = [];\n if (file && file.$imports) {\n const transpiledModules = await TranspileAndGetAll(\n file.$imports.map(file => ({ file } as Externals)),\n 'imports'\n );\n imports.push(\n ...transpiledModules.map(f => getFirstItem(require(f.transpiledFile)))\n );\n }\n if (file && file.$components) {\n await transpileComponentsInit(file.$components as string[]);\n }\n BootstrapFramework(AppModule, [\n ...imports,\n CoreModule.forRoot({\n graphql: {\n openBrowser: nextOrDefault('--random', true, v =>\n v === 'true' ? false : true\n ),\n buildAstDefinitions: false, // Removed ast definition since directives are lost,\n graphiQlPath: '/graphiql',\n graphiqlOptions: {\n endpointURL: '/graphiql'\n }\n },\n pubsub: {\n authentication: 'pubsub-auth'\n },\n server: {\n randomPort: nextOrDefault('--random', false),\n hapi: {\n port: nextOrDefault('--port', 9000, p => Number(p)),\n routes: {\n cors: {\n origin: ['*'],\n additionalHeaders: [\n 'Host',\n 'User-Agent',\n 'Accept',\n 'Accept-Language',\n 'Accept-Encoding',\n 'Access-Control-Request-Method',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Request-Headers',\n 'Origin',\n 'Connection',\n 'Pragma',\n 'Cache-Control'\n ]\n }\n }\n }\n }\n })\n ]).subscribe(() => console.log('Started'), console.log.bind(console));\n }\n\n main();\n}\n"]} |