quidproquo-cli 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,6 +31,12 @@ Commands:
|
|
|
31
31
|
// Service infrastructure.ts files (and app config fragments) are TypeScript —
|
|
32
32
|
// register ts-node's transpile-only require hook so the CLI can require them
|
|
33
33
|
// directly, using the consumer root's tsconfig.json ts-node settings.
|
|
34
|
+
//
|
|
35
|
+
// CONTRACT: JavaScript apps (create-qpq-app --language javascript) also lean
|
|
36
|
+
// on this hook — their tsconfig.json ts-node block sets allowJs (so their
|
|
37
|
+
// ESM-syntax infrastructure.js compiles at require time) and scope/scopeDir
|
|
38
|
+
// (so the hook never touches quidproquo libs outside the app). Any
|
|
39
|
+
// replacement for ts-node here must honour those consumer tsconfig options.
|
|
34
40
|
const registerTsNode = () => {
|
|
35
41
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
36
42
|
require('ts-node').register({ transpileOnly: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCli.js","sourceRoot":"","sources":["../../../src/cli/runCli.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;CAiBb,CAAC;AAEF,8EAA8E;AAC9E,6EAA6E;AAC7E,sEAAsE;AACtE,MAAM,cAAc,GAAG,GAAS,EAAE;IAChC,iEAAiE;IACjE,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;AACvD,CAAC,CAAC;AAEK,MAAM,MAAM,GAAG,CAAO,IAAc,EAAiB,EAAE;IAC5D,MAAM,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,GAAG,IAAI,CAAC;IAEvC,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC3D,OAAO,CAAC,GAAG,CA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EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAC/E,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;KAC3D,CAAC;IACF,yDAAyD;IAEzD,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE9B,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,OAAO,OAAO,UAAU,EAAE,KAAK,CAAC,CAAC;QAC/C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAA,CAAC;AA7CW,QAAA,MAAM,UA6CjB","sourcesContent":["const usage = `qpq — build, dev and deploy orchestration for QPQ apps\n\nUsage: qpq <command> [--app <name>] [--env <name>] [--platform <name>]\n\nCommands:\n go Deploy services (interactive; platform from deploy.config.json, default aws)\n go:docker Same as go, but deploys in parallel via docker\n go:dev Run the local dev server (hot reload)\n go:dev:web Run every views microfrontend dev server\n teardown Destroy web/api/inf stacks for selected services (interactive)\n synth [service] Synth QPQ configs to dist/apps/<app>/infrastructure\n prep Regenerate apps/<app>/tsconfig.federated.json\n publish Build + upload + deploy federated remotes\n publish:build Build federated remotes locally\n publish:upload Upload built version dirs (nothing goes live)\n publish:deploy Flip manifests to the uploaded versions\n hooks <name> Run qpq:<name> in every app that defines it\n`;\n\n// Service infrastructure.ts files (and app config fragments) are TypeScript —\n// register ts-node's transpile-only require hook so the CLI can require them\n// directly, using the consumer root's tsconfig.json ts-node settings.\nconst registerTsNode = (): void => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n require('ts-node').register({ transpileOnly: true });\n};\n\nexport const runCli = async (argv: string[]): Promise<void> => {\n const [command, ...commandArgv] = argv;\n\n if (!command || command === 'help' || command === '--help') {\n console.log(usage);\n return;\n }\n\n registerTsNode();\n\n // Commands are required lazily so a simple `qpq help` doesn't pay for the\n // whole toolchain, and so ts-node is registered before any command module\n // (or anything it requires) loads.\n /* eslint-disable @typescript-eslint/no-require-imports */\n const commands: Record<string, (commandArgv: string[]) => Promise<void>> = {\n go: (a) => require('../commands/go').goCommand(a),\n 'go:docker': (a) => require('../commands/goDocker').goDockerCommand(a),\n 'go:dev': (a) => require('../commands/goDev').goDevCommand(a),\n 'go:dev:web': (a) => require('../commands/goDevWeb').goDevWebCommand(a),\n teardown: (a) => require('../commands/teardown').teardownCommand(a),\n synth: (a) => require('../commands/synth').synthCommand(a),\n prep: (a) => require('../commands/prep').prepCommand(a),\n publish: (a) => require('../commands/publish').publishCommand(a),\n 'publish:build': (a) => require('../commands/publish').publishBuildCommand(a),\n 'publish:upload': (a) => require('../commands/publish').publishUploadCommand(a),\n 'publish:deploy': (a) => require('../commands/publish').publishDeployCommand(a),\n hooks: (a) => require('../commands/hooks').hooksCommand(a),\n };\n /* eslint-enable @typescript-eslint/no-require-imports */\n\n const run = commands[command];\n\n if (!run) {\n console.error(`Unknown command: ${command}`);\n console.log(usage);\n process.exitCode = 1;\n return;\n }\n\n try {\n await run(commandArgv);\n } catch (error) {\n console.error(`qpq ${command} failed:`, error);\n process.exitCode = 1;\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"runCli.js","sourceRoot":"","sources":["../../../src/cli/runCli.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;CAiBb,CAAC;AAEF,8EAA8E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AAC;AACH,CAAC,CAAA,CAAC;AA7CW,QAAA,MAAM,UA6CjB","sourcesContent":["const usage = `qpq — build, dev and deploy orchestration for QPQ apps\n\nUsage: qpq <command> [--app <name>] [--env <name>] [--platform <name>]\n\nCommands:\n go Deploy services (interactive; platform from deploy.config.json, default aws)\n go:docker Same as go, but deploys in parallel via docker\n go:dev Run the local dev server (hot reload)\n go:dev:web Run every views microfrontend dev server\n teardown Destroy web/api/inf stacks for selected services (interactive)\n synth [service] Synth QPQ configs to dist/apps/<app>/infrastructure\n prep Regenerate apps/<app>/tsconfig.federated.json\n publish Build + upload + deploy federated remotes\n publish:build Build federated remotes locally\n publish:upload Upload built version dirs (nothing goes live)\n publish:deploy Flip manifests to the uploaded versions\n hooks <name> Run qpq:<name> in every app that defines it\n`;\n\n// Service infrastructure.ts files (and app config fragments) are TypeScript —\n// register ts-node's transpile-only require hook so the CLI can require them\n// directly, using the consumer root's tsconfig.json ts-node settings.\n//\n// CONTRACT: JavaScript apps (create-qpq-app --language javascript) also lean\n// on this hook — their tsconfig.json ts-node block sets allowJs (so their\n// ESM-syntax infrastructure.js compiles at require time) and scope/scopeDir\n// (so the hook never touches quidproquo libs outside the app). Any\n// replacement for ts-node here must honour those consumer tsconfig options.\nconst registerTsNode = (): void => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n require('ts-node').register({ transpileOnly: true });\n};\n\nexport const runCli = async (argv: string[]): Promise<void> => {\n const [command, ...commandArgv] = argv;\n\n if (!command || command === 'help' || command === '--help') {\n console.log(usage);\n return;\n }\n\n registerTsNode();\n\n // Commands are required lazily so a simple `qpq help` doesn't pay for the\n // whole toolchain, and so ts-node is registered before any command module\n // (or anything it requires) loads.\n /* eslint-disable @typescript-eslint/no-require-imports */\n const commands: Record<string, (commandArgv: string[]) => Promise<void>> = {\n go: (a) => require('../commands/go').goCommand(a),\n 'go:docker': (a) => require('../commands/goDocker').goDockerCommand(a),\n 'go:dev': (a) => require('../commands/goDev').goDevCommand(a),\n 'go:dev:web': (a) => require('../commands/goDevWeb').goDevWebCommand(a),\n teardown: (a) => require('../commands/teardown').teardownCommand(a),\n synth: (a) => require('../commands/synth').synthCommand(a),\n prep: (a) => require('../commands/prep').prepCommand(a),\n publish: (a) => require('../commands/publish').publishCommand(a),\n 'publish:build': (a) => require('../commands/publish').publishBuildCommand(a),\n 'publish:upload': (a) => require('../commands/publish').publishUploadCommand(a),\n 'publish:deploy': (a) => require('../commands/publish').publishDeployCommand(a),\n hooks: (a) => require('../commands/hooks').hooksCommand(a),\n };\n /* eslint-enable @typescript-eslint/no-require-imports */\n\n const run = commands[command];\n\n if (!run) {\n console.error(`Unknown command: ${command}`);\n console.log(usage);\n process.exitCode = 1;\n return;\n }\n\n try {\n await run(commandArgv);\n } catch (error) {\n console.error(`qpq ${command} failed:`, error);\n process.exitCode = 1;\n }\n};\n"]}
|
package/lib/esm/cli/runCli.js
CHANGED
|
@@ -19,6 +19,12 @@ Commands:
|
|
|
19
19
|
// Service infrastructure.ts files (and app config fragments) are TypeScript —
|
|
20
20
|
// register ts-node's transpile-only require hook so the CLI can require them
|
|
21
21
|
// directly, using the consumer root's tsconfig.json ts-node settings.
|
|
22
|
+
//
|
|
23
|
+
// CONTRACT: JavaScript apps (create-qpq-app --language javascript) also lean
|
|
24
|
+
// on this hook — their tsconfig.json ts-node block sets allowJs (so their
|
|
25
|
+
// ESM-syntax infrastructure.js compiles at require time) and scope/scopeDir
|
|
26
|
+
// (so the hook never touches quidproquo libs outside the app). Any
|
|
27
|
+
// replacement for ts-node here must honour those consumer tsconfig options.
|
|
22
28
|
const registerTsNode = () => {
|
|
23
29
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
24
30
|
require('ts-node').register({ transpileOnly: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCli.js","sourceRoot":"","sources":["../../../src/cli/runCli.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;CAiBb,CAAC;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for QPQ apps\n\nUsage: qpq <command> [--app <name>] [--env <name>] [--platform <name>]\n\nCommands:\n go Deploy services (interactive; platform from deploy.config.json, default aws)\n go:docker Same as go, but deploys in parallel via docker\n go:dev Run the local dev server (hot reload)\n go:dev:web Run every views microfrontend dev server\n teardown Destroy web/api/inf stacks for selected services (interactive)\n synth [service] Synth QPQ configs to dist/apps/<app>/infrastructure\n prep Regenerate apps/<app>/tsconfig.federated.json\n publish Build + upload + deploy federated remotes\n publish:build Build federated remotes locally\n publish:upload Upload built version dirs (nothing goes live)\n publish:deploy Flip manifests to the uploaded versions\n hooks <name> Run qpq:<name> in every app that defines it\n`;\n\n// Service infrastructure.ts files (and app config fragments) are TypeScript —\n// register ts-node's transpile-only require hook so the CLI can require them\n// directly, using the consumer root's tsconfig.json ts-node settings.\nconst registerTsNode = (): void => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n require('ts-node').register({ transpileOnly: true });\n};\n\nexport const runCli = async (argv: string[]): Promise<void> => {\n const [command, ...commandArgv] = argv;\n\n if (!command || command === 'help' || command === '--help') {\n console.log(usage);\n return;\n }\n\n registerTsNode();\n\n // Commands are required lazily so a simple `qpq help` doesn't pay for the\n // whole toolchain, and so ts-node is registered before any command module\n // (or anything it requires) loads.\n /* eslint-disable @typescript-eslint/no-require-imports */\n const commands: Record<string, (commandArgv: string[]) => Promise<void>> = {\n go: (a) => require('../commands/go').goCommand(a),\n 'go:docker': (a) => require('../commands/goDocker').goDockerCommand(a),\n 'go:dev': (a) => require('../commands/goDev').goDevCommand(a),\n 'go:dev:web': (a) => require('../commands/goDevWeb').goDevWebCommand(a),\n teardown: (a) => require('../commands/teardown').teardownCommand(a),\n synth: (a) => require('../commands/synth').synthCommand(a),\n prep: (a) => require('../commands/prep').prepCommand(a),\n publish: (a) => require('../commands/publish').publishCommand(a),\n 'publish:build': (a) => require('../commands/publish').publishBuildCommand(a),\n 'publish:upload': (a) => require('../commands/publish').publishUploadCommand(a),\n 'publish:deploy': (a) => require('../commands/publish').publishDeployCommand(a),\n hooks: (a) => require('../commands/hooks').hooksCommand(a),\n };\n /* eslint-enable @typescript-eslint/no-require-imports */\n\n const run = commands[command];\n\n if (!run) {\n console.error(`Unknown command: ${command}`);\n console.log(usage);\n process.exitCode = 1;\n return;\n }\n\n try {\n await run(commandArgv);\n } catch (error) {\n console.error(`qpq ${command} failed:`, error);\n process.exitCode = 1;\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"runCli.js","sourceRoot":"","sources":["../../../src/cli/runCli.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;CAiBb,CAAC;AAEF,8EAA8E;AAC9E,6EAA6E;AAC7E,sEAAsE;AACtE,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,4EAA4E;AAC5E,mEAAmE;AACnE,4EAA4E;AAC5E,MAAM,cAAc,GAAG,GAAS,EAAE;IAChC,iEAAiE;IACjE,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EAAE,IAAc,EAAiB,EAAE;IAC5D,MAAM,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,GAAG,IAAI,CAAC;IAEvC,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO;IACT,CAAC;IAED,cAAc,EAAE,CAAC;IAEjB,0EAA0E;IAC1E,0EAA0E;IAC1E,mCAAmC;IACnC,0DAA0D;IAC1D,MAAM,QAAQ,GAA6D;QACzE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QACjD,WAAW,EAAE,CAAC,CAAC,EAA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I,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,OAAO,OAAO,UAAU,EAAE,KAAK,CAAC,CAAC;QAC/C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC","sourcesContent":["const usage = `qpq — build, dev and deploy orchestration for QPQ apps\n\nUsage: qpq <command> [--app <name>] [--env <name>] [--platform <name>]\n\nCommands:\n go Deploy services (interactive; platform from deploy.config.json, default aws)\n go:docker Same as go, but deploys in parallel via docker\n go:dev Run the local dev server (hot reload)\n go:dev:web Run every views microfrontend dev server\n teardown Destroy web/api/inf stacks for selected services (interactive)\n synth [service] Synth QPQ configs to dist/apps/<app>/infrastructure\n prep Regenerate apps/<app>/tsconfig.federated.json\n publish Build + upload + deploy federated remotes\n publish:build Build federated remotes locally\n publish:upload Upload built version dirs (nothing goes live)\n publish:deploy Flip manifests to the uploaded versions\n hooks <name> Run qpq:<name> in every app that defines it\n`;\n\n// Service infrastructure.ts files (and app config fragments) are TypeScript —\n// register ts-node's transpile-only require hook so the CLI can require them\n// directly, using the consumer root's tsconfig.json ts-node settings.\n//\n// CONTRACT: JavaScript apps (create-qpq-app --language javascript) also lean\n// on this hook — their tsconfig.json ts-node block sets allowJs (so their\n// ESM-syntax infrastructure.js compiles at require time) and scope/scopeDir\n// (so the hook never touches quidproquo libs outside the app). Any\n// replacement for ts-node here must honour those consumer tsconfig options.\nconst registerTsNode = (): void => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n require('ts-node').register({ transpileOnly: true });\n};\n\nexport const runCli = async (argv: string[]): Promise<void> => {\n const [command, ...commandArgv] = argv;\n\n if (!command || command === 'help' || command === '--help') {\n console.log(usage);\n return;\n }\n\n registerTsNode();\n\n // Commands are required lazily so a simple `qpq help` doesn't pay for the\n // whole toolchain, and so ts-node is registered before any command module\n // (or anything it requires) loads.\n /* eslint-disable @typescript-eslint/no-require-imports */\n const commands: Record<string, (commandArgv: string[]) => Promise<void>> = {\n go: (a) => require('../commands/go').goCommand(a),\n 'go:docker': (a) => require('../commands/goDocker').goDockerCommand(a),\n 'go:dev': (a) => require('../commands/goDev').goDevCommand(a),\n 'go:dev:web': (a) => require('../commands/goDevWeb').goDevWebCommand(a),\n teardown: (a) => require('../commands/teardown').teardownCommand(a),\n synth: (a) => require('../commands/synth').synthCommand(a),\n prep: (a) => require('../commands/prep').prepCommand(a),\n publish: (a) => require('../commands/publish').publishCommand(a),\n 'publish:build': (a) => require('../commands/publish').publishBuildCommand(a),\n 'publish:upload': (a) => require('../commands/publish').publishUploadCommand(a),\n 'publish:deploy': (a) => require('../commands/publish').publishDeployCommand(a),\n hooks: (a) => require('../commands/hooks').hooksCommand(a),\n };\n /* eslint-enable @typescript-eslint/no-require-imports */\n\n const run = commands[command];\n\n if (!run) {\n console.error(`Unknown command: ${command}`);\n console.log(usage);\n process.exitCode = 1;\n return;\n }\n\n try {\n await run(commandArgv);\n } catch (error) {\n console.error(`qpq ${command} failed:`, error);\n process.exitCode = 1;\n }\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "The qpq CLI — build, dev and deploy orchestration for QPQ apps",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"@inquirer/prompts": "^8.5.2",
|
|
39
39
|
"@rspack/dev-server": "^2.1.0",
|
|
40
40
|
"aws-cdk": "^2.1128.1",
|
|
41
|
-
"quidproquo": "0.1.
|
|
42
|
-
"quidproquo-actionprocessor-awslambda": "0.1.
|
|
43
|
-
"quidproquo-config-aws": "0.1.
|
|
44
|
-
"quidproquo-core": "0.1.
|
|
45
|
-
"quidproquo-deploy-awscdk": "0.1.
|
|
46
|
-
"quidproquo-deploy-rspack": "0.1.
|
|
47
|
-
"quidproquo-dev-server": "0.1.
|
|
48
|
-
"quidproquo-webserver": "0.1.
|
|
41
|
+
"quidproquo": "0.1.6",
|
|
42
|
+
"quidproquo-actionprocessor-awslambda": "0.1.6",
|
|
43
|
+
"quidproquo-config-aws": "0.1.6",
|
|
44
|
+
"quidproquo-core": "0.1.6",
|
|
45
|
+
"quidproquo-deploy-awscdk": "0.1.6",
|
|
46
|
+
"quidproquo-deploy-rspack": "0.1.6",
|
|
47
|
+
"quidproquo-dev-server": "0.1.6",
|
|
48
|
+
"quidproquo-webserver": "0.1.6",
|
|
49
49
|
"ts-node": "^10.9.1",
|
|
50
50
|
"typescript": "^5.8.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@rspack/core": "^2.1.2",
|
|
54
54
|
"@types/node": "^22.13.13",
|
|
55
|
-
"quidproquo-tsconfig": "0.1.
|
|
55
|
+
"quidproquo-tsconfig": "0.1.6"
|
|
56
56
|
},
|
|
57
57
|
"bin": {
|
|
58
58
|
"qpq": "./lib/commonjs/bin/qpq.js"
|