File tree Expand file tree Collapse file tree 8 files changed +44
-10
lines changed
Expand file tree Collapse file tree 8 files changed +44
-10
lines changed Original file line number Diff line number Diff line change 1111 "ajv" : " ^8.12.0" ,
1212 "ajv-formats" : " ^3.0.1" ,
1313 "chalk" : " ^5.3.0" ,
14- "codify-schemas" : " 1.0.44 " ,
14+ "codify-schemas" : " 1.0.45 " ,
1515 "debug" : " ^4.3.4" ,
1616 "ink" : " ^4.4.1" ,
1717 "parse-json" : " ^8.1.0" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import copy from 'rollup-plugin-copy';
99export default {
1010 input : 'src/index.ts' ,
1111 output : {
12- dir :'dist' ,
12+ dir :'./build/ dist' ,
1313 format : 'es'
1414 } ,
1515 plugins : [
Original file line number Diff line number Diff line change 1+
2+ import chalk from 'chalk'
3+ import { ChildProcess , exec } from 'node:child_process'
4+ import fs from 'node:fs/promises'
5+
6+ console . log ( chalk . magenta ( 'Removing ./dist folder' ) )
7+ await fs . rm ( '../dist' , {
8+ force : true ,
9+ recursive : true ,
10+ } )
11+
12+ console . log ( chalk . magenta ( 'Creating build directory' ) )
13+ try {
14+ await fs . mkdir ( '../build' , { } ) ;
15+ } catch {
16+ console . error ( 'Directory already exists' )
17+ }
18+
19+ await fs . cp ( '../src/' , '../build' )
20+ await fs . cp ( '../package.json' , '../build' )
21+
22+
23+ console . log ( chalk . magenta ( 'Running rollup' ) )
24+ const rollupProcess = exec ( 'rollup -c --file ' ) ;
25+ addStdout ( rollupProcess )
26+
27+ function addStdout ( process : ChildProcess ) {
28+ process . stdout ! . on ( 'data' , ( data ) => {
29+ console . log ( data )
30+ } )
31+ process . stderr ! . on ( 'data' , ( data ) => {
32+ console . log ( data )
33+ } )
34+ }
Original file line number Diff line number Diff line change 1- import { Args , Flags } from '@oclif/core'
1+ import Flags from '@oclif/core/flags '
22import * as path from 'node:path' ;
33
44import { BaseCommand } from '../../common/base-command.js' ;
Original file line number Diff line number Diff line change 1- import { Args , Flags } from '@oclif/core'
1+ import Flags from '@oclif/core/flags '
22import * as path from 'node:path' ;
33
4- import { PlanOrchestrator } from '../../orchestrators/plan.js' ;
54import { BaseCommand } from '../../common/base-command.js' ;
5+ import { PlanOrchestrator } from '../../orchestrators/plan.js' ;
66
77export default class Plan extends BaseCommand {
88 static description = 'Generate a plan based on a codify.json file. This plan will list ' +
Original file line number Diff line number Diff line change 11import { Command , Flags } from '@oclif/core' ;
2+ import { OutputFlags } from '@oclif/core/interfaces' ;
23import chalk from 'chalk' ;
34import { SudoRequestData } from 'codify-schemas' ;
45import createDebug from 'debug' ;
56
67import { Event , ctx } from '../events/context.js' ;
78import { Reporter , ReporterFactory , ReporterType } from '../ui/reporters/reporter.js' ;
89import { prettyPrintError } from './errors.js' ;
9- import { OutputFlags } from '@oclif/core/interfaces' ;
1010
1111export abstract class BaseCommand extends Command {
1212
Original file line number Diff line number Diff line change 1- import Ajv2020 from 'ajv/dist/2020.js' ;
2- import addFormats from 'ajv-formats' ;
1+ import { Ajv } from 'ajv' ;
32import { ErrorObject } from 'ajv' ;
3+ import addFormats from 'ajv-formats' ;
4+
45import { SourceMapCache } from '../parser/source-maps.js' ;
56
6- const ajv = new Ajv2020 . default ( {
7+ const ajv = new Ajv ( {
78 allErrors : true ,
89 strict : true ,
910} ) ;
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "declaration" : true ,
43 "module" : " NodeNext" ,
54 "moduleResolution" : " Node16" ,
65 "esModuleInterop" : true ,
You can’t perform that action at this time.
0 commit comments