From 88b51f550f4930b0fad6b7812f4292063b833a0d Mon Sep 17 00:00:00 2001 From: alexforsyth Date: Tue, 25 Jun 2024 17:58:32 -0400 Subject: [PATCH 1/3] fix: remove projen dependency on the schema component --- .../blueprint/src/ui-selectors/options-schemas.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts b/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts index b3e0059d3..2de221780 100644 --- a/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts +++ b/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts @@ -28,16 +28,13 @@ export type OptionsSchemaDefinition< /** * This component can be used to define a schema with a given identifier. */ -export class OptionsSchema extends Component { - constructor(protected readonly blueprint: Blueprint, protected readonly identifier: string, protected readonly schema: T) { - super(blueprint); - } +export class OptionsSchema { + constructor(protected readonly blueprint: Blueprint, protected readonly identifier: string, protected readonly schema: T) {} synthesize(): void { if (!fs.existsSync(this.blueprint.context.wizardOptionsPath)) { fs.mkdirSync(this.blueprint.context.wizardOptionsPath); } - fs.writeFileSync(path.join(this.blueprint.context.wizardOptionsPath, this.identifier), JSON.stringify(this.schema)); } } From 8bfa59941bff3368d87d64a51d323df9ff875d2e Mon Sep 17 00:00:00 2001 From: alexforsyth Date: Tue, 25 Jun 2024 18:02:52 -0400 Subject: [PATCH 2/3] remove extra import --- .../blueprints/blueprint/src/ui-selectors/options-schemas.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts b/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts index 2de221780..758bfee98 100644 --- a/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts +++ b/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts @@ -1,6 +1,5 @@ import * as fs from 'fs'; import * as path from 'path'; -import { Component } from 'projen'; import { DynamicKVInput } from './dynamic-kv-input'; import { Blueprint } from '../blueprint'; From 7bb21949b51d40db4729d50ed828655d754d00bb Mon Sep 17 00:00:00 2001 From: alexforsyth Date: Tue, 25 Jun 2024 18:06:39 -0400 Subject: [PATCH 3/3] fixes --- .../blueprints/blueprint/src/ui-selectors/options-schemas.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts b/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts index 758bfee98..418338036 100644 --- a/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts +++ b/packages/blueprints/blueprint/src/ui-selectors/options-schemas.ts @@ -28,9 +28,7 @@ export type OptionsSchemaDefinition< * This component can be used to define a schema with a given identifier. */ export class OptionsSchema { - constructor(protected readonly blueprint: Blueprint, protected readonly identifier: string, protected readonly schema: T) {} - - synthesize(): void { + constructor(protected readonly blueprint: Blueprint, protected readonly identifier: string, protected readonly schema: T) { if (!fs.existsSync(this.blueprint.context.wizardOptionsPath)) { fs.mkdirSync(this.blueprint.context.wizardOptionsPath); }