diff --git a/packages/blueprints/blueprint/src/blueprint.ts b/packages/blueprints/blueprint/src/blueprint.ts index dd407dec6..025979173 100644 --- a/packages/blueprints/blueprint/src/blueprint.ts +++ b/packages/blueprints/blueprint/src/blueprint.ts @@ -3,7 +3,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { Project } from 'projen'; -import { BlueprintInstantiation, Context, ResynthesisPhase } from './context/context'; +import { Context, ResynthesisPhase } from './context/context'; import { TraversalOptions, traverse } from './context/traverse'; import { createLifecyclePullRequest } from './pull-requests/create-lifecycle-pull-request'; import { ContextFile, createContextFile, destructurePath } from './resynthesis/context-file'; @@ -59,9 +59,6 @@ export class Blueprint extends Project { name: process.env.CONTEXT_PROJECTNAME, bundlepath: process.env.EXISTING_BUNDLE_ABS, options: getOptions(path.join(process.env.EXISTING_BUNDLE_ABS || '', OPTIONS_FILE)), - blueprint: { - instantiations: structureExistingBlueprints(process.env.INSTANTIATIONS_ABS), - }, src: { listRepositoryNames: (): string[] => { const repoBundlePath = path.join(this.context.project.bundlepath || '', 'src'); @@ -252,18 +249,3 @@ function getOptions(location: string): any { return {}; } } - -function structureExistingBlueprints(location: string | undefined): BlueprintInstantiation[] { - if (!fs.existsSync(location || '')) { - console.warn('Could not find instantiations at ' + location); - return []; - } - try { - const result = JSON.parse(fs.readFileSync(location!).toString()); - return result as BlueprintInstantiation[]; - } catch (error) { - console.error(error); - console.error('Could not read instantiations at ' + location); - } - return []; -} diff --git a/packages/blueprints/blueprint/src/context/context.ts b/packages/blueprints/blueprint/src/context/context.ts index e58102191..31ba05787 100644 --- a/packages/blueprints/blueprint/src/context/context.ts +++ b/packages/blueprints/blueprint/src/context/context.ts @@ -10,17 +10,6 @@ export interface PackageConfiguration { readonly name?: string; readonly version?: string; } - -/** - * This represents an instantiation of a blueprint - */ -export interface BlueprintInstantiation { - /** - * This is a unique; - */ - id: string; -} - /** * context about the existing project bundle (if it exists) */ @@ -32,20 +21,6 @@ export interface Project { * The options used on the previous run of this blueprint. */ options?: any; - - /** - * Information about Blueprints the existing project - */ - blueprint: { - /** - * A list of all blueprint instantiations already present in your project - */ - instantiations: BlueprintInstantiation[]; - }; - - /** - * The source code from the existing project. Note, this can be across multiple repositories - */ src: { /** * This can be used to list the repositories in the exisiting codebase. diff --git a/packages/blueprints/test-blueprint/package.json b/packages/blueprints/test-blueprint/package.json index 25d312d60..d280da028 100644 --- a/packages/blueprints/test-blueprint/package.json +++ b/packages/blueprints/test-blueprint/package.json @@ -66,7 +66,7 @@ "main": "lib/index.js", "license": "Apache-2.0", "homepage": "", - "version": "0.3.37-preview.12", + "version": "0.3.36", "types": "lib/index.d.ts", "publishingSpace": "blueprints", "mediaUrls": [ diff --git a/packages/blueprints/test-blueprint/src/blueprint.ts b/packages/blueprints/test-blueprint/src/blueprint.ts index 39be32040..db3079ce2 100644 --- a/packages/blueprints/test-blueprint/src/blueprint.ts +++ b/packages/blueprints/test-blueprint/src/blueprint.ts @@ -1,6 +1,4 @@ -import { spawnSync } from 'child_process'; import * as fs from 'fs'; -import * as path from 'path'; import { Environment, EnvironmentDefinition, AccountConnection, Role } from '@amazon-codecatalyst/blueprint-component.environments'; import { SourceRepository, SourceFile } from '@amazon-codecatalyst/blueprint-component.source-repositories'; import { Workflow, NodeWorkflowDefinitionSamples } from '@amazon-codecatalyst/blueprint-component.workflows'; @@ -206,12 +204,5 @@ export class Blueprint extends ParentBlueprint { new SourceFile(internalRepo, 'blueprint.d.ts', blueprintInterface); new SourceFile(internalRepo, 'defaults.json', blueprintDefaults); new SourceFile(internalRepo, 'internal/ast.json', blueprintAST); - - if (process.env.INSTANTIATIONS_ABS) { - const instanpath = path.join(process.env.INSTANTIATIONS_ABS); - const instantiations = JSON.parse(fs.readFileSync(instanpath).toString()); - new SourceFile(internalRepo, 'internal/INSTANTIATIONS_ABS.json', JSON.stringify(instantiations, null, 2)); - } - new SourceFile(internalRepo, 'internal/env.json', JSON.stringify(process.env, null, 2)); } }