From 308e7d93836e1ff59c50091ce71a2c7c3a62bce3 Mon Sep 17 00:00:00 2001 From: Karol Rzotki Date: Mon, 4 Nov 2024 10:28:03 +0100 Subject: [PATCH] chore(scope): Change scope to @brainly-gene --- .../generators-integration-tests.yml | 24 +++---- README copy.md | 2 +- .../gene/backend-for-frontend/create.mdx | 4 +- .../gene/backend-for-frontend/handlers.mdx | 4 +- .../docs-site/pages/gene/cheatsheet/index.mdx | 20 +++--- .../pages/gene/components/create.mdx | 4 +- .../gene/components/event-delegation.mdx | 4 +- docs/docs-site/pages/gene/index.mdx | 2 +- .../pages/gene/modules/branching.mdx | 2 +- .../docs-site/pages/gene/modules/contexts.mdx | 4 +- .../pages/gene/modules/custom-hooks.mdx | 4 +- .../pages/gene/modules/dependencies.mdx | 4 +- .../pages/gene/modules/development.mdx | 8 +-- docs/docs-site/pages/gene/modules/index.mdx | 4 +- .../gene/modules/storybook-providers.mdx | 2 +- docs/docs-site/pages/gene/services/apollo.mdx | 8 +-- .../pages/gene/services/react-query.mdx | 14 ++--- .../src/lib/ioc/contextContainer.ts | 4 +- .../src/lib/ioc/serviceClientsContainer.ts | 4 +- .../decorators/StorybookProviders.tsx | 10 +-- .../my-data-service/src/lib/queries.ts | 2 +- .../my-data-service/src/lib/useMyData.ts | 2 +- packages/eslint-plugin-gene/package.json | 2 +- packages/gene-apollo/package.json | 2 +- .../src/apollo/transformApolloResponse.ts | 2 +- .../src/apollo/useApolloLazyQuery.spec.tsx | 2 +- .../src/apollo/useApolloLazyQuery.ts | 2 +- .../apollo/useApolloObservableQuery.spec.tsx | 6 +- .../src/apollo/useApolloObservableQuery.ts | 8 +-- .../src/apollo/useInjectedApollo.ts | 6 +- packages/gene-next/package.json | 2 +- .../src/image-assets/components/NextImage.tsx | 2 +- .../components/NextImageImgproxyLoader.tsx | 2 +- packages/gene-next/src/image-assets/ioc.ts | 2 +- packages/gene-next/src/routing/ioc.ts | 2 +- .../gene-next/src/routing/routers/next.ts | 2 +- packages/gene-sentry/package.json | 2 +- .../gene-sentry/src/sentry/logging/types.ts | 2 +- .../gene-tools/bin/create-gene-workspace.js | 12 ++-- packages/gene-tools/package.json | 2 +- .../mocks/components/ExternalTypeDispatch.tsx | 2 +- .../InvalidConditionalRender.stories.tsx | 2 +- .../components/InvalidDispatch.stories.tsx | 2 +- .../mocks/components/InvalidDispatch.tsx | 2 +- .../components/MissingDispatch.stories.tsx | 2 +- .../components/MissingListStories.stories.tsx | 2 +- .../mocks/components/NotAllowedMocks.spec.tsx | 2 +- .../ValidConditionalRender.stories.tsx | 2 +- ...dConditionalRenderWithoutKnobs.stories.tsx | 2 +- .../components/ValidDispatch.stories.tsx | 2 +- .../mocks/components/ValidDispatch.tsx | 2 +- .../mocks/components/ValidDispatchPrivate.tsx | 2 +- .../components/ValidListStories.stories.tsx | 2 +- .../validators/eventsValidator.js | 2 +- .../testsValidator/mocksValidator.js | 2 +- .../testsValidator/mocksValidator.spec.js | 30 ++++----- .../testsValidator/testsValidator.spec.js | 2 +- .../src/lib/invalid-module/InvalidModule.tsx | 2 +- .../invalid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/valid-module/ValidModule.tsx | 2 +- .../lib/valid-module/ValidVariationModule.tsx | 2 +- .../valid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/invalid-module/InvalidModule.tsx | 2 +- .../invalid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/valid-module/ValidModule.tsx | 2 +- .../lib/valid-module/ValidVariationModule.tsx | 2 +- .../valid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/invalid-module/InvalidModule.tsx | 2 +- .../invalid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/valid-module/ValidModule.tsx | 2 +- .../lib/valid-module/ValidVariationModule.tsx | 2 +- .../valid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/invalid-module/InvalidModule.tsx | 2 +- .../invalid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/valid-module/ValidModule.tsx | 2 +- .../lib/valid-module/ValidVariationModule.tsx | 2 +- .../valid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/invalid-module/InvalidModule.tsx | 2 +- .../invalid-module/delegates/useSomeLogic.ts | 8 +-- .../src/lib/valid-module/ValidModule.tsx | 2 +- .../lib/valid-module/ValidVariationModule.tsx | 2 +- .../valid-module/delegates/useSomeLogic.ts | 8 +-- .../invalid-module/src/lib/InvalidModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../invalid-module/src/lib/InvalidModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../invalid-module/src/lib/InvalidModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../invalid-module/src/lib/InvalidModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../invalid-module/src/lib/InvalidModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../invalid-module/src/lib/InvalidModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../lib/another-module/AnotherValidModule.tsx | 2 +- .../another-module/delegates/useSomeLogic.ts | 8 +-- ...idVariationWithDisabledStorybookModule.tsx | 2 +- .../ValidWithDisabledStorybookModule.tsx | 2 +- .../hooks/useSomeLogic.ts | 8 +-- .../src/lib/valid-module/ValidModule.tsx | 2 +- .../lib/valid-module/ValidVariationModule.tsx | 2 +- .../lib/valid-module/hooks/useSomeLogic.ts | 8 +-- .../valid-module/src/lib/ValidModule.tsx | 2 +- .../src/lib/ValidVariationModule.tsx | 2 +- .../src/lib/delegates/useSomeLogic.ts | 8 +-- .../copy-assets-to-app/copy-assets-to-app.ts | 2 +- .../copy-assets-to-storybook.ts | 2 +- .../prepare-storybook-root-assets.js | 4 +- .../copy-translations-to-app.ts | 2 +- .../copy-translations-to-storybook.ts | 2 +- .../src/executors/secure-serve/README.md | 2 +- .../files/__fileName__.ts__tmpl__ | 2 +- .../generators/bff-app-generator/README.md | 4 +- .../files/app/ioc/baseIoc.ts__tmpl__ | 4 +- .../files/app/ioc/getHomePageIoc.ts__tmpl__ | 20 +++--- .../app/pages/api/docs/openapi.ts__tmpl__ | 2 +- .../files/app/pages/api/health.ts__tmpl__ | 2 +- .../app/pages/api/v1/endpoint.ts__tmpl__ | 2 +- .../utils/workspaceAppTargetTemplate.ejs | 6 +- .../utils/workspaceE2ETargetTemplate.ejs | 2 +- .../generators/component-generator/README.md | 4 +- .../templates/__filename__.spec.tsx__tmpl__ | 2 +- .../__filename__.stories.tsx__tmpl__ | 2 +- .../templates/__filename__.tsx__tmpl__ | 2 +- .../components-library-generator/README.md | 6 +- .../core-module-generator/README.md | 4 +- .../lib/__pascalCaseFileName__.tsx__tmpl__ | 2 +- .../generators/core-module-generator/index.ts | 2 +- .../e2e-providers-generator/README.md | 4 +- .../files/lib/ioc/contextContainer.ts__tmpl__ | 4 +- .../ioc/serviceClientsContainer.ts__tmpl__ | 4 +- .../decorators/StorybookProviders.tsx__tmpl__ | 4 +- .../gene-workspace-generator/index.ts | 2 +- .../src/generators/module-generator/README.md | 2 +- .../__pascalCaseFileName__.tsx__tmpl__ | 2 +- .../__pascalCaseFileName__.tsx__tmpl__ | 2 +- .../src/generators/module-generator/index.ts | 4 +- .../generators/nextjs-app-generator/README.md | 4 +- .../files/app/context/appContext.ts__tmpl__ | 2 +- .../files/app/ioc/baseIoc.ts__tmpl__ | 10 +-- .../files/app/ioc/getHomePageIoc.ts__tmpl__ | 16 ++--- .../files/app/pages/_app.tsx__tmpl__ | 2 +- .../files/app/pages/_error.tsx__tmpl__ | 2 +- .../files/app/pages/api/health.ts__tmpl__ | 2 +- .../files/app/pages/index.tsx__tmpl__ | 8 +-- .../utils/workspaceAppTargetTemplate.ejs | 6 +- .../utils/workspaceE2ETargetTemplate.ejs | 2 +- .../generators/service-generator/README.md | 6 +- .../files/lib/use__fileName__.ts__tmpl__ | 2 +- .../files/lib/use__fileName__Lazy.ts__tmpl__ | 4 +- .../react-query/files/lib/queries.ts__tmpl__ | 2 +- .../files/lib/use__fileName__.ts__tmpl__ | 2 +- .../files/lib/use__fileName__Lazy.ts__tmpl__ | 2 +- .../generators/service-generator/schema.json | 2 +- .../storybook-configuration/README.md | 6 +- .../__snapshots__/index.spec.ts.snap | 8 +-- .../utilities/add-storybook-targets.ts | 10 +-- packages/gene/package.json | 2 +- script/buildAndLinkGene.sh | 63 ------------------- tsconfig.base.json | 14 ++--- 160 files changed, 349 insertions(+), 412 deletions(-) delete mode 100755 script/buildAndLinkGene.sh diff --git a/.github/workflows/generators-integration-tests.yml b/.github/workflows/generators-integration-tests.yml index 94f03f7..5c8d85b 100644 --- a/.github/workflows/generators-integration-tests.yml +++ b/.github/workflows/generators-integration-tests.yml @@ -19,51 +19,51 @@ jobs: matrix: config: - { - packageCommand: 'pnpm nx g @brainly/gene-tools:core-module --name my-module --directory examples --tags domain:social-qa && pnpm nx test examples-modules-my-module-module', + packageCommand: 'pnpm nx g @brainly-gene/tools:core-module --name my-module --directory examples --tags domain:social-qa && pnpm nx test examples-modules-my-module-module', successRegexp: 'Successfully ran target test for project examples-modules-my-module-module', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:core-module --name my-module --directory examples --tags domain:social-qa && pnpm nx lint examples-modules-my-module-module', + packageCommand: 'pnpm nx g @brainly-gene/tools:core-module --name my-module --directory examples --tags domain:social-qa && pnpm nx lint examples-modules-my-module-module', successRegexp: 'Successfully ran target lint for project examples-modules-my-module-module', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:core-module --name my-module --directory examples --tags domain:social-qa && pnpm nx e2e examples-modules-my-module-module-e2e --verbose', + packageCommand: 'pnpm nx g @brainly-gene/tools:core-module --name my-module --directory examples --tags domain:social-qa && pnpm nx e2e examples-modules-my-module-module-e2e --verbose', successRegexp: 'Successfully ran target e2e for project examples-modules-my-module-module-e2e', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:components-library --name my-components --directory examples --tags domain:social-qa && pnpm nx test examples-components-my-components-ui', + packageCommand: 'pnpm nx g @brainly-gene/tools:components-library --name my-components --directory examples --tags domain:social-qa && pnpm nx test examples-components-my-components-ui', successRegexp: 'Successfully ran target test for project examples-components-my-components-ui', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:components-library --name my-components --directory examples --tags domain:social-qa && pnpm nx lint examples-components-my-components-ui', + packageCommand: 'pnpm nx g @brainly-gene/tools:components-library --name my-components --directory examples --tags domain:social-qa && pnpm nx lint examples-components-my-components-ui', successRegexp: 'Successfully ran target lint for project examples-components-my-components-ui', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=apollo --tags=domain:social-qa && pnpm nx lint my-feature-services-my-data-service', + packageCommand: 'pnpm nx g @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=apollo --tags=domain:social-qa && pnpm nx lint my-feature-services-my-data-service', successRegexp: 'Successfully ran target lint for project my-feature-services-my-data-service', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=apollo --tags=domain:social-qa && pnpm nx test my-feature-services-my-data-service', + packageCommand: 'pnpm nx g @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=apollo --tags=domain:social-qa && pnpm nx test my-feature-services-my-data-service', successRegexp: 'Successfully ran target test for project my-feature-services-my-data-service', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=react-query --tags=domain:social-qa && pnpm nx lint my-feature-services-my-data-service', + packageCommand: 'pnpm nx g @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=react-query --tags=domain:social-qa && pnpm nx lint my-feature-services-my-data-service', successRegexp: 'Successfully ran target lint for project my-feature-services-my-data-service', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=react-query --tags=domain:social-qa && pnpm nx test my-feature-services-my-data-service', + packageCommand: 'pnpm nx g @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=react-query --tags=domain:social-qa && pnpm nx test my-feature-services-my-data-service', successRegexp: 'Successfully ran target test for project my-feature-services-my-data-service', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:nextjs-app --name=my-app --directory=example --tags=domain:social-qa --rewrites=true --apollo=true --reactQuery=true --e2e=true && NODE_OPTIONS="--max-old-space-size=8192" pnpm nx e2e example-my-app-e2e --verbose', + packageCommand: 'pnpm nx g @brainly-gene/tools:nextjs-app --name=my-app --directory=example --tags=domain:social-qa --rewrites=true --apollo=true --reactQuery=true --e2e=true && NODE_OPTIONS="--max-old-space-size=8192" pnpm nx e2e example-my-app-e2e --verbose', successRegexp: 'Successfully ran target e2e for project example-my-app-e2e', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:nextjs-app --name=my-app --directory=example --tags=domain:social-qa --rewrites=true --apollo=true --reactQuery=true --e2e=true && pnpm nx test example-my-app', + packageCommand: 'pnpm nx g @brainly-gene/tools:nextjs-app --name=my-app --directory=example --tags=domain:social-qa --rewrites=true --apollo=true --reactQuery=true --e2e=true && pnpm nx test example-my-app', successRegexp: 'Successfully ran target test for project example-my-app', } - { - packageCommand: 'pnpm nx g @brainly/gene-tools:nextjs-app --name=my-app --directory=example --tags=domain:social-qa --rewrites=true --apollo=true --reactQuery=true --e2e=true && pnpm nx lint example-my-app', + packageCommand: 'pnpm nx g @brainly-gene/tools:nextjs-app --name=my-app --directory=example --tags=domain:social-qa --rewrites=true --apollo=true --reactQuery=true --e2e=true && pnpm nx lint example-my-app', successRegexp: 'Successfully ran target lint for project example-my-app', } steps: diff --git a/README copy.md b/README copy.md index 669e545..54341ce 100644 --- a/README copy.md +++ b/README copy.md @@ -6,7 +6,7 @@ To run gene generator inside this repo: ```sh -nx g @brainly/gene-tools:nextjs-app --name=my-test --directory=test-dir --tags=domain:test --rewrites=true --apollo=true --reactQuery=true --e2e=true --verbose +nx g @brainly-gene/tools:nextjs-app --name=my-test --directory=test-dir --tags=domain:test --rewrites=true --apollo=true --reactQuery=true --e2e=true --verbose ``` It uses the code under packages/braniac-tools/generators, so there is no need to build the package. diff --git a/docs/docs-site/pages/gene/backend-for-frontend/create.mdx b/docs/docs-site/pages/gene/backend-for-frontend/create.mdx index 7fba6ea..14fe57e 100644 --- a/docs/docs-site/pages/gene/backend-for-frontend/create.mdx +++ b/docs/docs-site/pages/gene/backend-for-frontend/create.mdx @@ -11,7 +11,7 @@ title: Backend for Frontend (BFF) - Create a New BFF The following command generates a new Backend for Frontend (BFF) application with customizable configurations: ```bash -nx generate @brainly/gene-tools:bff-app +nx generate @brainly-gene/tools:bff-app ``` **Generator Code:** [View on GitHub](https://github.com/brainly/gene/blob/master/packages/gene-tools/src/generators/bff-app/README.md) @@ -21,7 +21,7 @@ nx generate @brainly/gene-tools:bff-app Running the command above initiates a prompt to gather the required details for setting up your BFF. Below is an example of the command flow: ```bash -> NX Generating @brainly/gene-tools:bff-app +> NX Generating @brainly-gene/tools:bff-app โœ” What is the BFF name? (e.g. web, ios, android) ยท my-first-bff โœ” Application tittle ยท Example BFF Application diff --git a/docs/docs-site/pages/gene/backend-for-frontend/handlers.mdx b/docs/docs-site/pages/gene/backend-for-frontend/handlers.mdx index ea4d648..5c53b9d 100644 --- a/docs/docs-site/pages/gene/backend-for-frontend/handlers.mdx +++ b/docs/docs-site/pages/gene/backend-for-frontend/handlers.mdx @@ -32,7 +32,7 @@ bff-dir ```typescript import cors from 'cors'; -import { apiHandlerConnect } from '@brainly/gene-next'; +import { apiHandlerConnect } from '@brainly-gene/next'; import { getQuestion, postQuestion, @@ -50,7 +50,7 @@ export default apiHandlerConnect() ```typescript import cors from 'cors'; -import { apiHandlerConnect } from '@brainly/gene-next'; +import { apiHandlerConnect } from '@brainly-gene/next'; import { getUser, deleteUser diff --git a/docs/docs-site/pages/gene/cheatsheet/index.mdx b/docs/docs-site/pages/gene/cheatsheet/index.mdx index e7fb899..8a5e0a6 100644 --- a/docs/docs-site/pages/gene/cheatsheet/index.mdx +++ b/docs/docs-site/pages/gene/cheatsheet/index.mdx @@ -13,37 +13,37 @@ All of the generators used inside of a terminal are step-based to ease the way o #### Module Generator ๐ŸŽ ```shell copy -nx g @brainly/gene-tools:module +nx g @brainly-gene/tools:module ``` #### Core Module Generator ๐ŸŽ ```shell copy -nx g @brainly/gene-tools:core-module +nx g @brainly-gene/tools:core-module ``` #### NextJS App Generator ๐Ÿ’ป ```shell copy -nx g @brainly/gene-tools:nextjs-app +nx g @brainly-gene/tools:nextjs-app ``` #### Library Generator ๐Ÿ“• ```shell copy -nx g @brainly/gene-tools:library +nx g @brainly-gene/tools:library ``` #### Service Generator ```shell copy -nx generate @brainly/gene-tools:service +nx generate @brainly-gene/tools:service ``` #### Subapp Generator ```shell copy -nx g @brainly/gene-tools:subapp +nx g @brainly-gene/tools:subapp ``` If you have issues with jest tests failing such as `SyntaxError: Cannot use import statement outside a module`, check if your newly generated `jest.config` doesn't have a line with `transform`. If so, remove it. @@ -51,23 +51,23 @@ If you have issues with jest tests failing such as `SyntaxError: Cannot use impo #### UI Library Generator ๐Ÿ“™ ```shell copy -nx g @brainly/gene-tools:components-library +nx g @brainly-gene/tools:components-library ``` #### Component Generator ๐Ÿงฉ ```shell copy -nx g @brainly/gene-tools:component +nx g @brainly-gene/tools:component ``` #### API Route Generator ๐Ÿš ```shell copy -nx g @brainly/gene-tools:api-route +nx g @brainly-gene/tools:api-route ``` #### BFF App Generator ```shell copy -nx g @brainly/gene-tools:bff-app +nx g @brainly-gene/tools:bff-app ``` diff --git a/docs/docs-site/pages/gene/components/create.mdx b/docs/docs-site/pages/gene/components/create.mdx index e9e9c31..a29a8b9 100644 --- a/docs/docs-site/pages/gene/components/create.mdx +++ b/docs/docs-site/pages/gene/components/create.mdx @@ -13,7 +13,7 @@ import Image from 'next/image'; The target library for your new component must be created with the [components-library-generator](https://github.com/brainly/gene/blob/master/packages/gene-tools/src/generators/components-library-generator/README.md). If the library does not exist, you can generate a new one with the following command: ```shell -npx nx g @brainly/gene-tools:components-library +npx nx g @brainly-gene/tools:components-library ``` ### Creating a Component @@ -21,7 +21,7 @@ npx nx g @brainly/gene-tools:components-library To create a component, use the NX plugin's [component-generator](https://github.com/brainly/gene/blob/master/packages/gene-tools/src/generators/component-generator/README.md) or run the following command in the CLI: ```shell -npx nx g @brainly/gene-tools:component --library=my-components-ui +npx nx g @brainly-gene/tools:component --library=my-components-ui ``` **Generator Options:** diff --git a/docs/docs-site/pages/gene/components/event-delegation.mdx b/docs/docs-site/pages/gene/components/event-delegation.mdx index a6dd91f..722eac7 100644 --- a/docs/docs-site/pages/gene/components/event-delegation.mdx +++ b/docs/docs-site/pages/gene/components/event-delegation.mdx @@ -30,7 +30,7 @@ This approach helps avoid prop drilling between nested components and keeps appl Gene provides a `dispatch` method to handle proper event delegation: ```jsx -import { dispatch } from '@brainly/gene' +import { dispatch } from '@brainly-gene/core' export function MyButton({ text }) { const handleClick = React.useCallback((e) => { @@ -50,7 +50,7 @@ To simplify event handling, Gene provides a `useMediator` hook, which manages ev ### Example Usage ```jsx -import { useMediator } from '@brainly/gene' +import { useMediator } from '@brainly-gene/core' import { useRef } from 'react' function MyApp() { diff --git a/docs/docs-site/pages/gene/index.mdx b/docs/docs-site/pages/gene/index.mdx index ddf58da..41bd608 100644 --- a/docs/docs-site/pages/gene/index.mdx +++ b/docs/docs-site/pages/gene/index.mdx @@ -114,7 +114,7 @@ code . ### Generate a new Next.js app ```sh copy -pnpm nx g @brainly/gene-tools:next-app --name my-first-app --no-interactive +pnpm nx g @brainly-gene/tools:next-app --name my-first-app --no-interactive ``` ### Run the app ๐Ÿฅณ diff --git a/docs/docs-site/pages/gene/modules/branching.mdx b/docs/docs-site/pages/gene/modules/branching.mdx index 2b5c345..d05bd4b 100644 --- a/docs/docs-site/pages/gene/modules/branching.mdx +++ b/docs/docs-site/pages/gene/modules/branching.mdx @@ -177,7 +177,7 @@ Based on these assumptions, the following steps should be conducted to use `Cust Core module library can be generated using the NX generator: ```shell copy -nx g @brainly/gene-tools:core-module +nx g @brainly-gene/tools:core-module ``` The structure after application changes can be visualized as below: diff --git a/docs/docs-site/pages/gene/modules/contexts.mdx b/docs/docs-site/pages/gene/modules/contexts.mdx index 2c15c1d..c4e3fe2 100644 --- a/docs/docs-site/pages/gene/modules/contexts.mdx +++ b/docs/docs-site/pages/gene/modules/contexts.mdx @@ -26,7 +26,7 @@ If you want to use context in your module we are recommending usage of `makeStor Example context: ```tsx -import {makeStore} from '@brainly/gene'; +import {makeStore} from '@brainly-gene/core'; export enum Actions { UPDATE_HELLO, @@ -77,7 +77,7 @@ To be able to use context on module level, you need to wrap your module with pro all providers for modules: ```jsx -import {createGeneModule} from '@brainly/gene'; +import {createGeneModule} from '@brainly-gene/core'; import {StoreProvider, AnotherStoreProvider} from './contexts'; import {MyModule as RawMyModule} from './MyModule'; diff --git a/docs/docs-site/pages/gene/modules/custom-hooks.mdx b/docs/docs-site/pages/gene/modules/custom-hooks.mdx index 5a9d537..fc72c3f 100644 --- a/docs/docs-site/pages/gene/modules/custom-hooks.mdx +++ b/docs/docs-site/pages/gene/modules/custom-hooks.mdx @@ -24,7 +24,7 @@ Let's assume the starting point for working on the custom hooks example is a sim ```tsx filename="SimpleModule.tsx" showLineNumbers import {Foo, Loading, FooButtonClick, FooEventsType, FooPropsType} from "@acme/components/simple-ui"; import {useServiceAbc, AbcType} from "@acme/services/service-abc"; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' type TransformedAbcType = { items: Array; @@ -178,7 +178,7 @@ First, let's handle the `Foo` component with a custom hook. The custom hook will ```tsx filename="/hooks/useFoo.ts" import {FooButtonClick, FooEventsType, FooPropsType} from "@acme/components/simple-ui"; import {useServiceAbc, AbcType} from "@acme/services/service-abc"; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import * as React from "react"; type TransformedAbcType = { diff --git a/docs/docs-site/pages/gene/modules/dependencies.mdx b/docs/docs-site/pages/gene/modules/dependencies.mdx index ac96fcd..8af640e 100644 --- a/docs/docs-site/pages/gene/modules/dependencies.mdx +++ b/docs/docs-site/pages/gene/modules/dependencies.mdx @@ -20,7 +20,7 @@ It means that whenever you will be rendering this module you need to inject rout You can define your interface in module, let's take router example: ```jsx -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; // define interface to type it export interface SimpleRouter { @@ -46,7 +46,7 @@ This is how the module looks; now let's try to render it in a NextJS application ```jsx filename="pages/simple.tsx" import {SimpleModule, SimpleRouter, RouterIdentifier} from '@acme/simple-module'; import {Container} from 'inversify'; -import {withIoc} from '@brainly/gene'; +import {withIoc} from '@brainly-gene/core'; import {useRouter} from 'next/router'; // we have to create container getter which will bind router diff --git a/docs/docs-site/pages/gene/modules/development.mdx b/docs/docs-site/pages/gene/modules/development.mdx index 6abcd08..90aec85 100644 --- a/docs/docs-site/pages/gene/modules/development.mdx +++ b/docs/docs-site/pages/gene/modules/development.mdx @@ -13,7 +13,7 @@ import Image from 'next/image' To create a module use generator (use NX plugin and choose [module-generator](https://github.com/brainly/gene/blob/master/packages/gene-tools/src/generators/module-generator/README.md)) or write command in CLI: ```shell copy -nx g @brainly/gene-tools:module +nx g @brainly-gene/tools:module ``` The generator will ask for the application for which the module should be created and the module name. The concept of using modules exclusively by the app is developed in [branching section](/gene/modules/branching). For now, let's focus on the development of the generic module. @@ -193,7 +193,7 @@ The next step is to handle side effects. In Gene, there might be several sources ```tsx filename="SimpleModule.tsx" {1,3,39..45,52,62,65} import {FooButtonClick, FooEventsType} from "@acme/components/simple-ui"; import {useServiceAbc, AbcType} from "@acme/services/service-abc"; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' type TransformedAbcType = { items: Array; @@ -277,7 +277,7 @@ The last piece of the module is the rendering. In this simple scenario, the modu ```tsx filename="SimpleModule.tsx" {1, 68..74} import {Foo, Loading, FooButtonClick, FooEventsType} from "@acme/components/simple-ui"; import {useServiceAbc, AbcType} from "@acme/services/service-abc"; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' type TransformedAbcType = { items: Array; @@ -385,7 +385,7 @@ The component map allows for gathering props for the component into a single obj ```tsx filename="SimpleModule.tsx" showLineNumbers {1,27,57..64,73,82,87,91} import {Foo, Loading, FooButtonClick, FooEventsType, FooPropsType} from "@acme/components/simple-ui"; import {useServiceAbc, AbcType} from "@acme/services/service-abc"; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' type TransformedAbcType = { items: Array; diff --git a/docs/docs-site/pages/gene/modules/index.mdx b/docs/docs-site/pages/gene/modules/index.mdx index 1843488..24bfd3f 100644 --- a/docs/docs-site/pages/gene/modules/index.mdx +++ b/docs/docs-site/pages/gene/modules/index.mdx @@ -216,11 +216,11 @@ context. This design choice promotes reusability and flexibility in various appl ```tsx filename="SimpleModule.tsx" {8,9,10,12,13,14} -import { useInjection } from '@brainly/gene'; +import { useInjection } from '@brainly-gene/core'; import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; const useInit = () => { const {navigate} = useInjection( diff --git a/docs/docs-site/pages/gene/modules/storybook-providers.mdx b/docs/docs-site/pages/gene/modules/storybook-providers.mdx index cd15f66..666d2c9 100644 --- a/docs/docs-site/pages/gene/modules/storybook-providers.mdx +++ b/docs/docs-site/pages/gene/modules/storybook-providers.mdx @@ -17,7 +17,7 @@ title: Storybook Providers To use `StorybookProviders`, generate it with the following `nx` command: ```bash -nx g @brainly/gene-tools:e2e-providers +nx g @brainly-gene/tools:e2e-providers ``` Then import it in your Storybook file: diff --git a/docs/docs-site/pages/gene/services/apollo.mdx b/docs/docs-site/pages/gene/services/apollo.mdx index 1f0ce9b..36b3cc4 100644 --- a/docs/docs-site/pages/gene/services/apollo.mdx +++ b/docs/docs-site/pages/gene/services/apollo.mdx @@ -11,7 +11,7 @@ import { Callout } from 'nextra-theme-docs'; [Generator code](https://github.com/brainly/gene/blob/master/packages/gene-tools/src/generators/service-generator/README.md) ```bash -nx generate @brainly/gene-tools:service --name=myData --directory=my-feature/services --serviceType=apollo +nx generate @brainly-gene/tools:service --name=myData --directory=my-feature/services --serviceType=apollo ``` Running the command above will generate the following structure: @@ -72,12 +72,12 @@ Example page with SSR: ```tsx filename=pages/example.tsx import { compose } from 'ramda'; -import { getRequestHeaders } from '@brainly/gene-next'; +import { getRequestHeaders } from '@brainly-gene/next'; import { getHomePageContainer } from '../ioc/getHomePageIoc'; import { GetServerSideProps } from 'next/types'; -import { withIoc } from '@brainly/gene'; -import { apolloFactory } from '@brainly/gene-apollo'; +import { withIoc } from '@brainly-gene/core'; +import { apolloFactory } from '@brainly-gene/apollo'; import { ApolloClient, InMemoryCache } from '@apollo/client'; import { queryMyTest } from '@acme/services/my-test-service'; diff --git a/docs/docs-site/pages/gene/services/react-query.mdx b/docs/docs-site/pages/gene/services/react-query.mdx index afab425..83550e5 100644 --- a/docs/docs-site/pages/gene/services/react-query.mdx +++ b/docs/docs-site/pages/gene/services/react-query.mdx @@ -11,7 +11,7 @@ import { Callout } from 'nextra-theme-docs'; [Generator code](https://github.com/brainly/gene/blob/master/packages/gene-tools/src/generators/service-generator/README.md) ```bash -nx generate @brainly/gene-tools:service --name=myData --directory=my-feature/services --serviceType=react-query +nx generate @brainly-gene/tools:service --name=myData --directory=my-feature/services --serviceType=react-query ``` Running this command will generate the following files: @@ -77,11 +77,11 @@ Example page with SSR: ```tsx filename=pages/example.tsx import {compose} from 'ramda'; -import {getRequestHeaders} from '@brainly/gene-next'; +import {getRequestHeaders} from '@brainly-gene/next'; import {getHomePageContainer} from '../ioc/getHomePageIoc'; import {GetServerSideProps} from 'next/types'; -import {withIoc, reactQueryFactory} from '@brainly/gene'; +import {withIoc, reactQueryFactory} from '@brainly-gene/core'; import { QueryClient } from '@tanstack/react-query'; import { queryMyTest } from '@acme/services/my-test-service'; @@ -119,10 +119,10 @@ Bind the Query client in the IOC container: import {Container} from 'inversify'; import {getBaseContainer} from './baseIoc'; import {HomePagePropsType} from '../types/types'; -import {ServiceTypes} from '@brainly/gene'; +import {ServiceTypes} from '@brainly-gene/core'; -import {Factory, factory} from '@brainly/gene'; -import {ReactQueryClientType} from '@brainly/gene'; +import {Factory, factory} from '@brainly-gene/core'; +import {ReactQueryClientType} from '@brainly-gene/core'; export function getHomePageContainer(props?: HomePagePropsType) { const baseContainer = getBaseContainer(); @@ -154,7 +154,7 @@ import {queryFn, queryKey, VariablesType} from './queries'; import { transformReactQueryResponse, useInjectedReactQueryClient, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import {useQuery} from '@tanstack/react-query'; export function useMyTest(props?: {variables: VariablesType}) { diff --git a/libs/e2e-testing-providers/src/lib/ioc/contextContainer.ts b/libs/e2e-testing-providers/src/lib/ioc/contextContainer.ts index f1451cf..2ca074e 100644 --- a/libs/e2e-testing-providers/src/lib/ioc/contextContainer.ts +++ b/libs/e2e-testing-providers/src/lib/ioc/contextContainer.ts @@ -2,9 +2,9 @@ import {Container} from 'inversify'; import { AppContextType, APP_CONTEXT_IDENTIFIER, -} from '@brainly/gene'; +} from '@brainly-gene/core'; -import {ActionType, makeStore} from '@brainly/gene'; +import {ActionType, makeStore} from '@brainly-gene/core'; diff --git a/libs/e2e-testing-providers/src/lib/ioc/serviceClientsContainer.ts b/libs/e2e-testing-providers/src/lib/ioc/serviceClientsContainer.ts index 2014f52..be62907 100644 --- a/libs/e2e-testing-providers/src/lib/ioc/serviceClientsContainer.ts +++ b/libs/e2e-testing-providers/src/lib/ioc/serviceClientsContainer.ts @@ -1,6 +1,6 @@ import { Container } from 'inversify'; -import { factory, Factory } from '@brainly/gene'; -import { ServiceTypes } from '@brainly/gene'; +import { factory, Factory } from '@brainly-gene/core'; +import { ServiceTypes } from '@brainly-gene/core'; import { QueryClient } from '@tanstack/react-query'; import { ApolloClient, InMemoryCache, NormalizedCacheObject } from '@apollo/client'; diff --git a/libs/e2e-testing-providers/src/lib/storybook/decorators/StorybookProviders.tsx b/libs/e2e-testing-providers/src/lib/storybook/decorators/StorybookProviders.tsx index 4778467..1d0b40e 100644 --- a/libs/e2e-testing-providers/src/lib/storybook/decorators/StorybookProviders.tsx +++ b/libs/e2e-testing-providers/src/lib/storybook/decorators/StorybookProviders.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import { Provider } from '@brainly/gene'; +import { Provider } from '@brainly-gene/core'; import styles from './StorybookProviders.module.scss'; import { Container, interfaces } from 'inversify'; -import { Router, useMockedRouterContainer } from '@brainly/gene'; +import { Router, useMockedRouterContainer } from '@brainly-gene/core'; import { AppStoreType, @@ -11,9 +11,9 @@ import { useAppContextContainer, useServiceClientsContainer, } from '../../ioc'; -import { Locale, LinkRewriteContextProvider } from '@brainly/gene-next'; -import { getAssetsContainer, NATIVE_IMAGE } from '@brainly/gene'; -import { emit, EventBusContextProvider, register } from '@brainly/gene'; +import { Locale, LinkRewriteContextProvider } from '@brainly-gene/next'; +import { getAssetsContainer, NATIVE_IMAGE } from '@brainly-gene/core'; +import { emit, EventBusContextProvider, register } from '@brainly-gene/core'; type OverwritableContainerKeys = 'adsContainer'; diff --git a/libs/my-data/services/my-data-service/src/lib/queries.ts b/libs/my-data/services/my-data-service/src/lib/queries.ts index 4297c9b..1c98cf1 100644 --- a/libs/my-data/services/my-data-service/src/lib/queries.ts +++ b/libs/my-data/services/my-data-service/src/lib/queries.ts @@ -1,5 +1,5 @@ import { QueryClient, QueryFunctionContext } from '@tanstack/react-query'; -import { reactQueryFetchWrapper } from '@brainly/gene'; +import { reactQueryFetchWrapper } from '@brainly-gene/core'; import nodeFetch from 'node-fetch'; export type MyDataDataTypeAPI = { diff --git a/libs/my-data/services/my-data-service/src/lib/useMyData.ts b/libs/my-data/services/my-data-service/src/lib/useMyData.ts index 3687e58..dfa58fd 100644 --- a/libs/my-data/services/my-data-service/src/lib/useMyData.ts +++ b/libs/my-data/services/my-data-service/src/lib/useMyData.ts @@ -2,7 +2,7 @@ import { queryFn, queryKey, VariablesType } from './queries'; import { transformReactQueryResponse, useInjectedReactQueryClient, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import { useQuery } from '@tanstack/react-query'; export function useMyData(props?: { variables: VariablesType }) { diff --git a/packages/eslint-plugin-gene/package.json b/packages/eslint-plugin-gene/package.json index 3d0e34c..f22ba1f 100644 --- a/packages/eslint-plugin-gene/package.json +++ b/packages/eslint-plugin-gene/package.json @@ -1,5 +1,5 @@ { - "name": "@brainly/eslint-plugin-gene", + "name": "@brainly-gene/eslint-plugin-gene", "version": "0.0.1", "main": "src/index.js", "generators": "./generators.json", diff --git a/packages/gene-apollo/package.json b/packages/gene-apollo/package.json index de9d453..0f2495b 100644 --- a/packages/gene-apollo/package.json +++ b/packages/gene-apollo/package.json @@ -1,5 +1,5 @@ { - "name": "@brainly/gene-apollo", + "name": "@brainly-gene/apollo", "version": "0.0.1", "publishConfig": { "registry": "https://npm.pkg.github.com/", diff --git a/packages/gene-apollo/src/apollo/transformApolloResponse.ts b/packages/gene-apollo/src/apollo/transformApolloResponse.ts index 1d02543..2c2668d 100644 --- a/packages/gene-apollo/src/apollo/transformApolloResponse.ts +++ b/packages/gene-apollo/src/apollo/transformApolloResponse.ts @@ -1,5 +1,5 @@ import { ApolloQueryResult, QueryResult } from '@apollo/client'; -import { CommonServiceType } from '@brainly/gene'; +import { CommonServiceType } from '@brainly-gene/core'; export function transformApolloResponse( response: ApolloQueryResult | QueryResult | undefined diff --git a/packages/gene-apollo/src/apollo/useApolloLazyQuery.spec.tsx b/packages/gene-apollo/src/apollo/useApolloLazyQuery.spec.tsx index 3f2f6dd..c46bc14 100644 --- a/packages/gene-apollo/src/apollo/useApolloLazyQuery.spec.tsx +++ b/packages/gene-apollo/src/apollo/useApolloLazyQuery.spec.tsx @@ -3,7 +3,7 @@ import { mockFetch, mockFetchBasedOnQuery, mockFetchWithDelay, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import { ApolloClient, InMemoryCache, diff --git a/packages/gene-apollo/src/apollo/useApolloLazyQuery.ts b/packages/gene-apollo/src/apollo/useApolloLazyQuery.ts index a09d8c8..8eee70d 100644 --- a/packages/gene-apollo/src/apollo/useApolloLazyQuery.ts +++ b/packages/gene-apollo/src/apollo/useApolloLazyQuery.ts @@ -10,7 +10,7 @@ import { CommonFetchFn, CommonServiceType, FetchPropsType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { apolloClient: ApolloClient; diff --git a/packages/gene-apollo/src/apollo/useApolloObservableQuery.spec.tsx b/packages/gene-apollo/src/apollo/useApolloObservableQuery.spec.tsx index a8be0b4..4395242 100644 --- a/packages/gene-apollo/src/apollo/useApolloObservableQuery.spec.tsx +++ b/packages/gene-apollo/src/apollo/useApolloObservableQuery.spec.tsx @@ -9,9 +9,9 @@ import { } from '@apollo/client'; import gql from 'graphql-tag'; import { makeWatchQuery } from './makeWatchQuery'; -import { mockFetch } from '@brainly/gene'; -import { useMockedRouterContainer } from '@brainly/gene'; -import { Provider } from '@brainly/gene'; +import { mockFetch } from '@brainly-gene/core'; +import { useMockedRouterContainer } from '@brainly-gene/core'; +import { Provider } from '@brainly-gene/core'; mockFetch(); diff --git a/packages/gene-apollo/src/apollo/useApolloObservableQuery.ts b/packages/gene-apollo/src/apollo/useApolloObservableQuery.ts index a68c7fe..34649cc 100644 --- a/packages/gene-apollo/src/apollo/useApolloObservableQuery.ts +++ b/packages/gene-apollo/src/apollo/useApolloObservableQuery.ts @@ -3,16 +3,16 @@ import { ApolloQueryResult, ObservableQuery } from '@apollo/client'; import { transformApolloResponse } from './transformApolloResponse'; import { merge } from 'zen-observable/extras'; import { Observable } from 'zen-observable-ts'; -import { isServer } from '@brainly/gene'; +import { isServer } from '@brainly-gene/core'; import { FetchMoreQueryOptions, FetchMoreOptions } from '@apollo/client'; import { ROUTER_SERVICE_IDENTIFIER, RouterEvent, RouterIocType, -} from '@brainly/gene'; -import { useObservableQuery } from '@brainly/gene'; -import { useInjection } from '@brainly/gene'; +} from '@brainly-gene/core'; +import { useObservableQuery } from '@brainly-gene/core'; +import { useInjection } from '@brainly-gene/core'; /** * diff --git a/packages/gene-apollo/src/apollo/useInjectedApollo.ts b/packages/gene-apollo/src/apollo/useInjectedApollo.ts index e853469..93cf3f6 100644 --- a/packages/gene-apollo/src/apollo/useInjectedApollo.ts +++ b/packages/gene-apollo/src/apollo/useInjectedApollo.ts @@ -1,7 +1,7 @@ import { ApolloClient, NormalizedCacheObject } from '@apollo/client'; -import { Factory } from '@brainly/gene'; -import { useInjection } from '@brainly/gene'; -import { ServiceTypes } from '@brainly/gene'; +import { Factory } from '@brainly-gene/core'; +import { useInjection } from '@brainly-gene/core'; +import { ServiceTypes } from '@brainly-gene/core'; export function useInjectedApolloClient() { try { diff --git a/packages/gene-next/package.json b/packages/gene-next/package.json index b1b5ccc..95bf914 100644 --- a/packages/gene-next/package.json +++ b/packages/gene-next/package.json @@ -1,5 +1,5 @@ { - "name": "@brainly/gene-next", + "name": "@brainly-gene/next", "version": "0.0.1", "publishConfig": { "registry": "https://npm.pkg.github.com/", diff --git a/packages/gene-next/src/image-assets/components/NextImage.tsx b/packages/gene-next/src/image-assets/components/NextImage.tsx index 8394731..11050b8 100644 --- a/packages/gene-next/src/image-assets/components/NextImage.tsx +++ b/packages/gene-next/src/image-assets/components/NextImage.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import Image from 'next/future/image'; -import { GeneImagePropsType } from '@brainly/gene'; +import { GeneImagePropsType } from '@brainly-gene/core'; export const NextImage = ({ ...props }: GeneImagePropsType) => { return ; diff --git a/packages/gene-next/src/image-assets/components/NextImageImgproxyLoader.tsx b/packages/gene-next/src/image-assets/components/NextImageImgproxyLoader.tsx index 192e020..22cd0b9 100644 --- a/packages/gene-next/src/image-assets/components/NextImageImgproxyLoader.tsx +++ b/packages/gene-next/src/image-assets/components/NextImageImgproxyLoader.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import Image, { ImageProps } from 'next/future/image'; -import { GeneImagePropsType } from '@brainly/gene'; +import { GeneImagePropsType } from '@brainly-gene/core'; const normalizeSrc = (src: string) => { return src.startsWith('/') ? src.slice(1) : src; diff --git a/packages/gene-next/src/image-assets/ioc.ts b/packages/gene-next/src/image-assets/ioc.ts index 79e1510..64e23d5 100644 --- a/packages/gene-next/src/image-assets/ioc.ts +++ b/packages/gene-next/src/image-assets/ioc.ts @@ -5,7 +5,7 @@ import { GeneImagePropsType, GENE_IMAGE_COMPONENT_IDENTIFIER, NATIVE_IMAGE, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import NextImage from './components/NextImage'; import NextImageImgproxyLoader from './components/NextImageImgproxyLoader'; diff --git a/packages/gene-next/src/routing/ioc.ts b/packages/gene-next/src/routing/ioc.ts index 234b70e..d4938b6 100644 --- a/packages/gene-next/src/routing/ioc.ts +++ b/packages/gene-next/src/routing/ioc.ts @@ -4,7 +4,7 @@ import { ROUTER_SERVICE_IDENTIFIER, Router, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; export const NEXT_ROUTER = Symbol.for('nextRouter'); diff --git a/packages/gene-next/src/routing/routers/next.ts b/packages/gene-next/src/routing/routers/next.ts index 92cd95c..93fcc1d 100644 --- a/packages/gene-next/src/routing/routers/next.ts +++ b/packages/gene-next/src/routing/routers/next.ts @@ -5,7 +5,7 @@ import { Router, RouterEvent, UrlObject, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import { useGenerator } from './generate'; import { assign } from './native'; import { Observable } from 'zen-observable-ts'; diff --git a/packages/gene-sentry/package.json b/packages/gene-sentry/package.json index c6faf18..0f02ef2 100644 --- a/packages/gene-sentry/package.json +++ b/packages/gene-sentry/package.json @@ -1,5 +1,5 @@ { - "name": "@brainly/gene-sentry", + "name": "@brainly-gene/sentry", "version": "0.0.1", "publishConfig": { "registry": "https://npm.pkg.github.com/", diff --git a/packages/gene-sentry/src/sentry/logging/types.ts b/packages/gene-sentry/src/sentry/logging/types.ts index e59ab5b..9459808 100644 --- a/packages/gene-sentry/src/sentry/logging/types.ts +++ b/packages/gene-sentry/src/sentry/logging/types.ts @@ -1,4 +1,4 @@ -import { ErrorMessage, LogLevel, Severity } from '@brainly/gene'; +import { ErrorMessage, LogLevel, Severity } from '@brainly-gene/core'; export type SentryErrorMessage = ErrorMessage & Readonly<{ diff --git a/packages/gene-tools/bin/create-gene-workspace.js b/packages/gene-tools/bin/create-gene-workspace.js index a00ad62..aa14021 100755 --- a/packages/gene-tools/bin/create-gene-workspace.js +++ b/packages/gene-tools/bin/create-gene-workspace.js @@ -87,17 +87,17 @@ async function runCommands() { await execCommand('pnpm', [ 'install', - `@brainly/gene@${packageVersion}`, - `@brainly/gene-next@${packageVersion}`, - `@brainly/gene-apollo@${packageVersion}`, + `@brainly-gene/core@${packageVersion}`, + `@brainly-gene/next@${packageVersion}`, + `@brainly-gene/apollo@${packageVersion}`, 'brainly-style-guide', ]); // Install dev dependencies await execCommand('pnpm', [ 'install', - `@brainly/gene-tools@${packageVersion}`, - `@brainly/eslint-plugin-gene@${packageVersion}`, + `@brainly-gene/tools@${packageVersion}`, + `@brainly-gene/eslint-plugin-gene@${packageVersion}`, '-D', ]); @@ -105,7 +105,7 @@ async function runCommands() { await execCommand('pnpm', [ 'nx', 'g', - '@brainly/gene-tools:gene-workspace', + '@brainly-gene/tools:gene-workspace', ]); } catch (error) { console.error(error); diff --git a/packages/gene-tools/package.json b/packages/gene-tools/package.json index b451fee..570530d 100644 --- a/packages/gene-tools/package.json +++ b/packages/gene-tools/package.json @@ -1,5 +1,5 @@ { - "name": "@brainly/gene-tools", + "name": "@brainly-gene/tools", "version": "0.0.1", "generators": "./generators.json", "executors": "./executors.json", diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ExternalTypeDispatch.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ExternalTypeDispatch.tsx index cd4d500..2d76cf1 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ExternalTypeDispatch.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ExternalTypeDispatch.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {dispatch} from '@brainly/gene'; +import {dispatch} from '@brainly-gene/core'; import {ExampleOnClickType, ExampleEventsType} from '@acme/example'; type PropsType = Readonly<{ diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidConditionalRender.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidConditionalRender.stories.tsx index 5508614..898dc4f 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidConditionalRender.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidConditionalRender.stories.tsx @@ -2,7 +2,7 @@ import {ValidConditionalRenderEventsType} from './ValidConditionalRenderEventsTy import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; import ValidConditionalRender from './ValidConditionalRender'; const EVENTS_LIST = [ diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.stories.tsx index 6665275..fbe9bad 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.stories.tsx @@ -2,7 +2,7 @@ import {ValidDispatchEventsType} from './ValidDispatchEventsType'; import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; import InvalidDispatch from './InvalidDispatch'; import {array} from '@storybook/addon-knobs'; diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.tsx index 7e8b082..951bed3 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/InvalidDispatch.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {dispatch} from '@brainly/gene'; +import {dispatch} from '@brainly-gene/core'; type PropsType = Readonly<{ id: string; diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/MissingDispatch.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/MissingDispatch.stories.tsx index 0761871..e2efc25 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/MissingDispatch.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/MissingDispatch.stories.tsx @@ -2,7 +2,7 @@ import {MissingDispatchEventsType} from './MissingDispatchEventsType'; import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; const EVENTS_LIST = [ { diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/MissingListStories.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/MissingListStories.stories.tsx index 4daaf4f..2e6f062 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/MissingListStories.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/MissingListStories.stories.tsx @@ -2,7 +2,7 @@ import {ValidDispatchEventsType} from './ValidDispatchEventsType'; import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; import MissingListStories from './MissingListStories'; const EVENTS_LIST = [ diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/NotAllowedMocks.spec.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/NotAllowedMocks.spec.tsx index 8e6b6b9..f70d417 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/NotAllowedMocks.spec.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/NotAllowedMocks.spec.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import {render} from '@testing-library/react'; import CmpsList from './NotApplyListSpecCoverage'; -jest.mock('@brainly/gene-xyz', () => ({ +jest.mock('@brainly-gene/core-xyz', () => ({ testFn: jest.fn(), })); diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRender.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRender.stories.tsx index 67530b2..e4a76ad 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRender.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRender.stories.tsx @@ -2,7 +2,7 @@ import {ValidConditionalRenderEventsType} from './ValidConditionalRenderEventsTy import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; import ValidConditionalRender from './ValidConditionalRender'; import {text} from '@storybook/addon-knobs'; diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRenderWithoutKnobs.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRenderWithoutKnobs.stories.tsx index 4472582..e41c28d 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRenderWithoutKnobs.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidConditionalRenderWithoutKnobs.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages} from '@brainly/gene'; +import {registerStoryInPackages} from '@brainly-gene/core'; import ValidConditionalRenderWithoutKnobs from './ValidConditionalRenderWithoutKnobs'; storiesOf(registerStoryInPackages('components/ProgressTrackingItem'), module) diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.stories.tsx index 12d56c2..c2e8e25 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.stories.tsx @@ -2,7 +2,7 @@ import {ValidDispatchEventsType} from './ValidDispatchEventsType'; import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; import ValidDispatch from './ValidDispatch'; import {array} from '@storybook/addon-knobs'; diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.tsx index 901cf8a..43c5ffd 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatch.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {dispatch} from '@brainly/gene'; +import {dispatch} from '@brainly-gene/core'; import {ValidDispatchEventsType, ClickEvent} from './ValidDispatchEventsType'; type PropsType = Readonly<{ diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatchPrivate.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatchPrivate.tsx index 982894d..35ecb70 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatchPrivate.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidDispatchPrivate.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {dispatch} from '@brainly/gene'; +import {dispatch} from '@brainly-gene/core'; import {ValidDispatchEventsType, ClickEvent} from './ValidDispatchEventsType'; type PropsType = Readonly<{ diff --git a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidListStories.stories.tsx b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidListStories.stories.tsx index dae0a4f..885151d 100644 --- a/packages/gene-tools/src/checkers/component-report/mocks/components/ValidListStories.stories.tsx +++ b/packages/gene-tools/src/checkers/component-report/mocks/components/ValidListStories.stories.tsx @@ -2,7 +2,7 @@ import {ValidListStoriesEventsType} from './ValidListStoriesEventsType'; import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {registerStoryInPackages, StorybookMediator} from '@brainly/gene'; +import {registerStoryInPackages, StorybookMediator} from '@brainly-gene/core'; import ValidListStories from './ValidListStories'; import {array} from '@storybook/addon-knobs'; diff --git a/packages/gene-tools/src/checkers/component-report/validators/eventsValidator.js b/packages/gene-tools/src/checkers/component-report/validators/eventsValidator.js index c7d1213..489955e 100644 --- a/packages/gene-tools/src/checkers/component-report/validators/eventsValidator.js +++ b/packages/gene-tools/src/checkers/component-report/validators/eventsValidator.js @@ -47,7 +47,7 @@ function getDispatchedEvents(file) { const importedFrom = importDeclaration.source.value; - return importedFrom === '@brainly/gene'; + return importedFrom === '@brainly-gene/core'; }) .map((p) => p.node.arguments[1].elements[0]); } diff --git a/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.js b/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.js index f582dac..2d4d266 100644 --- a/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.js +++ b/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.js @@ -25,7 +25,7 @@ const getUnnecessaryMocks = R.pipe( j, getMockMemberExpressions, R.map(R.path(['parentPath', 'value', 'arguments', 0, 'value'])), - R.filter(R.includes('@brainly/gene')), + R.filter(R.includes('@brainly-gene/core')), R.map(noAllowedMock => `\`${noAllowedMock}\``), R.join(', '), R.ifElse( diff --git a/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.spec.js b/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.spec.js index 06ffc20..35cbe94 100644 --- a/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.spec.js +++ b/packages/gene-tools/src/checkers/component-report/validators/testsValidator/mocksValidator.spec.js @@ -3,7 +3,7 @@ const { getUnnecessaryMocks } = require('./mocksValidator'); describe('getUnnecessaryMocks', () => { it('returns null when there are no mocks', () => { const testsSrc = ` - import { something } from '@brainly/server-logger'; + import { something } from '@brainly-gene/server-logger'; const result = something(); `; @@ -11,11 +11,11 @@ describe('getUnnecessaryMocks', () => { expect(result).toBeNull(); }); - it('returns null when there are mocks but none from @brainly/gene path', () => { + it('returns null when there are mocks but none from @brainly-gene/core path', () => { const testsSrc = ` - import { something } from '@brainly/server-logger'; + import { something } from '@brainly-gene/server-logger'; - jest.mock('@brainly/server-logger'); + jest.mock('@brainly-gene/server-logger'); const result = something(); `; @@ -23,34 +23,34 @@ describe('getUnnecessaryMocks', () => { expect(result).toBeNull(); }); - it('returns message when there are unnecessary mocks from @brainly/gene path', () => { + it('returns message when there are unnecessary mocks from @brainly-gene/core path', () => { const testsSrc = ` - import { something } from '@brainly/gene'; + import { something } from '@brainly-gene/core'; - jest.mock('@brainly/gene'); + jest.mock('@brainly-gene/core'); const result = something(); `; const result = getUnnecessaryMocks({ testsSrc }); expect(result).toBe( - 'There are unnecessary mocks on modules: `@brainly/gene`' + 'There are unnecessary mocks on modules: `@brainly-gene/core`' ); }); - it('returns message when there are multiple unnecessary mocks from @brainly/gene path', () => { + it('returns message when there are multiple unnecessary mocks from @brainly-gene/core path', () => { const testsSrc = ` - import { something } from '@brainly/gene'; - import { anotherThing } from '@brainly/gene'; - import { logger } from '@brainly/server-logger'; + import { something } from '@brainly-gene/core'; + import { anotherThing } from '@brainly-gene/core'; + import { logger } from '@brainly-gene/server-logger'; - jest.mock('@brainly/gene'); - jest.mock('@brainly/server-logger'); + jest.mock('@brainly-gene/core'); + jest.mock('@brainly-gene/server-logger'); const result = something(); `; const result = getUnnecessaryMocks({ testsSrc }); expect(result).toBe( - 'There are unnecessary mocks on modules: `@brainly/gene`' + 'There are unnecessary mocks on modules: `@brainly-gene/core`' ); }); }); diff --git a/packages/gene-tools/src/checkers/component-report/validators/testsValidator/testsValidator.spec.js b/packages/gene-tools/src/checkers/component-report/validators/testsValidator/testsValidator.spec.js index 7e2a62d..a21b487 100644 --- a/packages/gene-tools/src/checkers/component-report/validators/testsValidator/testsValidator.spec.js +++ b/packages/gene-tools/src/checkers/component-report/validators/testsValidator/testsValidator.spec.js @@ -104,7 +104,7 @@ describe('validateTests()', () => { expect(result.valid).toBe(false); expect(result.type).not.toBe('experimental'); - expect(result.error).toContain('`@brainly/gene-xyz`'); + expect(result.error).toContain('`@brainly-gene/core-xyz`'); expect(result.error).toContain('There are unnecessary mocks on modules:'); }); }); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidModule.tsx index c860292..534a331 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-export-delegates/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/InvalidModule.tsx index 647a595..006ceec 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {useModuleInjection} from '@brainly/gene'; +import {useModuleInjection} from '@brainly-gene/core'; function useInit() { const ref = React.useRef(); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidModule.tsx index c860292..534a331 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-declaration/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidModule.tsx index c860292..534a331 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-spec/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidModule.tsx index c860292..534a331 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook-ignore-by-config/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/invalid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidModule.tsx index c860292..534a331 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-app-modules-no-storybook/app-modules/src/lib/valid-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-export-module/modules/invalid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/InvalidModule.tsx index 860bed5..b191806 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {extendGeneModule, useModuleInjection} from '@brainly/gene'; +import {extendGeneModule, useModuleInjection} from '@brainly-gene/core'; function useInit() { const ref = React.useRef(); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-extend-declaration/modules/invalid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec-ignore-by-config/modules/invalid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-spec/modules/invalid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/InvalidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/InvalidModule.tsx index a7e92a9..b7e640d 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/InvalidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/InvalidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/invalid-core-module-no-storybook/modules/invalid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/AnotherValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/AnotherValidModule.tsx index 72b712d..54669f6 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/AnotherValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/AnotherValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/another-module/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidVariationWithDisabledStorybookModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidVariationWithDisabledStorybookModule.tsx index c935427..5aa48ad 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidVariationWithDisabledStorybookModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidVariationWithDisabledStorybookModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidWithDisabledStorybookModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidWithDisabledStorybookModule.tsx index c5d1f46..94c3e76 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidWithDisabledStorybookModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/ValidWithDisabledStorybookModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/hooks/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/hooks/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/hooks/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module-with-disabled-storybook/hooks/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidModule.tsx index 4e5b44b..6201cf4 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/hooks/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/hooks/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/hooks/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-app-modules/app-modules/src/lib/valid-module/hooks/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidModule.tsx index c860292..534a331 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidVariationModule.tsx b/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidVariationModule.tsx index 000f596..79cca57 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidVariationModule.tsx +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/ValidVariationModule.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {createGeneModule, useModuleInjection} from '@brainly/gene'; +import {createGeneModule, useModuleInjection} from '@brainly-gene/core'; import { useSomeLogic } from './delegates/useSomeLogic'; const symbolIdent = Symbol.for('injectionExample'); diff --git a/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/delegates/useSomeLogic.ts b/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/delegates/useSomeLogic.ts index f57cc1e..8076322 100644 --- a/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/delegates/useSomeLogic.ts +++ b/packages/gene-tools/src/checkers/module-report/mocks/valid-core-module/modules/valid-module/src/lib/delegates/useSomeLogic.ts @@ -1,15 +1,15 @@ -import {useInjection} from '@brainly/gene'; +import {useInjection} from '@brainly-gene/core'; import { TRANSLATION_SERVICE_IDENTIFIER, TranslationServiceType, -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; import {useQuestion} from '@acme/social-qa/question/services/question-service'; import * as React from 'react'; -import {useMediator} from '@brainly/gene' +import {useMediator} from '@brainly-gene/core' import { ROUTER_SERVICE_IDENTIFIER, RouterIocType, -} from '@brainly/gene'; +} from '@brainly-gene/core'; type PropsType = { ref: React.MutableRefObject; diff --git a/packages/gene-tools/src/executors/copy-assets-to-app/copy-assets-to-app.ts b/packages/gene-tools/src/executors/copy-assets-to-app/copy-assets-to-app.ts index d2c60c7..521b2ad 100644 --- a/packages/gene-tools/src/executors/copy-assets-to-app/copy-assets-to-app.ts +++ b/packages/gene-tools/src/executors/copy-assets-to-app/copy-assets-to-app.ts @@ -15,7 +15,7 @@ async function executor(options, context) { if (!workspace.projects[assetsProject]) { throw new Error( - `Project "${assetsProject}" not found in workspace. You can generate it using "nx g @brainly/gene-tools:assets-library".` + `Project "${assetsProject}" not found in workspace. You can generate it using "nx g @brainly-gene/tools:assets-library".` ); } diff --git a/packages/gene-tools/src/executors/copy-assets-to-storybook/copy-assets-to-storybook.ts b/packages/gene-tools/src/executors/copy-assets-to-storybook/copy-assets-to-storybook.ts index 1db699c..a095a8e 100644 --- a/packages/gene-tools/src/executors/copy-assets-to-storybook/copy-assets-to-storybook.ts +++ b/packages/gene-tools/src/executors/copy-assets-to-storybook/copy-assets-to-storybook.ts @@ -13,7 +13,7 @@ async function executor(options, context) { if (!workspace.projects[assetsProject]) { throw new Error( - `Project "${assetsProject}" not found in workspace. You can generate it using "nx g @brainly/gene-tools:assets-library".` + `Project "${assetsProject}" not found in workspace. You can generate it using "nx g @brainly-gene/tools:assets-library".` ); } diff --git a/packages/gene-tools/src/executors/copy-assets-to-storybook/prepare-storybook-root-assets.js b/packages/gene-tools/src/executors/copy-assets-to-storybook/prepare-storybook-root-assets.js index cf91a80..3dfa486 100644 --- a/packages/gene-tools/src/executors/copy-assets-to-storybook/prepare-storybook-root-assets.js +++ b/packages/gene-tools/src/executors/copy-assets-to-storybook/prepare-storybook-root-assets.js @@ -21,11 +21,11 @@ function prepareStorybookRootAssets(workspaceRoot) { console.log('Check if .storybook directory exists'); if (!existsSync(resolve(workspaceRoot, '.storybook/main.js'))) { console.log( - 'No .storybook directory found. Running nx g @brainly/gene-tools:storybook-init' + 'No .storybook directory found. Running nx g @brainly-gene/tools:storybook-init' ); const packageManager = detectPackageManager(); - execSync(`${packageManager} nx g @brainly/gene-tools:storybook-init`); + execSync(`${packageManager} nx g @brainly-gene/tools:storybook-init`); execSync(`${packageManager} msw init .storybook/msw --save=true`); } diff --git a/packages/gene-tools/src/executors/copy-translations-to-app/copy-translations-to-app.ts b/packages/gene-tools/src/executors/copy-translations-to-app/copy-translations-to-app.ts index 1c3eaf1..8bb7d90 100644 --- a/packages/gene-tools/src/executors/copy-translations-to-app/copy-translations-to-app.ts +++ b/packages/gene-tools/src/executors/copy-translations-to-app/copy-translations-to-app.ts @@ -15,7 +15,7 @@ async function executor(options, context) { if (!workspace.projects[translationsProject]) { throw new Error( - `Project "${translationsProject}" not found in workspace. You can generate it using "nx g @brainly/gene-tools:translations-library".` + `Project "${translationsProject}" not found in workspace. You can generate it using "nx g @brainly-gene/tools:translations-library".` ); } diff --git a/packages/gene-tools/src/executors/copy-translations-to-storybook/copy-translations-to-storybook.ts b/packages/gene-tools/src/executors/copy-translations-to-storybook/copy-translations-to-storybook.ts index 8dea4af..bccc0fe 100644 --- a/packages/gene-tools/src/executors/copy-translations-to-storybook/copy-translations-to-storybook.ts +++ b/packages/gene-tools/src/executors/copy-translations-to-storybook/copy-translations-to-storybook.ts @@ -9,7 +9,7 @@ async function executor(options, context) { if (!workspace.projects[translationsProject]) { throw new Error( - `Project "${translationsProject}" not found in workspace. You can generate it using "nx g @brainly/gene-tools:translations-library".` + `Project "${translationsProject}" not found in workspace. You can generate it using "nx g @brainly-gene/tools:translations-library".` ); } diff --git a/packages/gene-tools/src/executors/secure-serve/README.md b/packages/gene-tools/src/executors/secure-serve/README.md index c67a506..4d28f6c 100644 --- a/packages/gene-tools/src/executors/secure-serve/README.md +++ b/packages/gene-tools/src/executors/secure-serve/README.md @@ -49,7 +49,7 @@ In the project configuration, add a `serve-base` target that serves the Next.js } }, "serve": { - "executor": "@brainly/gene-tools:secure-serve", + "executor": "@brainly-gene/tools:secure-serve", "options": { "serveTarget": "app1:serve-base" }, diff --git a/packages/gene-tools/src/generators/api-route-generator/files/__fileName__.ts__tmpl__ b/packages/gene-tools/src/generators/api-route-generator/files/__fileName__.ts__tmpl__ index e94e9a5..5b37a4c 100644 --- a/packages/gene-tools/src/generators/api-route-generator/files/__fileName__.ts__tmpl__ +++ b/packages/gene-tools/src/generators/api-route-generator/files/__fileName__.ts__tmpl__ @@ -1,4 +1,4 @@ -import {apiHandlerConnect} from '@brainly/gene-next'; +import {apiHandlerConnect} from '@brainly-gene/next'; <% if (wrapWithSentry) { %> import {wrapApiHandlerWithSentry} from '@sentry/nextjs'; <% } %> // import {get<%= pascalCaseFileName %>, post<%= pascalCaseFileName %>} from '@<%= npmScope %>/some-lib' <% if (addCors) { %> import cors from 'cors'; <% } %> diff --git a/packages/gene-tools/src/generators/bff-app-generator/README.md b/packages/gene-tools/src/generators/bff-app-generator/README.md index e30b0a6..f2dab51 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/README.md +++ b/packages/gene-tools/src/generators/bff-app-generator/README.md @@ -7,7 +7,7 @@ Generates a new Backend For Frontend BFF (NextJS NX application). Application is Run the following command and follow the instructions. ``` -yarn nx g @brainly/gene-tools:component +yarn nx g @brainly-gene/tools:component ``` Schema file for running this generator with appropriate description of options is available [here](./schema.json). @@ -80,5 +80,5 @@ Use `--dry-run` flag in order to check what files will be generated without gene Example: ``` -yarn nx g @brainly/gene-tools:bff-app --name web --directory examples/bff/us --tags social-qa --rewrites true --apollo true --reactQuery true --e2e true +yarn nx g @brainly-gene/tools:bff-app --name web --directory examples/bff/us --tags social-qa --rewrites true --apollo true --reactQuery true --e2e true ``` diff --git a/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/baseIoc.ts__tmpl__ b/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/baseIoc.ts__tmpl__ index 572a862..03f6d85 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/baseIoc.ts__tmpl__ +++ b/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/baseIoc.ts__tmpl__ @@ -3,7 +3,7 @@ import { Container } from 'inversify'; <% if (apollo) { %> import { ApolloClient, InMemoryCache } from '@apollo/client'; -import { ApolloClientType, apolloFactory } from '@brainly/gene-apollo'; +import { ApolloClientType, apolloFactory } from '@brainly-gene/apollo'; <% } %> @@ -12,7 +12,7 @@ import { ApolloClientType, apolloFactory } from '@brainly/gene-apollo'; import { ReactQueryClientType, reactQueryFactory, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import { QueryClient } from '@tanstack/react-query'; <% } %> diff --git a/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ b/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ index ab992ca..9294de2 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ +++ b/packages/gene-tools/src/generators/bff-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ @@ -3,22 +3,22 @@ import {getBaseContainer} from './baseIoc'; import {HomePagePropsType} from '../types/types'; <% if (apollo && !reactQuery) { %> - import {factory, Factory} from '@brainly/gene'; - import {ServiceTypes} from '@brainly/gene' -import { ApolloClientType } from '@brainly/gene-apollo'; + import {factory, Factory} from '@brainly-gene/core'; + import {ServiceTypes} from '@brainly-gene/core' +import { ApolloClientType } from '@brainly-gene/apollo'; <% } %> <% if (reactQuery && !apollo) { %> - import {factory, Factory} from '@brainly/gene'; - import {ReactQueryClientType} from '@brainly/gene' -import {ServiceTypes} from '@brainly/gene' + import {factory, Factory} from '@brainly-gene/core'; + import {ReactQueryClientType} from '@brainly-gene/core' +import {ServiceTypes} from '@brainly-gene/core' <% } %> <% if (apollo && reactQuery) { %> - import {factory, Factory} from '@brainly/gene'; - import {ApolloClientType} from '@brainly/gene-apollo'; - import {ReactQueryClientType} from '@brainly/gene'; - import {ServiceTypes} from '@brainly/gene'; + import {factory, Factory} from '@brainly-gene/core'; + import {ApolloClientType} from '@brainly-gene/apollo'; + import {ReactQueryClientType} from '@brainly-gene/core'; + import {ServiceTypes} from '@brainly-gene/core'; <% } %> export function getHomePageContainer(props?: HomePagePropsType) { diff --git a/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/docs/openapi.ts__tmpl__ b/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/docs/openapi.ts__tmpl__ index ec1ed95..bd6b7df 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/docs/openapi.ts__tmpl__ +++ b/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/docs/openapi.ts__tmpl__ @@ -1,4 +1,4 @@ -import {apiHandlerConnect} from '@brainly/gene-next'; +import {apiHandlerConnect} from '@brainly-gene/next'; import openApiDocumentation from '../../../config/openApi'; export default apiHandlerConnect().get(async (req, res) => { diff --git a/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/health.ts__tmpl__ b/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/health.ts__tmpl__ index 1d01d95..4e16834 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/health.ts__tmpl__ +++ b/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/health.ts__tmpl__ @@ -1,4 +1,4 @@ -import {apiHandlerConnect} from '@brainly/gene-next'; +import {apiHandlerConnect} from '@brainly-gene/next'; import {getHealth} from '@<%= npmScope %>/api-utils'; export default apiHandlerConnect().get(getHealth); diff --git a/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/v1/endpoint.ts__tmpl__ b/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/v1/endpoint.ts__tmpl__ index 7311fea..05f4887 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/v1/endpoint.ts__tmpl__ +++ b/packages/gene-tools/src/generators/bff-app-generator/files/app/pages/api/v1/endpoint.ts__tmpl__ @@ -1,4 +1,4 @@ -import {apiHandlerConnect} from '@brainly/gene-next'; +import {apiHandlerConnect} from '@brainly-gene/next'; import {legacyApiMiddleware} from '@<%= npmScope %>/middlewares'; import cors from 'cors'; diff --git a/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceAppTargetTemplate.ejs b/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceAppTargetTemplate.ejs index 83aaed1..c31eea4 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceAppTargetTemplate.ejs +++ b/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceAppTargetTemplate.ejs @@ -48,7 +48,7 @@ } }, "serve": { - "executor": "@brainly/gene-tools:secure-serve", + "executor": "@brainly-gene/tools:secure-serve", "options": { "serveTarget": "<%= projectName %>:serve-base" }, @@ -73,9 +73,9 @@ } }, "copy-translations-to-app": { - "executor": "@brainly/gene-tools:copy-translations-to-app" + "executor": "@brainly-gene/tools:copy-translations-to-app" }, "copy-assets-to-app": { - "executor": "@brainly/gene-tools:copy-assets-to-app" + "executor": "@brainly-gene/tools:copy-assets-to-app" } } diff --git a/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceE2ETargetTemplate.ejs b/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceE2ETargetTemplate.ejs index 1bf0768..2e4e090 100644 --- a/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceE2ETargetTemplate.ejs +++ b/packages/gene-tools/src/generators/bff-app-generator/utils/workspaceE2ETargetTemplate.ejs @@ -1,6 +1,6 @@ { "e2e": { - "executor": "@brainly/gene-tools:e2e-with-serve", + "executor": "@brainly-gene/tools:e2e-with-serve", "options": { "e2eTests": ["<%= projectName %>-e2e:e2e-base"], "serve": "<%= projectName %>:serve-base" diff --git a/packages/gene-tools/src/generators/component-generator/README.md b/packages/gene-tools/src/generators/component-generator/README.md index 99cb3f7..66bdd91 100644 --- a/packages/gene-tools/src/generators/component-generator/README.md +++ b/packages/gene-tools/src/generators/component-generator/README.md @@ -7,7 +7,7 @@ Generats a new component in selected library. Uses [schematic component](/packag Run the following command and follow the instructions. ``` -yarn nx g @brainly/gene-tools:component +yarn nx g @brainly-gene/tools:component ``` Basic schema file for running this generator with appropriate description of options is available [here](./schema.json). Additional options are available in [component schematic](/packages/cli/src/component/schema.json). @@ -40,5 +40,5 @@ Use `--dry-run` flag in order to check what files will be generated without gene Example: ``` -yarn nx g @brainly/gene-tools:component --dry-run +yarn nx g @brainly-gene/tools:component --dry-run ``` diff --git a/packages/gene-tools/src/generators/component-generator/templates/__filename__.spec.tsx__tmpl__ b/packages/gene-tools/src/generators/component-generator/templates/__filename__.spec.tsx__tmpl__ index e839a63..9b64b58 100644 --- a/packages/gene-tools/src/generators/component-generator/templates/__filename__.spec.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/component-generator/templates/__filename__.spec.tsx__tmpl__ @@ -1,7 +1,7 @@ import * as React from 'react'; import {render, screen, fireEvent} from '@testing-library/react'; import '@testing-library/jest-dom'; -<% if (events) { %>import {promiseFromEvent} from '@brainly/gene'; +<% if (events) { %>import {promiseFromEvent} from '@brainly-gene/core'; import {<%= eventsTypeName(name) %>} from './<%= eventsTypeName(name) %>';<% } %> import <%= classify(name) %>, {PropsType} from './<%= classify(name) %>'; <% if (props || copy) { %> diff --git a/packages/gene-tools/src/generators/component-generator/templates/__filename__.stories.tsx__tmpl__ b/packages/gene-tools/src/generators/component-generator/templates/__filename__.stories.tsx__tmpl__ index 8de972d..f8d1061 100644 --- a/packages/gene-tools/src/generators/component-generator/templates/__filename__.stories.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/component-generator/templates/__filename__.stories.tsx__tmpl__ @@ -3,7 +3,7 @@ <% } %> import * as React from 'react'; import {storiesOf} from '@storybook/react'; -import {StorybookMediator} from '@brainly/gene'; +import {StorybookMediator} from '@brainly-gene/core'; <% if (storybookKnobs.length > 0) { %>import {<%= storybookKnobs.join(', ') %>} from '@storybook/addon-knobs';<% } %> import <%= classify(name) %> from './<%= classify(name) %>'; <% if (events) { %>import {<%= eventsTypeName(name) %>} from './<%= eventsTypeName(name) %>';<% } %> diff --git a/packages/gene-tools/src/generators/component-generator/templates/__filename__.tsx__tmpl__ b/packages/gene-tools/src/generators/component-generator/templates/__filename__.tsx__tmpl__ index 155f612..8a467f5 100644 --- a/packages/gene-tools/src/generators/component-generator/templates/__filename__.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/component-generator/templates/__filename__.tsx__tmpl__ @@ -6,7 +6,7 @@ import * as React from 'react'; <% if (copy) { %>import {<% if (shouldAddFlowDeclaration) { %>type <% } %><%= copyTypeName(name) %>} from './<%= copyTypeName(name) %>';<% } %> <% if (styles) { %>import styles from './<%= classify(name) %>.module.<%= stylesExtension %>'; import cx from 'classnames';<% } %> -<% if (events) { %>import {dispatch} from '@brainly/gene'; +<% if (events) { %>import {dispatch} from '@brainly-gene/core'; import {<%= eventsTypeName(name) %>, <% for (let event of eventsArray) { %><% if (shouldAddFlowDeclaration) { %>type <% } %><%= eventTypeName(name, event) %>, <% } %>} from './<%= eventsTypeName(name) %>'; <% } %> <% if (props || copy) { %>export type PropsType = <%= readonlyUtilType %><{ diff --git a/packages/gene-tools/src/generators/components-library-generator/README.md b/packages/gene-tools/src/generators/components-library-generator/README.md index 93c18e0..64f0c6a 100644 --- a/packages/gene-tools/src/generators/components-library-generator/README.md +++ b/packages/gene-tools/src/generators/components-library-generator/README.md @@ -7,7 +7,7 @@ This generator creates a library for components. ### Example run: ``` -yarn nx g @brainly/gene-tools:components-library answer-box +yarn nx g @brainly-gene/tools:components-library answer-box โœจ Done in 2.61s. โœ” What is the library directory? ยท social-qa/components @@ -36,7 +36,7 @@ Generated library name: `social-qa-question-components-answer-box-ui` To generate component in that lib use component-generator with the generated lib name: ``` -nx g @brainly/gene-tools:component social-qa-components-answer-box-ui +nx g @brainly-gene/tools:component social-qa-components-answer-box-ui โœจ Done in 2.77s. โœ” You will create a new component now. Which prompting options would you like to choose? ยท basic @@ -73,5 +73,5 @@ Use `--dry-run` flag in order to check what files will be generated without gene Example: ``` -yarn nx g @brainly/gene-tools:components-library answer-box --dry-run +yarn nx g @brainly-gene/tools:components-library answer-box --dry-run ``` diff --git a/packages/gene-tools/src/generators/core-module-generator/README.md b/packages/gene-tools/src/generators/core-module-generator/README.md index 46b771a..c78c8c5 100644 --- a/packages/gene-tools/src/generators/core-module-generator/README.md +++ b/packages/gene-tools/src/generators/core-module-generator/README.md @@ -7,7 +7,7 @@ Generats a new Core Gene module. E2E Tests project is added by default and works Run the following command and follow the instructions. ``` -yarn nx g @brainly/gene-tools:core-module +yarn nx g @brainly-gene/tools:core-module ``` Schema file for running this generator with appropriate description of options is available [here](./schema.json). @@ -73,5 +73,5 @@ Use the `--dry-run` flag to verify what files will be created without actually g Example: ```shell copy -yarn nx g @brainly/gene-tools:core-module --dry-run +yarn nx g @brainly-gene/tools:core-module --dry-run ``` diff --git a/packages/gene-tools/src/generators/core-module-generator/files/module/lib/__pascalCaseFileName__.tsx__tmpl__ b/packages/gene-tools/src/generators/core-module-generator/files/module/lib/__pascalCaseFileName__.tsx__tmpl__ index 8be9f87..e4a74cb 100644 --- a/packages/gene-tools/src/generators/core-module-generator/files/module/lib/__pascalCaseFileName__.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/core-module-generator/files/module/lib/__pascalCaseFileName__.tsx__tmpl__ @@ -1,6 +1,6 @@ import * as React from 'react'; import {useRef} from 'react'; -import {createGeneModule} from '@brainly/gene'; +import {createGeneModule} from '@brainly-gene/core'; export function useInit() { const ref = useRef(null); diff --git a/packages/gene-tools/src/generators/core-module-generator/index.ts b/packages/gene-tools/src/generators/core-module-generator/index.ts index baf713b..4e6ba32 100644 --- a/packages/gene-tools/src/generators/core-module-generator/index.ts +++ b/packages/gene-tools/src/generators/core-module-generator/index.ts @@ -129,7 +129,7 @@ export default async function (tree: Tree, schema: BrainlyCoreModuleGenerator) { targets: { ...e2eProjectConfig.targets, e2e: { - executor: '@brainly/gene-tools:e2e-with-serve', + executor: '@brainly-gene/tools:e2e-with-serve', options: { e2eTests: [`${moduleProjectE2EName}:e2e-base`], serve: `${moduleProjectName}:storybook-e2e`, diff --git a/packages/gene-tools/src/generators/e2e-providers-generator/README.md b/packages/gene-tools/src/generators/e2e-providers-generator/README.md index 1207f49..86f469b 100644 --- a/packages/gene-tools/src/generators/e2e-providers-generator/README.md +++ b/packages/gene-tools/src/generators/e2e-providers-generator/README.md @@ -9,13 +9,13 @@ This lib is used in storybook files to allow easy mocking of IoC containers. ## Usage ```sh copy -nx g @brainly/gene-tools:e2e-providers +nx g @brainly-gene/tools:e2e-providers ``` ### Example run: ``` -> NX Generating @brainly/gene-tools:e2e-providers +> NX Generating @brainly-gene/tools:e2e-providers UPDATE nx.json CREATE libs/e2e-testing-providers/project.json diff --git a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/contextContainer.ts__tmpl__ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/contextContainer.ts__tmpl__ index f1451cf..2ca074e 100644 --- a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/contextContainer.ts__tmpl__ +++ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/contextContainer.ts__tmpl__ @@ -2,9 +2,9 @@ import {Container} from 'inversify'; import { AppContextType, APP_CONTEXT_IDENTIFIER, -} from '@brainly/gene'; +} from '@brainly-gene/core'; -import {ActionType, makeStore} from '@brainly/gene'; +import {ActionType, makeStore} from '@brainly-gene/core'; diff --git a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ index 2014f52..be62907 100644 --- a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ +++ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ @@ -1,6 +1,6 @@ import { Container } from 'inversify'; -import { factory, Factory } from '@brainly/gene'; -import { ServiceTypes } from '@brainly/gene'; +import { factory, Factory } from '@brainly-gene/core'; +import { ServiceTypes } from '@brainly-gene/core'; import { QueryClient } from '@tanstack/react-query'; import { ApolloClient, InMemoryCache, NormalizedCacheObject } from '@apollo/client'; diff --git a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/storybook/decorators/StorybookProviders.tsx__tmpl__ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/storybook/decorators/StorybookProviders.tsx__tmpl__ index 0618d45..3383e67 100644 --- a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/storybook/decorators/StorybookProviders.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/storybook/decorators/StorybookProviders.tsx__tmpl__ @@ -8,8 +8,8 @@ import { useAppContextContainer, useServiceClientsContainer, } from '../../ioc'; -import { Locale, LinkRewriteContextProvider } from '@brainly/gene-next'; -import { getAssetsContainer, NATIVE_IMAGE, Router, useMockedRouterContainer, Provider } from '@brainly/gene'; +import { Locale, LinkRewriteContextProvider } from '@brainly-gene/next'; +import { getAssetsContainer, NATIVE_IMAGE, Router, useMockedRouterContainer, Provider } from '@brainly-gene/core'; type OverwritableContainerKeys = 'someContainer'; diff --git a/packages/gene-tools/src/generators/gene-workspace-generator/index.ts b/packages/gene-tools/src/generators/gene-workspace-generator/index.ts index ebbbe14..b06bf02 100644 --- a/packages/gene-tools/src/generators/gene-workspace-generator/index.ts +++ b/packages/gene-tools/src/generators/gene-workspace-generator/index.ts @@ -22,7 +22,7 @@ export default async function (tree: Tree) { const eslintJson = tree.read('.eslintrc.json', 'utf-8'); const updatedEslintJson = eslintJson.replace( 'plugin:@nrwl/nx/typescript', - 'plugin:@brainly/gene/basic' + 'plugin:@brainly-gene/core/basic' ); tree.write('.eslintrc.json', updatedEslintJson); diff --git a/packages/gene-tools/src/generators/module-generator/README.md b/packages/gene-tools/src/generators/module-generator/README.md index 0229296..abe4e59 100644 --- a/packages/gene-tools/src/generators/module-generator/README.md +++ b/packages/gene-tools/src/generators/module-generator/README.md @@ -7,7 +7,7 @@ Generats a new Gene module. Module will be added to dedicated lib used by host a Run the following command and follow the instructions. ``` -yarn nx g @brainly/gene-tools:module +yarn nx g @brainly-gene/tools:module ``` ``` diff --git a/packages/gene-tools/src/generators/module-generator/files/module-with-library/lib/__fileName__/__pascalCaseFileName__.tsx__tmpl__ b/packages/gene-tools/src/generators/module-generator/files/module-with-library/lib/__fileName__/__pascalCaseFileName__.tsx__tmpl__ index 8be9f87..e4a74cb 100644 --- a/packages/gene-tools/src/generators/module-generator/files/module-with-library/lib/__fileName__/__pascalCaseFileName__.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/module-generator/files/module-with-library/lib/__fileName__/__pascalCaseFileName__.tsx__tmpl__ @@ -1,6 +1,6 @@ import * as React from 'react'; import {useRef} from 'react'; -import {createGeneModule} from '@brainly/gene'; +import {createGeneModule} from '@brainly-gene/core'; export function useInit() { const ref = useRef(null); diff --git a/packages/gene-tools/src/generators/module-generator/files/module/__fileName__/__pascalCaseFileName__.tsx__tmpl__ b/packages/gene-tools/src/generators/module-generator/files/module/__fileName__/__pascalCaseFileName__.tsx__tmpl__ index 8be9f87..e4a74cb 100644 --- a/packages/gene-tools/src/generators/module-generator/files/module/__fileName__/__pascalCaseFileName__.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/module-generator/files/module/__fileName__/__pascalCaseFileName__.tsx__tmpl__ @@ -1,6 +1,6 @@ import * as React from 'react'; import {useRef} from 'react'; -import {createGeneModule} from '@brainly/gene'; +import {createGeneModule} from '@brainly-gene/core'; export function useInit() { const ref = useRef(null); diff --git a/packages/gene-tools/src/generators/module-generator/index.ts b/packages/gene-tools/src/generators/module-generator/index.ts index 7435f33..2745c6d 100644 --- a/packages/gene-tools/src/generators/module-generator/index.ts +++ b/packages/gene-tools/src/generators/module-generator/index.ts @@ -200,7 +200,7 @@ Learn more about modules naming on: https://brainly.github.io/gene/gene/modules/ targets: { ...e2eProjectConfig.targets, e2e: { - executor: '@brainly/gene-tools:e2e-with-serve', + executor: '@brainly-gene/tools:e2e-with-serve', options: { e2eTests: [`${moduleProjectE2EName}:e2e-base`], serve: `${moduleProjectName}:storybook-e2e`, @@ -329,7 +329,7 @@ Learn more about modules naming on: https://brainly.github.io/gene/gene/modules/ targets: { ...e2eProjectConfig.targets, e2e: { - executor: '@brainly/gene-tools:e2e-with-serve', + executor: '@brainly-gene/tools:e2e-with-serve', options: { e2eTests: [`${moduleProjectE2EName}:e2e-base`], serve: `${moduleProjectName}:storybook-e2e`, diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/README.md b/packages/gene-tools/src/generators/nextjs-app-generator/README.md index dd6cd48..5f1d4f8 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/README.md +++ b/packages/gene-tools/src/generators/nextjs-app-generator/README.md @@ -7,7 +7,7 @@ Generats a new NextJS NX application. Application is created by default with tag Run the following command and follow the instructions. ``` -yarn nx g @brainly/gene-tools:nextjs-app +yarn nx g @brainly-gene/tools:nextjs-app ``` Schema file for running this generator with appropriate description of options is available [here](./schema.json). @@ -63,5 +63,5 @@ Use `--dry-run` flag in order to check what files will be generated without gene Example: ``` -yarn nx g @brainly/gene-tools:nextjs-app --name=myData --directory=my-feature/services --serviceType=apollo --dry-run +yarn nx g @brainly-gene/tools:nextjs-app --name=myData --directory=my-feature/services --serviceType=apollo --dry-run ``` diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/context/appContext.ts__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/context/appContext.ts__tmpl__ index 3cb824c..c7df432 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/context/appContext.ts__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/context/appContext.ts__tmpl__ @@ -1,4 +1,4 @@ -import { ActionType, makeStore } from '@brainly/gene'; +import { ActionType, makeStore } from '@brainly-gene/core'; export type AppStoreType = { hello: string; diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/baseIoc.ts__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/baseIoc.ts__tmpl__ index e53e959..bd06a8e 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/baseIoc.ts__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/baseIoc.ts__tmpl__ @@ -5,7 +5,7 @@ import { useDispatch, useStore, AppStoreType } from '../context/appContext'; <% if (apollo) { %> import { ApolloClient, InMemoryCache } from '@apollo/client'; -import { ApolloClientType, apolloFactory } from '@brainly/gene-apollo'; +import { ApolloClientType, apolloFactory } from '@brainly-gene/apollo'; <% } %> @@ -14,17 +14,17 @@ import { ApolloClientType, apolloFactory } from '@brainly/gene-apollo'; import { ReactQueryClientType, reactQueryFactory, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import { QueryClient } from '@tanstack/react-query'; <% } %> -import { NEXT_ROUTER, getRouterContainer } from '@brainly/gene-next'; +import { NEXT_ROUTER, getRouterContainer } from '@brainly-gene/next'; import { APP_CONTEXT_IDENTIFIER, AppContextType, -} from '@brainly/gene'; -import { getTranslatorContainer, REACT_I18_NEXT } from '@brainly/gene-next'; +} from '@brainly-gene/core'; +import { getTranslatorContainer, REACT_I18_NEXT } from '@brainly-gene/next'; export function getBaseContainer() { const container = new Container(); diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ index 3e3bd5f..6fd6040 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/ioc/getHomePageIoc.ts__tmpl__ @@ -1,23 +1,23 @@ import {Container} from 'inversify'; import {getBaseContainer} from './baseIoc'; import {HomePagePropsType} from '../types/types'; -import { ServiceTypes } from '@brainly/gene'; +import { ServiceTypes } from '@brainly-gene/core'; <% if (apollo && !reactQuery) { %> - import { Factory, factory } from '@brainly/gene'; - import { ApolloClientType } from '@brainly/gene-apollo'; + import { Factory, factory } from '@brainly-gene/core'; + import { ApolloClientType } from '@brainly-gene/apollo'; <% } %> <% if (reactQuery && !apollo) { %> - import { Factory, factory } from '@brainly/gene'; - import { ReactQueryClientType } from '@brainly/gene'; + import { Factory, factory } from '@brainly-gene/core'; + import { ReactQueryClientType } from '@brainly-gene/core'; <% } %> <% if (apollo && reactQuery) { %> - import { Factory, factory } from '@brainly/gene'; - import { ReactQueryClientType } from '@brainly/gene'; - import { ApolloClientType } from '@brainly/gene-apollo'; + import { Factory, factory } from '@brainly-gene/core'; + import { ReactQueryClientType } from '@brainly-gene/core'; + import { ApolloClientType } from '@brainly-gene/apollo'; <% } %> export function getHomePageContainer(props?: HomePagePropsType) { diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_app.tsx__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_app.tsx__tmpl__ index 4f85ff5..e38a0bb 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_app.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_app.tsx__tmpl__ @@ -18,7 +18,7 @@ import { getOriginURL, initI18n, withSSRTranslations -} from '@brainly/gene-next'; +} from '@brainly-gene/next'; initI18n(); diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_error.tsx__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_error.tsx__tmpl__ index 8f50de9..e68dd7e 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_error.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/_error.tsx__tmpl__ @@ -1,4 +1,4 @@ -import { getHttpProtocol } from '@brainly/gene-next'; +import { getHttpProtocol } from '@brainly-gene/next'; import { NextPageContext } from 'next'; type CustomErrorProps = { diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/api/health.ts__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/api/health.ts__tmpl__ index 114dd36..b820197 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/api/health.ts__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/api/health.ts__tmpl__ @@ -1,4 +1,4 @@ -import { apiHandlerConnect } from '@brainly/gene-next'; +import { apiHandlerConnect } from '@brainly-gene/next'; export default apiHandlerConnect().get(async (req, res) => { res.status(200).json({ status: 'ok' }); diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/index.tsx__tmpl__ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/index.tsx__tmpl__ index 82e3aef..babe7f4 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/index.tsx__tmpl__ +++ b/packages/gene-tools/src/generators/nextjs-app-generator/files/app/pages/index.tsx__tmpl__ @@ -1,22 +1,22 @@ import * as React from 'react'; import {compose} from 'ramda'; -import {getRequestHeaders} from '@brainly/gene-next'; +import {getRequestHeaders} from '@brainly-gene/next'; import {getHomePageContainer} from '../ioc/getHomePageIoc'; import { GetServerSideProps } from 'next/types'; <% if (reactQuery) { %> -import {withIoc, reactQueryFactory} from '@brainly/gene'; +import {withIoc, reactQueryFactory} from '@brainly-gene/core'; import { QueryClient } from '@tanstack/react-query'; <% } %> <% if (!reactQuery) { %> -import {withIoc} from '@brainly/gene'; +import {withIoc} from '@brainly-gene/core'; <% } %> <% if (apollo) { %> -import { apolloFactory } from '@brainly/gene-apollo'; +import { apolloFactory } from '@brainly-gene/apollo'; import { ApolloClient, InMemoryCache } from '@apollo/client'; <% } %> diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceAppTargetTemplate.ejs b/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceAppTargetTemplate.ejs index 83aaed1..c31eea4 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceAppTargetTemplate.ejs +++ b/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceAppTargetTemplate.ejs @@ -48,7 +48,7 @@ } }, "serve": { - "executor": "@brainly/gene-tools:secure-serve", + "executor": "@brainly-gene/tools:secure-serve", "options": { "serveTarget": "<%= projectName %>:serve-base" }, @@ -73,9 +73,9 @@ } }, "copy-translations-to-app": { - "executor": "@brainly/gene-tools:copy-translations-to-app" + "executor": "@brainly-gene/tools:copy-translations-to-app" }, "copy-assets-to-app": { - "executor": "@brainly/gene-tools:copy-assets-to-app" + "executor": "@brainly-gene/tools:copy-assets-to-app" } } diff --git a/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceE2ETargetTemplate.ejs b/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceE2ETargetTemplate.ejs index 1bf0768..2e4e090 100644 --- a/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceE2ETargetTemplate.ejs +++ b/packages/gene-tools/src/generators/nextjs-app-generator/utils/workspaceE2ETargetTemplate.ejs @@ -1,6 +1,6 @@ { "e2e": { - "executor": "@brainly/gene-tools:e2e-with-serve", + "executor": "@brainly-gene/tools:e2e-with-serve", "options": { "e2eTests": ["<%= projectName %>-e2e:e2e-base"], "serve": "<%= projectName %>:serve-base" diff --git a/packages/gene-tools/src/generators/service-generator/README.md b/packages/gene-tools/src/generators/service-generator/README.md index 717c3aa..865051d 100644 --- a/packages/gene-tools/src/generators/service-generator/README.md +++ b/packages/gene-tools/src/generators/service-generator/README.md @@ -7,7 +7,7 @@ This generator is used for creating services for Gene applications. It allows yo ### Example run for creating an Apollo service: ```shell copy -nx generate @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=apollo +nx generate @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=apollo ``` The command produces the following output: @@ -33,7 +33,7 @@ Generated service name: `my-feature-services-my-data` ### Example run for creating a React Query service: ```shell copy -nx generate @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=react-query +nx generate @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=react-query ``` The command produces the following output: @@ -81,5 +81,5 @@ Use the `--dry-run` flag to verify what files will be created without actually g Example: ```shell copy -nx generate @brainly/gene-tools:service --name=my-data --directory=my-feature/services --serviceType=apollo --dry-run +nx generate @brainly-gene/tools:service --name=my-data --directory=my-feature/services --serviceType=apollo --dry-run ``` diff --git a/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__.ts__tmpl__ b/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__.ts__tmpl__ index d80b85d..b2a4178 100644 --- a/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__.ts__tmpl__ +++ b/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__.ts__tmpl__ @@ -7,7 +7,7 @@ import { useQuery } from '@apollo/client'; import { transformApolloResponse, useInjectedApolloClient, -} from '@brainly/gene-apollo'; +} from '@brainly-gene/apollo'; export function use<%= fileName %>({ variables, diff --git a/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__Lazy.ts__tmpl__ b/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__Lazy.ts__tmpl__ index dc8a537..4620936 100644 --- a/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__Lazy.ts__tmpl__ +++ b/packages/gene-tools/src/generators/service-generator/apollo/files/lib/use__fileName__Lazy.ts__tmpl__ @@ -2,7 +2,7 @@ import {query<%= fileName %>} from './queries'; import { useInjectedApolloClient, useApolloLazyQuery, -} from '@brainly/gene-apollo'; +} from '@brainly-gene/apollo'; /* You can possibly import Query types from auto-generated types: @@ -10,7 +10,7 @@ You can possibly import Query types from auto-generated types: import { <%= fileName %>Query, <%= fileName %>QueryVariables, -} from '@brainly/graphql-types'; +} from '@brainly-gene/graphql-types'; */ type <%= fileName %>Query = unknown; type <%= fileName %>QueryVariables = unknown; diff --git a/packages/gene-tools/src/generators/service-generator/react-query/files/lib/queries.ts__tmpl__ b/packages/gene-tools/src/generators/service-generator/react-query/files/lib/queries.ts__tmpl__ index bac6906..b356e4b 100644 --- a/packages/gene-tools/src/generators/service-generator/react-query/files/lib/queries.ts__tmpl__ +++ b/packages/gene-tools/src/generators/service-generator/react-query/files/lib/queries.ts__tmpl__ @@ -1,7 +1,7 @@ import {QueryClient, QueryFunctionContext} from '@tanstack/react-query'; import { reactQueryFetchWrapper, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import nodeFetch from 'node-fetch'; export type <%= fileName %>DataTypeAPI = { diff --git a/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__.ts__tmpl__ b/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__.ts__tmpl__ index 26d6b08..ea902e6 100644 --- a/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__.ts__tmpl__ +++ b/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__.ts__tmpl__ @@ -2,7 +2,7 @@ import { queryFn, queryKey, VariablesType } from './queries'; import { transformReactQueryResponse, useInjectedReactQueryClient, -} from '@brainly/gene'; +} from '@brainly-gene/core'; import { useQuery } from '@tanstack/react-query'; export function use<%= fileName %>(props: {variables: VariablesType}) { diff --git a/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__Lazy.ts__tmpl__ b/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__Lazy.ts__tmpl__ index 028947e..040316a 100644 --- a/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__Lazy.ts__tmpl__ +++ b/packages/gene-tools/src/generators/service-generator/react-query/files/lib/use__fileName__Lazy.ts__tmpl__ @@ -2,7 +2,7 @@ import {queryFn, <%= fileName %>DataTypeAPI, queryKey, VariablesType} from './qu import { useInjectedReactQueryClient, useReactQueryLazy, -} from '@brainly/gene'; +} from '@brainly-gene/core'; export function use<%= fileName %>Lazy() { const queryClient = useInjectedReactQueryClient(); diff --git a/packages/gene-tools/src/generators/service-generator/schema.json b/packages/gene-tools/src/generators/service-generator/schema.json index ce9e664..536143f 100644 --- a/packages/gene-tools/src/generators/service-generator/schema.json +++ b/packages/gene-tools/src/generators/service-generator/schema.json @@ -5,7 +5,7 @@ "type": "object", "examples": [ { - "command": "nx g @brainly/gene-tools:service myService", + "command": "nx g @brainly-gene/tools:service myService", "description": "Generate libs/myService" } ], diff --git a/packages/gene-tools/src/generators/storybook-configuration/README.md b/packages/gene-tools/src/generators/storybook-configuration/README.md index 3b71857..903c548 100644 --- a/packages/gene-tools/src/generators/storybook-configuration/README.md +++ b/packages/gene-tools/src/generators/storybook-configuration/README.md @@ -7,19 +7,19 @@ This generator allows to set up the Storybook configuration for a project. To generate the Storybook configuration for a project, run the following command: ```bash -nx g @brainly/gene-tools:storybook-configuration +nx g @brainly-gene/tools:storybook-configuration ``` For example, if we want to generate the Storybook configuration for a project called `my-library`, we run the following command: ```bash -nx g @brainly/gene-tools:storybook-configuration my-library +nx g @brainly-gene/tools:storybook-configuration my-library ``` We can also just run: ```bash -nx g @brainly/gene-tools:storybook-configuration +nx g @brainly-gene/tools:storybook-configuration ``` And follow the prompts to enter the required information. diff --git a/packages/gene-tools/src/generators/storybook-configuration/__snapshots__/index.spec.ts.snap b/packages/gene-tools/src/generators/storybook-configuration/__snapshots__/index.spec.ts.snap index d80d85b..97e4fc9 100644 --- a/packages/gene-tools/src/generators/storybook-configuration/__snapshots__/index.spec.ts.snap +++ b/packages/gene-tools/src/generators/storybook-configuration/__snapshots__/index.spec.ts.snap @@ -2,7 +2,7 @@ exports[`storybookConfiguration generator application should add storybook targets to the project configuration 1`] = ` Object { - "executor": "@brainly/gene-tools:storybook", + "executor": "@brainly-gene/tools:storybook", "options": Object { "command": "start", }, @@ -11,7 +11,7 @@ Object { exports[`storybookConfiguration generator application should add storybook targets to the project configuration 2`] = ` Object { - "executor": "@brainly/gene-tools:storybook", + "executor": "@brainly-gene/tools:storybook", "options": Object { "command": "build", }, @@ -162,7 +162,7 @@ exports[`storybookConfiguration generator application should generate the .story exports[`storybookConfiguration generator library should add storybook targets to the project configuration 1`] = ` Object { - "executor": "@brainly/gene-tools:storybook", + "executor": "@brainly-gene/tools:storybook", "options": Object { "command": "start", }, @@ -171,7 +171,7 @@ Object { exports[`storybookConfiguration generator library should add storybook targets to the project configuration 2`] = ` Object { - "executor": "@brainly/gene-tools:storybook", + "executor": "@brainly-gene/tools:storybook", "options": Object { "command": "build", }, diff --git a/packages/gene-tools/src/generators/storybook-configuration/utilities/add-storybook-targets.ts b/packages/gene-tools/src/generators/storybook-configuration/utilities/add-storybook-targets.ts index 08c9617..6498f60 100644 --- a/packages/gene-tools/src/generators/storybook-configuration/utilities/add-storybook-targets.ts +++ b/packages/gene-tools/src/generators/storybook-configuration/utilities/add-storybook-targets.ts @@ -14,29 +14,29 @@ export function addStorybookTargets( projectConfig.targets = { ...projectConfig.targets, storybook: { - executor: '@brainly/gene-tools:storybook', + executor: '@brainly-gene/tools:storybook', options: { command: 'start', }, }, 'storybook-e2e': { - executor: '@brainly/gene-tools:storybook', + executor: '@brainly-gene/tools:storybook', options: { command: 'start', e2e: true, }, }, 'build-storybook': { - executor: '@brainly/gene-tools:storybook', + executor: '@brainly-gene/tools:storybook', options: { command: 'build', }, }, 'copy-storybook-images': { - executor: '@brainly/gene-tools:copy-assets-to-storybook', + executor: '@brainly-gene/tools:copy-assets-to-storybook', }, 'copy-storybook-translations': { - executor: '@brainly/gene-tools:copy-translations-to-storybook', + executor: '@brainly-gene/tools:copy-translations-to-storybook', }, 'nrwl-storybook': { executor: '@nrwl/storybook:storybook', diff --git a/packages/gene/package.json b/packages/gene/package.json index 967bd77..a17d35f 100644 --- a/packages/gene/package.json +++ b/packages/gene/package.json @@ -1,5 +1,5 @@ { - "name": "@brainly/gene", + "name": "@brainly-gene/core", "version": "0.0.1", "main": "./src/index.js", "publishConfig": { diff --git a/script/buildAndLinkGene.sh b/script/buildAndLinkGene.sh deleted file mode 100755 index f706cd5..0000000 --- a/script/buildAndLinkGene.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -cd dist/packages || { echo "dist/packages directory not found"; exit 1; } - -# Retrieve the list of packages dynamically -packages=($(ls -d */ | cut -f1 -d'/')) - - -if [[ "$1" == "--unlink" ]]; then - echo "Unlinking all projects..." - for package in "${packages[@]}"; do - echo "Unlinking $package..." - cd "$package" || { echo "$package directory not found"; exit 1; } - yarn unlink - cd .. - done - exit 0 -fi - -echo "Building project..." -yarn build - -for package in "${packages[@]}"; do - echo "Linking $package..." - cd "$package" || { echo "$package directory not found"; exit 1; } - yarn link - cd .. -done - -# Function to link peerDependencies starting with @brainly -link_peer_dependencies() { - local package=$1 - local package_json_path="$package/package.json" - echo "$package" - echo "$package_json_path" - if [[ -f $package_json_path ]]; then - peer_deps=$(jq -r '.peerDependencies | keys[] | select(startswith("@brainly"))' "$package_json_path") - for dep in $peer_deps; do - echo "Linking $dep for $package..." - cd "$package" || { echo "$package directory not found"; exit 1; } - yarn link "$dep" - cd .. - done - fi -} - -# Iterate over each package to link peerDependencies -echo "Now linkin peerDependencies..." -for package in "${packages[@]}"; do - link_peer_dependencies "$package" -done - -echo "" -echo "Description:" -echo " Automates local development environment setup for projects with multiple packages" -echo " Build and retrieves all packages from the dist/packages directory" -echo " Links each package for local development" -echo " Dynamically links peer dependencies starting with @brainly/ from their package.json files" -echo " Improves development and testing of interdependent packages within the project" -echo "Usage:" -echo " To build and link packages for local development: ./buildAndLinkGene.sh" -echo " To unlink all packages: ./buildAndLinkGene.sh --unlink" - diff --git a/tsconfig.base.json b/tsconfig.base.json index c4f79a7..e39aa4a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,15 +15,15 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@brainly/gene": ["packages/gene/src/index.ts"], - "@brainly/gene-apollo": ["packages/gene-apollo/src/index.ts"], - "@brainly/gene-next": ["packages/gene-next/src/index.ts"], - "@brainly/gene-sentry": ["packages/gene-sentry/src/index.ts"], - "@brainly/gene-tools": ["packages/gene-tools/src/index.ts"], - "@brainly/e2e-testing-providers": [ + "@brainly-gene/core": ["packages/gene/src/index.ts"], + "@brainly-gene/apollo": ["packages/gene-apollo/src/index.ts"], + "@brainly-gene/next": ["packages/gene-next/src/index.ts"], + "@brainly-gene/sentry": ["packages/gene-sentry/src/index.ts"], + "@brainly-gene/tools": ["packages/gene-tools/src/index.ts"], + "@brainly-gene/e2e-testing-providers": [ "libs/e2e-testing-providers/src/index.ts" ], - "@brainly/translations": ["libs/translations/src/index.ts"] + "@brainly-gene/translations": ["libs/translations/src/index.ts"] }, "types": ["node", "jest"] },