projen 0.100.4 → 0.100.5
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.
- package/.jsii +41 -41
- package/lib/ai-instructions.js +2 -2
- package/lib/awscdk/auto-discover.js +6 -6
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +1 -1
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +3 -3
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-build.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.js +1 -1
- package/lib/cli/cmds/new.js +28 -21
- package/lib/cli/macros.js +5 -4
- package/lib/cli/task-runtime.js +8 -13
- package/lib/cli/util.d.ts +4 -4
- package/lib/cli/util.js +19 -10
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/auto-queue.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/dependency-review.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/merge-queue.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-backport.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow-job.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflow-actions.js +1 -1
- package/lib/github/workflow-jobs.js +1 -1
- package/lib/github/workflow-steps.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +2 -2
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/biome/biome.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/license-checker.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +2 -2
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/javascript/yarnrc.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project-tree.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +1 -1
- package/lib/projenrc.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +10 -7
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pyproject-toml-file.js +1 -1
- package/lib/python/pytest-sample.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/uv.d.ts +3 -3
- package/lib/python/uv.js +6 -6
- package/lib/python/venv.js +4 -4
- package/lib/readme.js +1 -1
- package/lib/release/bump-version.js +16 -19
- package/lib/release/commit-tag-version.d.ts +2 -1
- package/lib/release/commit-tag-version.js +23 -17
- package/lib/release/publisher.js +1 -1
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/release/tag-version.js +3 -3
- package/lib/release/update-changelog.js +4 -2
- package/lib/renovatebot.js +1 -1
- package/lib/run-task.cjs +162 -20
- package/lib/sample-file.js +2 -2
- package/lib/source-code.js +1 -1
- package/lib/task-runner.js +16 -10
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +5 -5
- package/lib/util/exec.d.ts +183 -0
- package/lib/util/exec.js +238 -0
- package/lib/util.d.ts +0 -22
- package/lib/util.js +1 -57
- package/lib/version.js +2 -2
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +3 -3
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +1 -1
package/lib/run-task.cjs
CHANGED
|
@@ -889,10 +889,10 @@ var require_route = __commonJS({
|
|
|
889
889
|
const adjacents = Object.keys(conversions[current]);
|
|
890
890
|
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
891
891
|
const adjacent = adjacents[i];
|
|
892
|
-
const
|
|
893
|
-
if (
|
|
894
|
-
|
|
895
|
-
|
|
892
|
+
const node2 = graph[adjacent];
|
|
893
|
+
if (node2.distance === -1) {
|
|
894
|
+
node2.distance = graph[current].distance + 1;
|
|
895
|
+
node2.parent = current;
|
|
896
896
|
queue.unshift(adjacent);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
@@ -922,8 +922,8 @@ var require_route = __commonJS({
|
|
|
922
922
|
const models = Object.keys(graph);
|
|
923
923
|
for (let len = models.length, i = 0; i < len; i++) {
|
|
924
924
|
const toModel = models[i];
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
925
|
+
const node2 = graph[toModel];
|
|
926
|
+
if (node2.parent === null) {
|
|
927
927
|
continue;
|
|
928
928
|
}
|
|
929
929
|
conversion[toModel] = wrapConversion(toModel, graph);
|
|
@@ -1733,7 +1733,7 @@ var require_package = __commonJS({
|
|
|
1733
1733
|
publishConfig: {
|
|
1734
1734
|
access: "public"
|
|
1735
1735
|
},
|
|
1736
|
-
version: "0.100.
|
|
1736
|
+
version: "0.100.5",
|
|
1737
1737
|
jest: {
|
|
1738
1738
|
coverageProvider: "v8",
|
|
1739
1739
|
coverageReporters: [
|
|
@@ -2269,7 +2269,6 @@ __export(task_runtime_exports, {
|
|
|
2269
2269
|
TaskRuntime: () => TaskRuntime
|
|
2270
2270
|
});
|
|
2271
2271
|
module.exports = __toCommonJS(task_runtime_exports);
|
|
2272
|
-
var import_child_process = require("child_process");
|
|
2273
2272
|
var import_fs = require("fs");
|
|
2274
2273
|
var import_path = require("path");
|
|
2275
2274
|
var path6 = __toESM(require("path"));
|
|
@@ -14325,6 +14324,156 @@ function warn(...text) {
|
|
|
14325
14324
|
log(false, import_chalk.default.yellow, ...text);
|
|
14326
14325
|
}
|
|
14327
14326
|
|
|
14327
|
+
// src/util/exec.ts
|
|
14328
|
+
var child_process = __toESM(require("child_process"));
|
|
14329
|
+
var MAX_BUFFER = 10 * 1024 * 1024;
|
|
14330
|
+
function spawnOpts(options) {
|
|
14331
|
+
return {
|
|
14332
|
+
maxBuffer: MAX_BUFFER,
|
|
14333
|
+
cwd: options.cwd,
|
|
14334
|
+
env: options.env ? { ...process.env, ...options.env } : void 0,
|
|
14335
|
+
// run the program directly, without going through a shell
|
|
14336
|
+
shell: false
|
|
14337
|
+
};
|
|
14338
|
+
}
|
|
14339
|
+
function run2(file, args, options) {
|
|
14340
|
+
debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
|
|
14341
|
+
child_process.execFileSync(file, args, {
|
|
14342
|
+
...spawnOpts(options),
|
|
14343
|
+
// By default the child's stdout is redirected to STDERR (to keep the
|
|
14344
|
+
// parent's STDOUT clean) and its STDERR is piped so it surfaces in
|
|
14345
|
+
// exceptions. `inheritStdio` instead streams both straight to the parent.
|
|
14346
|
+
stdio: options.inheritStdio ? "inherit" : ["inherit", 2, "pipe"]
|
|
14347
|
+
});
|
|
14348
|
+
}
|
|
14349
|
+
function capture(file, args, options) {
|
|
14350
|
+
debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
|
|
14351
|
+
return child_process.execFileSync(file, args, {
|
|
14352
|
+
...spawnOpts(options),
|
|
14353
|
+
stdio: ["inherit", "pipe", "pipe"]
|
|
14354
|
+
// "pipe" for STDERR means it appears in exceptions
|
|
14355
|
+
}).toString("utf-8").trim();
|
|
14356
|
+
}
|
|
14357
|
+
function tryCapture(file, args, options) {
|
|
14358
|
+
debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
|
|
14359
|
+
try {
|
|
14360
|
+
const value = child_process.execFileSync(file, args, {
|
|
14361
|
+
...spawnOpts(options),
|
|
14362
|
+
stdio: ["inherit", "pipe", "pipe"]
|
|
14363
|
+
// "pipe" for STDERR means it appears in exceptions
|
|
14364
|
+
}).toString("utf-8").trim();
|
|
14365
|
+
return value || void 0;
|
|
14366
|
+
} catch {
|
|
14367
|
+
return void 0;
|
|
14368
|
+
}
|
|
14369
|
+
}
|
|
14370
|
+
function tool(file) {
|
|
14371
|
+
return {
|
|
14372
|
+
run: (args, options) => run2(file, args, options),
|
|
14373
|
+
capture: (args, options) => capture(file, args, options),
|
|
14374
|
+
tryCapture: (args, options) => tryCapture(file, args, options)
|
|
14375
|
+
};
|
|
14376
|
+
}
|
|
14377
|
+
var git = tool("git");
|
|
14378
|
+
var uv = tool("uv");
|
|
14379
|
+
var poetry = tool("poetry");
|
|
14380
|
+
var node = tool(process.execPath);
|
|
14381
|
+
function shimTool(file) {
|
|
14382
|
+
const build = (args, options) => {
|
|
14383
|
+
const cmd = $2`${file} ${args}`.cwd(options.cwd).stderr("piped").noThrow();
|
|
14384
|
+
return options.env ? cmd.env(options.env) : cmd;
|
|
14385
|
+
};
|
|
14386
|
+
const ensureOk = (args, result) => {
|
|
14387
|
+
if (result.code !== 0) {
|
|
14388
|
+
const error = new Error(
|
|
14389
|
+
`Command failed (exit code ${result.code}): ${file} ${args.join(" ")}`
|
|
14390
|
+
);
|
|
14391
|
+
error.status = result.code;
|
|
14392
|
+
error.stderr = Buffer.from(result.stderr);
|
|
14393
|
+
throw error;
|
|
14394
|
+
}
|
|
14395
|
+
};
|
|
14396
|
+
return {
|
|
14397
|
+
run: async (args, options) => {
|
|
14398
|
+
debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
|
|
14399
|
+
ensureOk(args, await build(args, options));
|
|
14400
|
+
},
|
|
14401
|
+
capture: async (args, options) => {
|
|
14402
|
+
debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
|
|
14403
|
+
const result = await build(args, options).stdout("piped");
|
|
14404
|
+
ensureOk(args, result);
|
|
14405
|
+
return result.stdout.trim();
|
|
14406
|
+
}
|
|
14407
|
+
};
|
|
14408
|
+
}
|
|
14409
|
+
var npm = shimTool("npm");
|
|
14410
|
+
var npx = shimTool("npx");
|
|
14411
|
+
var rawShell = {
|
|
14412
|
+
/**
|
|
14413
|
+
* Runs a command line through the system shell and returns a normalized
|
|
14414
|
+
* result. Never throws for a non-zero exit (that is reported via `status`);
|
|
14415
|
+
* a spawn failure is reported via `error`.
|
|
14416
|
+
*
|
|
14417
|
+
* The caller is responsible for supplying the full `env`.
|
|
14418
|
+
*/
|
|
14419
|
+
exec(command, options) {
|
|
14420
|
+
debug(`${command} (cwd: ${options.cwd})`);
|
|
14421
|
+
const result = child_process.spawnSync(command, {
|
|
14422
|
+
cwd: options.cwd,
|
|
14423
|
+
shell: true,
|
|
14424
|
+
maxBuffer: MAX_BUFFER,
|
|
14425
|
+
env: options.env,
|
|
14426
|
+
// "pipe" for STDERR (when capturing) means it appears in exceptions.
|
|
14427
|
+
stdio: options.capture ? ["inherit", "pipe", "pipe"] : "inherit"
|
|
14428
|
+
});
|
|
14429
|
+
return {
|
|
14430
|
+
status: result.status,
|
|
14431
|
+
stdout: result.stdout ?? null,
|
|
14432
|
+
stderr: result.stderr ?? null,
|
|
14433
|
+
error: result.error
|
|
14434
|
+
};
|
|
14435
|
+
},
|
|
14436
|
+
/**
|
|
14437
|
+
* Runs a user-supplied shell command line and resolves its trimmed STDOUT.
|
|
14438
|
+
* Rejects if the command exits non-zero.
|
|
14439
|
+
*/
|
|
14440
|
+
capture: async (command, options) => {
|
|
14441
|
+
const result = rawShell.exec(command, {
|
|
14442
|
+
cwd: options.cwd,
|
|
14443
|
+
env: { ...process.env, ...options.env },
|
|
14444
|
+
capture: true
|
|
14445
|
+
});
|
|
14446
|
+
if (result.error) {
|
|
14447
|
+
throw result.error;
|
|
14448
|
+
}
|
|
14449
|
+
if (result.status !== 0) {
|
|
14450
|
+
const error = new Error(
|
|
14451
|
+
`Command failed (exit code ${result.status}): ${command}`
|
|
14452
|
+
);
|
|
14453
|
+
error.status = result.status;
|
|
14454
|
+
error.stderr = result.stderr;
|
|
14455
|
+
throw error;
|
|
14456
|
+
}
|
|
14457
|
+
return (result.stdout?.toString("utf-8") ?? "").trim();
|
|
14458
|
+
},
|
|
14459
|
+
/**
|
|
14460
|
+
* Runs a user-supplied shell command line and resolves its trimmed STDOUT,
|
|
14461
|
+
* or `undefined` if the command failed or produced no output.
|
|
14462
|
+
*/
|
|
14463
|
+
tryCapture: async (command, options) => {
|
|
14464
|
+
const result = rawShell.exec(command, {
|
|
14465
|
+
cwd: options.cwd,
|
|
14466
|
+
env: { ...process.env, ...options.env },
|
|
14467
|
+
capture: true
|
|
14468
|
+
});
|
|
14469
|
+
if (result.error || result.status !== 0) {
|
|
14470
|
+
return void 0;
|
|
14471
|
+
}
|
|
14472
|
+
const out = (result.stdout?.toString("utf-8") ?? "").trim();
|
|
14473
|
+
return out || void 0;
|
|
14474
|
+
}
|
|
14475
|
+
};
|
|
14476
|
+
|
|
14328
14477
|
// src/cli/task-runtime.ts
|
|
14329
14478
|
var parseConflictJSONModule = require_lib2();
|
|
14330
14479
|
var parseConflictJSON = parseConflictJSONModule?.default ?? parseConflictJSONModule;
|
|
@@ -14683,23 +14832,16 @@ var RunTask = class {
|
|
|
14683
14832
|
...this.env,
|
|
14684
14833
|
...options.extraEnv
|
|
14685
14834
|
};
|
|
14835
|
+
const capture2 = Array.isArray(options.spawnOptions?.stdio);
|
|
14686
14836
|
if (process.platform === "win32") {
|
|
14687
|
-
const
|
|
14688
|
-
const result = await $2.raw`${options.command}`.cwd(cwd2).env(env).stdout(capture ? "piped" : "inherit").stderr(capture ? "piped" : "inherit").noThrow();
|
|
14837
|
+
const result = await $2.raw`${options.command}`.cwd(cwd2).env(env).stdout(capture2 ? "piped" : "inherit").stderr(capture2 ? "piped" : "inherit").noThrow();
|
|
14689
14838
|
return {
|
|
14690
14839
|
status: result.code,
|
|
14691
|
-
stdout:
|
|
14692
|
-
stderr:
|
|
14840
|
+
stdout: capture2 ? Buffer.from(result.stdoutBytes) : null,
|
|
14841
|
+
stderr: capture2 ? Buffer.from(result.stderrBytes) : null
|
|
14693
14842
|
};
|
|
14694
14843
|
}
|
|
14695
|
-
return
|
|
14696
|
-
...options,
|
|
14697
|
-
cwd: cwd2,
|
|
14698
|
-
shell: true,
|
|
14699
|
-
stdio: "inherit",
|
|
14700
|
-
env,
|
|
14701
|
-
...options.spawnOptions
|
|
14702
|
-
});
|
|
14844
|
+
return rawShell.exec(options.command, { cwd: cwd2, env, capture: capture2 });
|
|
14703
14845
|
}
|
|
14704
14846
|
async shellEval(options) {
|
|
14705
14847
|
return this.shell({
|
package/lib/sample-file.js
CHANGED
|
@@ -45,7 +45,7 @@ const util_1 = require("./util");
|
|
|
45
45
|
* Use this for creating example code files or other resources.
|
|
46
46
|
*/
|
|
47
47
|
class SampleFile extends component_1.Component {
|
|
48
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleFile", version: "0.100.
|
|
48
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleFile", version: "0.100.5" };
|
|
49
49
|
filePath;
|
|
50
50
|
options;
|
|
51
51
|
/**
|
|
@@ -96,7 +96,7 @@ exports.SampleFile = SampleFile;
|
|
|
96
96
|
* Renders the given files into the directory if the directory does not exist. Use this to create sample code files
|
|
97
97
|
*/
|
|
98
98
|
class SampleDir extends component_1.Component {
|
|
99
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleDir", version: "0.100.
|
|
99
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleDir", version: "0.100.5" };
|
|
100
100
|
dir;
|
|
101
101
|
options;
|
|
102
102
|
/**
|
package/lib/source-code.js
CHANGED
|
@@ -9,7 +9,7 @@ const textfile_1 = require("./textfile");
|
|
|
9
9
|
*/
|
|
10
10
|
class SourceCode extends component_1.Component {
|
|
11
11
|
filePath;
|
|
12
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SourceCode", version: "0.100.
|
|
12
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SourceCode", version: "0.100.5" };
|
|
13
13
|
file;
|
|
14
14
|
indentLevel = 0;
|
|
15
15
|
indent;
|
package/lib/task-runner.js
CHANGED
|
@@ -34,12 +34,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ProjenTaskRunner = void 0;
|
|
37
|
-
const node_child_process_1 = require("node:child_process");
|
|
38
37
|
const path = __importStar(require("node:path"));
|
|
39
38
|
const _resolve_1 = require("./_resolve");
|
|
40
39
|
const common_1 = require("./common");
|
|
41
40
|
const component_1 = require("./component");
|
|
42
41
|
const json_1 = require("./json");
|
|
42
|
+
const exec_1 = require("./util/exec");
|
|
43
43
|
class ProjenTaskRunner extends component_1.Component {
|
|
44
44
|
/**
|
|
45
45
|
* The project-relative path of the tasks manifest file.
|
|
@@ -70,15 +70,21 @@ class ProjenTaskRunner extends component_1.Component {
|
|
|
70
70
|
const moduleRoot = path.dirname(require.resolve("../package.json"));
|
|
71
71
|
const cli = path.join(moduleRoot, "lib", "cli", "index.js");
|
|
72
72
|
const argv = [cli, task.name, ...(args ?? []).map((a) => a.toString())];
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
throw result.error;
|
|
73
|
+
try {
|
|
74
|
+
exec_1.node.run(argv, {
|
|
75
|
+
cwd: this.project.outdir,
|
|
76
|
+
inheritStdio: true,
|
|
77
|
+
});
|
|
79
78
|
}
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
catch (e) {
|
|
80
|
+
// `node.run` (execFileSync) throws on a non-zero exit (with a numeric
|
|
81
|
+
// `.status`) or on a spawn failure. Translate a non-zero exit into a
|
|
82
|
+
// task-friendly error; re-throw spawn errors as-is. The child's stderr
|
|
83
|
+
// was already streamed live (inheritStdio), so it need not be re-surfaced.
|
|
84
|
+
if (typeof e?.status === "number") {
|
|
85
|
+
throw new Error(`Task "${task.name}" failed (exit code ${e.status}).`);
|
|
86
|
+
}
|
|
87
|
+
throw e;
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
90
|
get tasksManifest() {
|
|
@@ -97,4 +103,4 @@ class ProjenTaskRunner extends component_1.Component {
|
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
exports.ProjenTaskRunner = ProjenTaskRunner;
|
|
100
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
106
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFzay1ydW5uZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdGFzay1ydW5uZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsZ0RBQWtDO0FBRWxDLHlDQUFxQztBQUNyQyxxQ0FBOEQ7QUFDOUQsMkNBQXdDO0FBRXhDLGlDQUFrQztBQUdsQyxzQ0FBbUM7QUFXbkMsTUFBYSxnQkFBaUIsU0FBUSxxQkFBUztJQUM3Qzs7T0FFRztJQUNJLE1BQU0sQ0FBVSxhQUFhLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQ3BELG1CQUFVLEVBQ1YsWUFBWSxDQUNiLENBQUM7SUFFRixZQU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W50aWFsbHkgaW5jb21wYXRpYmxlKVxuICAgIC8vIHZlcnNpb24gb2YgcHJvamVuLlxuICAgIGNvbnN0IHJlc29sdmVkOiBUYXNrc01hbmlmZXN0ID1cbiAgICAgIHRoaXMucHJvamVjdC50YXNrcy5yZXNvbHZlVGFza3NNYW5pZmVzdChyZXNvbHZlcikgPz8ge307XG5cbiAgICByZXR1cm4ge1xuICAgICAgbWFuaWZlc3RWZXJzaW9uOiBUQVNLU19NQU5JRkVTVF9WRVJTSU9OLFxuICAgICAgLi4ucmVzb2x2ZWQsXG4gICAgfTtcbiAgfVxufVxuIl19
|
package/lib/task.js
CHANGED
|
@@ -8,7 +8,7 @@ const logging_1 = require("./logging");
|
|
|
8
8
|
* commands and subtasks.
|
|
9
9
|
*/
|
|
10
10
|
class Task {
|
|
11
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Task", version: "0.100.
|
|
11
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Task", version: "0.100.5" };
|
|
12
12
|
/**
|
|
13
13
|
* Task name.
|
|
14
14
|
*/
|
package/lib/tasks.js
CHANGED
|
@@ -48,7 +48,7 @@ const task_runner_1 = require("./task-runner");
|
|
|
48
48
|
* synthesized into `.projen/tasks.json`.
|
|
49
49
|
*/
|
|
50
50
|
class Tasks extends component_1.Component {
|
|
51
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Tasks", version: "0.100.
|
|
51
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Tasks", version: "0.100.5" };
|
|
52
52
|
_tasks;
|
|
53
53
|
_env;
|
|
54
54
|
_runner;
|
package/lib/testing.js
CHANGED
|
@@ -10,7 +10,7 @@ const synth_1 = require("./util/synth");
|
|
|
10
10
|
* @example `expect(Testing.synth(someProject)).toMatchSnapshot()`
|
|
11
11
|
*/
|
|
12
12
|
class Testing {
|
|
13
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Testing", version: "0.100.
|
|
13
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Testing", version: "0.100.5" };
|
|
14
14
|
/**
|
|
15
15
|
* Produces a simple JS object that represents the contents of the projects with field names being file paths.
|
|
16
16
|
* @param project the project to produce a snapshot for
|
package/lib/textfile.js
CHANGED
|
@@ -7,7 +7,7 @@ const file_1 = require("./file");
|
|
|
7
7
|
* A text file.
|
|
8
8
|
*/
|
|
9
9
|
class TextFile extends file_1.FileBase {
|
|
10
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TextFile", version: "0.100.
|
|
10
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TextFile", version: "0.100.5" };
|
|
11
11
|
lines;
|
|
12
12
|
/**
|
|
13
13
|
* Defines a text file.
|
package/lib/toml.js
CHANGED
|
@@ -41,7 +41,7 @@ const object_file_1 = require("./object-file");
|
|
|
41
41
|
* Represents a TOML file.
|
|
42
42
|
*/
|
|
43
43
|
class TomlFile extends object_file_1.ObjectFile {
|
|
44
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TomlFile", version: "0.100.
|
|
44
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TomlFile", version: "0.100.5" };
|
|
45
45
|
constructor(scope, filePath, options) {
|
|
46
46
|
super(scope, filePath, options);
|
|
47
47
|
}
|
|
@@ -17,7 +17,7 @@ const DEFAULT_FILENAME = ".projenrc.ts";
|
|
|
17
17
|
* Requires that `npx` is available.
|
|
18
18
|
*/
|
|
19
19
|
class ProjenrcTs extends projenrc_1.ProjenrcFile {
|
|
20
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.ProjenrcTs", version: "0.100.
|
|
20
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.ProjenrcTs", version: "0.100.5" };
|
|
21
21
|
/**
|
|
22
22
|
* TypeScript configuration file used to compile projen source files
|
|
23
23
|
*/
|
|
@@ -12,7 +12,7 @@ const DEFAULT_FILENAME = ".projenrc.ts";
|
|
|
12
12
|
* Sets up a typescript project to use TypeScript for projenrc.
|
|
13
13
|
*/
|
|
14
14
|
class Projenrc extends projenrc_1.ProjenrcFile {
|
|
15
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.Projenrc", version: "0.100.
|
|
15
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.Projenrc", version: "0.100.5" };
|
|
16
16
|
filePath;
|
|
17
17
|
tsconfig;
|
|
18
18
|
_projenCodeDir;
|
|
@@ -6,7 +6,7 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
|
6
6
|
Adds a simple Typescript documentation generator
|
|
7
7
|
*/
|
|
8
8
|
class TypedocDocgen {
|
|
9
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TypedocDocgen", version: "0.100.
|
|
9
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TypedocDocgen", version: "0.100.5" };
|
|
10
10
|
constructor(project) {
|
|
11
11
|
project.addDevDeps("typedoc");
|
|
12
12
|
const docgen = project.addTask("docgen", {
|
|
@@ -52,7 +52,7 @@ const util_2 = require("../util");
|
|
|
52
52
|
*/
|
|
53
53
|
class TsJestBabelConfig {
|
|
54
54
|
config;
|
|
55
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TsJestBabelConfig", version: "0.100.
|
|
55
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TsJestBabelConfig", version: "0.100.5" };
|
|
56
56
|
/**
|
|
57
57
|
* Disables the use of Babel
|
|
58
58
|
*/
|
|
@@ -99,7 +99,7 @@ exports.TsJestBabelConfig = TsJestBabelConfig;
|
|
|
99
99
|
*/
|
|
100
100
|
class TsJestDiagnostics {
|
|
101
101
|
config;
|
|
102
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TsJestDiagnostics", version: "0.100.
|
|
102
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TsJestDiagnostics", version: "0.100.5" };
|
|
103
103
|
/**
|
|
104
104
|
* Enable all diagnostics.
|
|
105
105
|
*/
|
|
@@ -137,7 +137,7 @@ exports.TsJestDiagnostics = TsJestDiagnostics;
|
|
|
137
137
|
*/
|
|
138
138
|
class TsJestTsconfig {
|
|
139
139
|
config;
|
|
140
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TsJestTsconfig", version: "0.100.
|
|
140
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TsJestTsconfig", version: "0.100.5" };
|
|
141
141
|
/**
|
|
142
142
|
* Uses `tsconfig.json` if found, or the built-in default TypeScript compiler options.
|
|
143
143
|
*/
|
|
@@ -183,7 +183,7 @@ exports.TsJestTsconfig = TsJestTsconfig;
|
|
|
183
183
|
* @pjid typescript
|
|
184
184
|
*/
|
|
185
185
|
class TypeScriptProject extends javascript_1.NodeProject {
|
|
186
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TypeScriptProject", version: "0.100.
|
|
186
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TypeScriptProject", version: "0.100.5" };
|
|
187
187
|
static DEFAULT_TS_JEST_TRANFORM_PATTERN = "^.+\\.[t]sx?$";
|
|
188
188
|
docgen;
|
|
189
189
|
docsDirectory;
|
|
@@ -616,7 +616,7 @@ class SampleCode extends component_1.Component {
|
|
|
616
616
|
* @pjid typescript-app
|
|
617
617
|
*/
|
|
618
618
|
class TypeScriptAppProject extends TypeScriptProject {
|
|
619
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TypeScriptAppProject", version: "0.100.
|
|
619
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.typescript.TypeScriptAppProject", version: "0.100.5" };
|
|
620
620
|
constructor(options) {
|
|
621
621
|
// Releasing and packaging are coupled. If one is disabled, disable the other by default.
|
|
622
622
|
const shouldRelease = options.release ?? false;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for shell-free command execution.
|
|
3
|
+
*/
|
|
4
|
+
export interface ExecFileOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Working directory for the command.
|
|
7
|
+
*/
|
|
8
|
+
readonly cwd: string;
|
|
9
|
+
/**
|
|
10
|
+
* Additional environment variables, merged on top of `process.env`.
|
|
11
|
+
*/
|
|
12
|
+
readonly env?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Options for {@link Tool.run}.
|
|
16
|
+
*/
|
|
17
|
+
export interface RunOptions extends ExecFileOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Stream the child's stdout and stderr straight to the parent's stdout and
|
|
20
|
+
* stderr (full inheritance), instead of redirecting stdout to stderr and
|
|
21
|
+
* capturing stderr (the default).
|
|
22
|
+
*
|
|
23
|
+
* Use this when launching a child process whose stdout is meaningful and
|
|
24
|
+
* whose output should stream live to the user (e.g. the projen CLI).
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
readonly inheritStdio?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A shell-free handle for invoking a single program by name or path.
|
|
32
|
+
*
|
|
33
|
+
* Each argument is passed to the program verbatim (no shell parsing), so there
|
|
34
|
+
* is no quoting to get right for values such as tags, versions, branch names
|
|
35
|
+
* or file paths.
|
|
36
|
+
*
|
|
37
|
+
* Note: the program is executed directly, without a shell. On Windows this
|
|
38
|
+
* means it must be a real executable - `.cmd`/`.bat` shims (such as
|
|
39
|
+
* npm-installed CLIs like npm/npx/yarn/pnpm) cannot be invoked this way.
|
|
40
|
+
*/
|
|
41
|
+
export interface Tool {
|
|
42
|
+
/**
|
|
43
|
+
* Runs `<tool> <args>`, inheriting stdout. Throws on non-zero exit.
|
|
44
|
+
*/
|
|
45
|
+
run(args: string[], options: RunOptions): void;
|
|
46
|
+
/**
|
|
47
|
+
* Runs `<tool> <args>` and returns its trimmed STDOUT. Throws on non-zero exit.
|
|
48
|
+
*/
|
|
49
|
+
capture(args: string[], options: ExecFileOptions): string;
|
|
50
|
+
/**
|
|
51
|
+
* Runs `<tool> <args>` and returns its trimmed STDOUT, or `undefined` if the
|
|
52
|
+
* command failed or produced no output.
|
|
53
|
+
*/
|
|
54
|
+
tryCapture(args: string[], options: ExecFileOptions): string | undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Creates a shell-free {@link Tool} for the given program.
|
|
58
|
+
*
|
|
59
|
+
* @example const git = tool("git"); git.run(["tag", "--delete", tag], { cwd });
|
|
60
|
+
*/
|
|
61
|
+
export declare function tool(file: string): Tool;
|
|
62
|
+
/**
|
|
63
|
+
* Shell-free helper for invoking `git`.
|
|
64
|
+
*
|
|
65
|
+
* @example git.run(["tag", "--delete", tag], { cwd });
|
|
66
|
+
*/
|
|
67
|
+
export declare const git: Tool;
|
|
68
|
+
/**
|
|
69
|
+
* Shell-free helper for invoking `uv` (ships as a native binary on all
|
|
70
|
+
* platforms).
|
|
71
|
+
*/
|
|
72
|
+
export declare const uv: Tool;
|
|
73
|
+
/**
|
|
74
|
+
* Shell-free helper for invoking `poetry`.
|
|
75
|
+
*/
|
|
76
|
+
export declare const poetry: Tool;
|
|
77
|
+
/**
|
|
78
|
+
* Shell-free helper for invoking the current Node.js executable
|
|
79
|
+
* (`process.execPath`).
|
|
80
|
+
*/
|
|
81
|
+
export declare const node: Tool;
|
|
82
|
+
/**
|
|
83
|
+
* Async, dax-backed equivalent of {@link Tool} for programs that may be a
|
|
84
|
+
* Windows `.cmd`/`.bat` shim (e.g. `npx`, `npm`).
|
|
85
|
+
*/
|
|
86
|
+
export interface AsyncTool {
|
|
87
|
+
/**
|
|
88
|
+
* Runs `<tool> <args>`, inheriting stdout. Rejects on non-zero exit.
|
|
89
|
+
*/
|
|
90
|
+
run(args: string[], options: ExecFileOptions): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Runs `<tool> <args>` and resolves its trimmed STDOUT. Rejects on non-zero
|
|
93
|
+
* exit.
|
|
94
|
+
*/
|
|
95
|
+
capture(args: string[], options: ExecFileOptions): Promise<string>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Cross-platform helper for `npm` (a Windows `.cmd` shim).
|
|
99
|
+
*/
|
|
100
|
+
export declare const npm: AsyncTool;
|
|
101
|
+
/**
|
|
102
|
+
* Cross-platform helper for `npx` (a Windows `.cmd` shim).
|
|
103
|
+
*/
|
|
104
|
+
export declare const npx: AsyncTool;
|
|
105
|
+
/**
|
|
106
|
+
* Normalized result of running a command through the system shell. This is a
|
|
107
|
+
* subset of node's `SpawnSyncReturns` shape.
|
|
108
|
+
*/
|
|
109
|
+
export interface RawShellResult {
|
|
110
|
+
/**
|
|
111
|
+
* The exit code, or `null` if the process was terminated by a signal or
|
|
112
|
+
* never spawned.
|
|
113
|
+
*/
|
|
114
|
+
readonly status: number | null;
|
|
115
|
+
/**
|
|
116
|
+
* Captured stdout, or `null` when stdout was inherited (not captured).
|
|
117
|
+
*/
|
|
118
|
+
readonly stdout: Buffer | null;
|
|
119
|
+
/**
|
|
120
|
+
* Captured stderr, or `null` when stderr was inherited (not captured).
|
|
121
|
+
*/
|
|
122
|
+
readonly stderr: Buffer | null;
|
|
123
|
+
/**
|
|
124
|
+
* An error raised while attempting to spawn the command (not a non-zero
|
|
125
|
+
* exit, which is reported via `status`).
|
|
126
|
+
*/
|
|
127
|
+
readonly error?: Error;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Options for {@link rawShell.exec}.
|
|
131
|
+
*/
|
|
132
|
+
export interface RawShellExecOptions {
|
|
133
|
+
/**
|
|
134
|
+
* Working directory for the command.
|
|
135
|
+
*/
|
|
136
|
+
readonly cwd: string;
|
|
137
|
+
/**
|
|
138
|
+
* The full environment for the command. Passed through to the shell as-is
|
|
139
|
+
* (it is *not* merged with `process.env`), so callers that want to inherit
|
|
140
|
+
* the parent environment must include it themselves.
|
|
141
|
+
*/
|
|
142
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
143
|
+
/**
|
|
144
|
+
* Capture stdout/stderr (so the caller can read them from the result)
|
|
145
|
+
* instead of inheriting the parent's streams.
|
|
146
|
+
*
|
|
147
|
+
* @default false
|
|
148
|
+
*/
|
|
149
|
+
readonly capture?: boolean;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Options for {@link rawShell.capture} / {@link rawShell.tryCapture}.
|
|
153
|
+
*/
|
|
154
|
+
export interface RawShellCaptureOptions {
|
|
155
|
+
/**
|
|
156
|
+
* Working directory for the command.
|
|
157
|
+
*/
|
|
158
|
+
readonly cwd: string;
|
|
159
|
+
/**
|
|
160
|
+
* Additional environment variables, merged on top of `process.env`.
|
|
161
|
+
*/
|
|
162
|
+
readonly env?: Record<string, string>;
|
|
163
|
+
}
|
|
164
|
+
export declare const rawShell: {
|
|
165
|
+
/**
|
|
166
|
+
* Runs a command line through the system shell and returns a normalized
|
|
167
|
+
* result. Never throws for a non-zero exit (that is reported via `status`);
|
|
168
|
+
* a spawn failure is reported via `error`.
|
|
169
|
+
*
|
|
170
|
+
* The caller is responsible for supplying the full `env`.
|
|
171
|
+
*/
|
|
172
|
+
exec(command: string, options: RawShellExecOptions): RawShellResult;
|
|
173
|
+
/**
|
|
174
|
+
* Runs a user-supplied shell command line and resolves its trimmed STDOUT.
|
|
175
|
+
* Rejects if the command exits non-zero.
|
|
176
|
+
*/
|
|
177
|
+
capture: (command: string, options: RawShellCaptureOptions) => Promise<string>;
|
|
178
|
+
/**
|
|
179
|
+
* Runs a user-supplied shell command line and resolves its trimmed STDOUT,
|
|
180
|
+
* or `undefined` if the command failed or produced no output.
|
|
181
|
+
*/
|
|
182
|
+
tryCapture: (command: string, options: RawShellCaptureOptions) => Promise<string | undefined>;
|
|
183
|
+
};
|