From 146bf9b6288050aa6d845d0baf96b29d38d1362a Mon Sep 17 00:00:00 2001 From: sebastiandg7 Date: Fri, 30 Apr 2021 10:14:00 -0500 Subject: [PATCH] fix(theme): validate paths are not used in theme name --- packages/nx-shopify/src/generators/theme/theme.generator.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nx-shopify/src/generators/theme/theme.generator.ts b/packages/nx-shopify/src/generators/theme/theme.generator.ts index d461d43..44ab72c 100644 --- a/packages/nx-shopify/src/generators/theme/theme.generator.ts +++ b/packages/nx-shopify/src/generators/theme/theme.generator.ts @@ -19,6 +19,7 @@ import { import { runTasksInSerial } from '@nrwl/workspace/src/utilities/run-tasks-in-serial'; import { join } from 'path'; import { BuildExecutorSchema } from '../../executors/build/schema'; +import { assertValidGeneratorNameOption } from '../../utils/generator-utils'; import nxShopifyInitGenerator from '../init/init.generator'; import { addJest } from './lib/add-jest'; import { NormalizedSchema, ThemeGeneratorSchema } from './schema'; @@ -29,6 +30,8 @@ function normalizeOptions( ): NormalizedSchema { const { name, directory, tags } = options; + assertValidGeneratorNameOption(name, directory, 'theme'); + const { fileName } = names(name); const projectDirectory = directory ? `${names(directory).fileName}/${fileName}`