diff --git a/packages/cli/__tests__/__snapshots__/init.install.test.ts.snap b/packages/cli/__tests__/__snapshots__/init.install.test.ts.snap index a801b06b0..0ce3d3cda 100644 --- a/packages/cli/__tests__/__snapshots__/init.install.test.ts.snap +++ b/packages/cli/__tests__/__snapshots__/init.install.test.ts.snap @@ -12,7 +12,7 @@ exports[`cmds:install - with initialized workspace and module installs a module "description": "my-module", "devDependencies": { "makage": "0.1.8", - "pgsql-test": "^2.14.12", + "pgsql-test": "^2.16.2", }, "homepage": "https://github.com/tester/my-module", "keywords": [], @@ -29,7 +29,7 @@ exports[`cmds:install - with initialized workspace and module installs a module "scripts": { "lint": "eslint . --fix", "test": "jest", - "test:watch": "makage test --watch deploy --ext sql", + "test:watch": "jest --watch", }, "version": "0.0.1", } @@ -151,7 +151,7 @@ exports[`cmds:install - with initialized workspace and module installs two modul "description": "my-module", "devDependencies": { "makage": "0.1.8", - "pgsql-test": "^2.14.12", + "pgsql-test": "^2.16.2", }, "homepage": "https://github.com/tester/my-module", "keywords": [], @@ -168,7 +168,7 @@ exports[`cmds:install - with initialized workspace and module installs two modul "scripts": { "lint": "eslint . --fix", "test": "jest", - "test:watch": "makage test --watch deploy --ext sql", + "test:watch": "jest --watch", }, "version": "0.0.1", } diff --git a/packages/cli/__tests__/__snapshots__/init.test.ts.snap b/packages/cli/__tests__/__snapshots__/init.test.ts.snap index 858c8df93..a3385c179 100644 --- a/packages/cli/__tests__/__snapshots__/init.test.ts.snap +++ b/packages/cli/__tests__/__snapshots__/init.test.ts.snap @@ -23,7 +23,7 @@ exports[`cmds:init initializes module: module-only - argv 1`] = ` "plpgsql", "citext", ], - "fromBranch": "restructuring", + "fromBranch": "main", "fullName": "Tester", "license": "MIT", "moduleDesc": "my-module", @@ -74,7 +74,7 @@ exports[`cmds:init initializes module: module-only - result 1`] = ` "plpgsql", "citext", ], - "fromBranch": "restructuring", + "fromBranch": "main", "fullName": "Tester", "license": "MIT", "moduleDesc": "my-module", @@ -100,7 +100,7 @@ exports[`cmds:init initializes workspace: workspace - argv 1`] = ` "access": "public", "cwd": "", "email": "tester@example.com", - "fromBranch": "restructuring", + "fromBranch": "main", "fullName": "Tester", "license": "MIT", "moduleDesc": "my-workspace", @@ -140,7 +140,7 @@ exports[`cmds:init initializes workspace: workspace - result 1`] = ` "access": "public", "cwd": "", "email": "tester@example.com", - "fromBranch": "restructuring", + "fromBranch": "main", "fullName": "Tester", "license": "MIT", "moduleDesc": "my-workspace", diff --git a/packages/cli/__tests__/init.templates.test.ts b/packages/cli/__tests__/init.templates.test.ts index 0e20ccdf9..15d13228a 100644 --- a/packages/cli/__tests__/init.templates.test.ts +++ b/packages/cli/__tests__/init.templates.test.ts @@ -16,7 +16,7 @@ describe('Template scaffolding', () => { type: 'workspace', outputDir: outDir, templateRepo: TEMPLATE_REPO, - branch: 'restructuring', // TODO: remove after merging restructuring to main + branch: 'main', templatePath: 'default/workspace', answers: { name: 'demo-workspace', @@ -41,7 +41,7 @@ describe('Template scaffolding', () => { type: 'module', outputDir: outDir, templateRepo: TEMPLATE_REPO, - branch: 'restructuring', // TODO: remove after merging restructuring to main + branch: 'main', templatePath: 'default/module', answers: { name: 'demo-module', diff --git a/packages/cli/__tests__/init.test.ts b/packages/cli/__tests__/init.test.ts index b09be41a6..06afec3fb 100644 --- a/packages/cli/__tests__/init.test.ts +++ b/packages/cli/__tests__/init.test.ts @@ -236,7 +236,7 @@ describe('cmds:init', () => { cwd: fixture.tempDir, name: 'test-workspace-branch', workspace: true, - fromBranch: 'restructuring' // TODO: change back to 'main' after restructuring is merged + fromBranch: 'main' }); await commands(argv, prompter, { diff --git a/packages/cli/test-utils/init-argv.ts b/packages/cli/test-utils/init-argv.ts index f60e56487..b214b6ec2 100644 --- a/packages/cli/test-utils/init-argv.ts +++ b/packages/cli/test-utils/init-argv.ts @@ -26,8 +26,7 @@ export const withInitDefaults = (argv: ParsedArgs, defaultRepo: string = DEFAULT return { ...args, repo: args.repo ?? defaultRepo, - // TODO: remove fromBranch after merging restructuring to main - fromBranch: args.fromBranch ?? 'restructuring' + fromBranch: args.fromBranch ?? 'main' // Don't set default templatePath - let scaffoldTemplate use metadata-driven resolution from .boilerplates.json }; }; diff --git a/packages/core/src/core/boilerplate-types.ts b/packages/core/src/core/boilerplate-types.ts index 483764de6..170f116ab 100644 --- a/packages/core/src/core/boilerplate-types.ts +++ b/packages/core/src/core/boilerplate-types.ts @@ -17,8 +17,12 @@ export interface BoilerplateQuestion { type?: 'text' | 'list' | 'checkbox'; /** Options for list or checkbox types */ options?: string[]; + /** Static default value when no resolver is provided */ + default?: any; /** Source to derive default value from (e.g., "git.user.name", "npm.whoami") */ defaultFrom?: string; + /** Auto-set value from resolver, skipping the prompt entirely */ + setFrom?: string; } /** @@ -54,4 +58,3 @@ export interface ScannedBoilerplate { /** Questions from the boilerplate config */ questions?: BoilerplateQuestion[]; } -