Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions graphql/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@babel/types": "^7.28.6",
"@constructive-io/graphql-query": "workspace:^",
"@constructive-io/graphql-types": "workspace:^",
"@inquirerer/utils": "^3.2.3",
"@inquirerer/utils": "^3.3.1",
"@pgpmjs/core": "workspace:^",
"ajv": "^8.17.1",
"deepmerge": "^4.3.1",
Expand All @@ -67,7 +67,7 @@
"graphile-schema": "workspace:^",
"graphql": "^16.9.0",
"inflekt": "^0.3.1",
"inquirerer": "^4.4.0",
"inquirerer": "^4.5.2",
"jiti": "^2.6.1",
"komoji": "^0.8.0",
"oxfmt": "^0.26.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test:watch": "jest --watch"
},
"devDependencies": {
"@inquirerer/test": "^1.3.0",
"@inquirerer/test": "^1.3.3",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.12.7",
"@types/pg": "^8.16.0",
Expand All @@ -51,14 +51,14 @@
"@constructive-io/graphql-server": "workspace:^",
"@constructive-io/graphql-types": "workspace:^",
"@constructive-io/knative-job-service": "workspace:^",
"@inquirerer/utils": "^3.2.3",
"@inquirerer/utils": "^3.3.1",
"@pgpmjs/core": "workspace:^",
"@pgpmjs/logger": "workspace:^",
"@pgpmjs/server-utils": "workspace:^",
"@pgpmjs/types": "workspace:^",
"appstash": "^0.3.0",
"find-and-require-package-json": "^0.9.0",
"inquirerer": "^4.5.0",
"inquirerer": "^4.5.2",
"js-yaml": "^4.1.0",
"pg-cache": "workspace:^",
"pg-env": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/csv-to-pg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@pgsql/types": "^17.6.2",
"@pgsql/utils": "^17.8.11",
"csv-parser": "^2.3.3",
"inquirerer": "^4.4.0",
"inquirerer": "^4.5.2",
"js-yaml": "^3.14.0",
"pgsql-deparser": "^17.17.2"
}
Expand Down
8 changes: 4 additions & 4 deletions pgpm/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"test:watch": "jest --watch"
},
"devDependencies": {
"@inquirerer/test": "^1.3.0",
"@inquirerer/test": "^1.3.3",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.12.7",
"@types/pg": "^8.16.0",
Expand All @@ -45,15 +45,15 @@
"ts-node": "^10.9.2"
},
"dependencies": {
"@inquirerer/utils": "^3.3.0",
"@inquirerer/utils": "^3.3.1",
"@pgpmjs/core": "workspace:^",
"@pgpmjs/env": "workspace:^",
"@pgpmjs/logger": "workspace:^",
"@pgpmjs/types": "workspace:^",
"appstash": "^0.3.0",
"find-and-require-package-json": "^0.9.0",
"genomic": "^5.3.0",
"inquirerer": "^4.4.0",
"genomic": "^5.3.5",
"inquirerer": "^4.5.2",
"js-yaml": "^4.1.0",
"pg-cache": "workspace:^",
"pg-env": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions pgpm/cli/src/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ async function handleModuleInit(
answers: templateAnswers,
noTty: ctx.noTty,
pgpm: isPgpmTemplate,
prompter,
});

const isRoot = path.resolve(project.workspacePath) === path.resolve(ctx.cwd);
Expand Down
4 changes: 2 additions & 2 deletions pgpm/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@pgsql/types": "^17.6.2",
"@types/pg": "^8.16.0",
"copyfiles": "^2.4.1",
"inquirerer": "^4.4.0",
"inquirerer": "^4.5.2",
"makage": "^0.1.12"
},
"dependencies": {
Expand All @@ -53,7 +53,7 @@
"@pgpmjs/server-utils": "workspace:^",
"@pgpmjs/types": "workspace:^",
"csv-to-pg": "workspace:^",
"genomic": "^5.3.0",
"genomic": "^5.3.5",
"glob": "^13.0.0",
"komoji": "^0.8.0",
"minimatch": "^10.1.1",
Expand Down
10 changes: 9 additions & 1 deletion pgpm/core/src/core/class/pgpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ export interface InitModuleOptions {
* Defaults to true for backward compatibility.
*/
pgpm?: boolean;
/**
* Optional Inquirerer instance to reuse for prompting during template scaffolding.
* If provided, prevents creating a duplicate instance on process.stdin which
* would cause double-echoed keystrokes and other input conflicts.
* The caller retains ownership and is responsible for closing it.
*/
prompter?: import('inquirerer').Inquirerer;
}

export class PgpmPackage {
Expand Down Expand Up @@ -476,7 +483,8 @@ export class PgpmPackage {
noTty: options.noTty ?? false,
cacheTtlMs: options.cacheTtlMs ?? DEFAULT_TEMPLATE_TTL_MS,
toolName: options.toolName ?? DEFAULT_TEMPLATE_TOOL_NAME,
cwd: this.cwd
cwd: this.cwd,
prompter: options.prompter,
});

// Only create pgpm files (pgpm.plan, .control, deploy/revert/verify dirs) for pgpm-managed modules
Expand Down
Loading