diff --git a/package.json b/package.json index f4445f9d0..f8d1a1809 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "husky": "^9.1.7", "lint-staged": "^17.5.1", "mock-stdin": "^1.0.0", - "oxfmt": "0.73.0", + "oxfmt": "0.74.0", "oxlint": "1.88.0", "oxlint-tsgolint": "0.22.1", "rimraf": "~6.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a840a559..4f478175f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -366,8 +366,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 oxfmt: - specifier: 0.73.0 - version: 0.73.0 + specifier: 0.74.0 + version: 0.74.0 oxlint: specifier: 1.88.0 version: 1.88.0(oxlint-tsgolint@0.22.1) @@ -2742,124 +2742,124 @@ packages: '@oxc-project/types@0.150.0': resolution: {integrity: sha512-rDS5/31E9HfPl/CIzGrn0DOlvBbXFseQ5URJ9sYMfstbKLD/c6Gm9vmRzRGDdAXyOIL4zmO37lc9RIwYqVruZw==} - '@oxfmt/binding-android-arm-eabi@0.73.0': - resolution: {integrity: sha512-dhunAdMbi/4o0Y66/+Wl6rpsNqpvE4i26Qw6bB77A97L2lJoktWg6m+X9QOon8iOEEqzD9rEZqFi5uZ4oIzhCA==} + '@oxfmt/binding-android-arm-eabi@0.74.0': + resolution: {integrity: sha512-xxQwrf5EPI5zxvuCTW8r6tzCTjPQ+h6+HqJ0iRKRy2zS1yBllt/xLVjoIyUc+FnR7g0a5g1SZv2yyDYhTItLbA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxfmt/binding-android-arm64@0.73.0': - resolution: {integrity: sha512-dBoypjC2/xeyKyIhN2waX0/XeoccH9k0lVVe+sGRc4X8HSJVRtqyZDoXdr7bGY9A75c51dX0z0dLDpGQKwCdCg==} + '@oxfmt/binding-android-arm64@0.74.0': + resolution: {integrity: sha512-FJW3sATVvrWbV64al8xofCPZj4500Z/1W0ad7Tg1rcCUyh0EMbuSrsf3jsZS7CEbwQ5fQ0mRhmkc129GFgofSQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxfmt/binding-darwin-arm64@0.73.0': - resolution: {integrity: sha512-Tn7Y+qWIpCQK+qdYwBcn6YvqeBuPiuG3tcNlYg16a5QL2o3rSmrgBB1nCyYqo0uvc1LNrfQW9/CK2tzFuID/Fg==} + '@oxfmt/binding-darwin-arm64@0.74.0': + resolution: {integrity: sha512-TfmNKBD30dGyMu9GCLiaw2rt/z7fms9LS+5cKcNOyWst0QgAs8oZs6wPxMbVaaDVE0/PCdCosgWM1vbu6f5NUg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/binding-darwin-x64@0.73.0': - resolution: {integrity: sha512-yVb0E0tg/+9Xc9YJCBq66qF1DC/aN5mhb5nnHz0k4ikwkMANtSul2VPDSwjYdXR6/DFimc+pPUgLBqkIa5Ctuw==} + '@oxfmt/binding-darwin-x64@0.74.0': + resolution: {integrity: sha512-5Usf8+DfC4Q3o/MD8FkN47GrI6y0KbhQ4KhZ2HGzMZcXjcW1AeldwbUn51aKih+1TVuJFF9qkNm6X1nzm6NYng==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/binding-freebsd-x64@0.73.0': - resolution: {integrity: sha512-IKR4lFnBkYNL9Uqdxa5GMTQLvnLj+3sDwTvh2atHCzah0xeo+1xR5bigRU8uyXlOsA4VpXUn0UAimq4E4RBGmQ==} + '@oxfmt/binding-freebsd-x64@0.74.0': + resolution: {integrity: sha512-eL+1O3gykw1XihbZh2MRAciQvU2988LByrnjhyo/dmNG74X4oZ7XzigRoWPRFLfJCp8hzRkp/LbEhwe7uuT2eA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxfmt/binding-linux-arm-gnueabihf@0.73.0': - resolution: {integrity: sha512-7qnZ4g0ZCO3aZevOOQpZIABYwwXJW1lLDo2elviGdPQ0i11255xKEMFsi97fC1/nauQFseCJfELUy/k2JoOP+g==} + '@oxfmt/binding-linux-arm-gnueabihf@0.74.0': + resolution: {integrity: sha512-Xt0QtO2hJ4stnul8IL4LJGVLyp0xnc6ccN9fZ30yuubv8FWSRYxWwd1Za62KsEqAfmPSazoS/cLSUUJpja6npA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm-musleabihf@0.73.0': - resolution: {integrity: sha512-36eBico2j/WPB84gb4FYd/jjqGCKOwU4M+TWLBUIqlnzTozQueLy0joA5BwsSp2OZFVkOlpCwvA3ndPamdiyLw==} + '@oxfmt/binding-linux-arm-musleabihf@0.74.0': + resolution: {integrity: sha512-/4wYQ0gZl4vUR0QoBTGaay73FmQ1GAjUa9z9101TR2xbGNrg4a+grazlR0yzEOe3/E+PJr5BGfj66MMzm/54vg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm64-gnu@0.73.0': - resolution: {integrity: sha512-VZ3cSgCAT18knKo52DcACmAuIoqG6qVEyeZRFbJd0xmYQ8GyYjuBc6IAh6MZHijT6q7p4/HPI+6ZWsCuhdV6iw==} + '@oxfmt/binding-linux-arm64-gnu@0.74.0': + resolution: {integrity: sha512-846bKzF+HJd+JkOFh3rxzmYvSq4Cm+GMT+p+mW7S13ZYo6GAAGv8bL8cAOi/XcdeMqxEJDCIMTVQLVBXHMCdig==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-arm64-musl@0.73.0': - resolution: {integrity: sha512-8YVzH59XSHcqwXNgc5qK851zCqwpmBgOifARXEPPe5/xTsIbHceYoPZAyqfpYV0CfKmzSaEDBgYHFza4rhx+Zw==} + '@oxfmt/binding-linux-arm64-musl@0.74.0': + resolution: {integrity: sha512-nI5FJwZ4Flo6CBdscpwxymZXxO3m3IErQJX55ZS6h+ObfGXu8FostL85L/RWPFaCLnIVE4/WfLw+2q8XvVEeUA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-ppc64-gnu@0.73.0': - resolution: {integrity: sha512-MqRJnmCys0rwOgpWyEidSA7v/bvOqfNDJhPkQoR9mPVYrvSmMaW2Xhdpl28cbTA+brOM1is62GjIvJplVlUVpw==} + '@oxfmt/binding-linux-ppc64-gnu@0.74.0': + resolution: {integrity: sha512-BoQYKuqUdsKAFAkK6DLBvkdv4+t0hppSm79sB0wIcE2o/eOwNj+6Z3OlKY4q3Eta/tlssP65FaS9vHn8TeF7vQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-gnu@0.73.0': - resolution: {integrity: sha512-4t2F3SWJSK/O/kRRFnL0elJzn75fJGGu71gs1HtiWcS80SmJOpkHiwwLnTp9suGdns8VHEPxYS0GTcyVwHKWBA==} + '@oxfmt/binding-linux-riscv64-gnu@0.74.0': + resolution: {integrity: sha512-FSroRrM12+jCdSQklF9aOxsKpI6wFs4ZCo/1cSYG80RWZS6z4LV+l9tXRMT8lDGu+yohIZBwi9M76FzGPFDE2A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-musl@0.73.0': - resolution: {integrity: sha512-D8b4I8I1kLdJQFwdFXNV+cwh3xWSiNKofjdGUk0nDpc0AHOds8T+poGbP9RWQMvgsvMb9OMgp/aV7ahBR37TbQ==} + '@oxfmt/binding-linux-riscv64-musl@0.74.0': + resolution: {integrity: sha512-0VLQD0dhGBLY9Ik/w+otMvD81D0YXi4VDwql65macV+O9UzmSWmUr6CKf+dMtysDeC0PnG3y6kBkRO08BJx52g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-s390x-gnu@0.73.0': - resolution: {integrity: sha512-QrC1S5VL1+N5rvorB15jH7CPvjVHA7GyUI5oVEd8Bd9m5605RDBQYTxDQ920DuylRoZOh2V7/xXpfCtFUrojUQ==} + '@oxfmt/binding-linux-s390x-gnu@0.74.0': + resolution: {integrity: sha512-6X7BbZNz34+OHM6Oqjf6TRcUyRn6aRcB4VtIDZAF/uQRyeVhg+G2hv6MlMvmnRekVSyTJ/8rG/u8W2dRFW6glg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-gnu@0.73.0': - resolution: {integrity: sha512-dFcUKQPltCEPa+YlkF3zqufn6nJPZdG73LpnjBvZFFsU3laCMssDXSYB99mVaj43FqdEgjpz5TO6gbYXcczd9g==} + '@oxfmt/binding-linux-x64-gnu@0.74.0': + resolution: {integrity: sha512-4kYIQK53yJXrxwxSzx8H2bojlf6/KezLGYLRXzV9QCCkoiCsvBTCid9Bg83dUPTLPa3g9K0730f6MKDbck1+OA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-musl@0.73.0': - resolution: {integrity: sha512-LmQe+nV8e+eUwfPNCxDF+owbsg88toBiR/8rZRgVOeKQP3MaGefXZRvBoc1UG37iWEQ/9JlCXG9Mc4nf4N3agw==} + '@oxfmt/binding-linux-x64-musl@0.74.0': + resolution: {integrity: sha512-MfWz4wDREjp/JQDmuxtKieix4FHGa1z5rBvB3betdcPwZvf5fqeQrlCm1mmoyuUVQOh9Pt3M61HwN94kJCxw7Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxfmt/binding-openharmony-arm64@0.73.0': - resolution: {integrity: sha512-8weOr1OKknE0G2DbR6ejJUT9AOsoBU6cXlsetmbihHv1K+bK7qP61T6lJxY0k/aAO7GyOJiRGNlL+04r4eH8Xg==} + '@oxfmt/binding-openharmony-arm64@0.74.0': + resolution: {integrity: sha512-6rmAApkq5s1kbDjvNI6Nl5A+JqQkLORb2sR941pf5HWsrd01WGKyagK/B4vX9+kh1FfvRkNgEu59FHvVk4H8cQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxfmt/binding-win32-arm64-msvc@0.73.0': - resolution: {integrity: sha512-mZV+QxXYgb8E18gzAFItb937VIsE4dqWdStrD3tRRC52UubOYEuU+e7NaIqUsGdB5YsJqNeuck3Ue/af2r9wyA==} + '@oxfmt/binding-win32-arm64-msvc@0.74.0': + resolution: {integrity: sha512-+5SpRUnZNGeXTyumHnpHa791tQtt04qZs076WT8eTcGF2OJ631VLnf7S0kQSPuDG+PtJM0phadEB2WAr5n1w9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/binding-win32-ia32-msvc@0.73.0': - resolution: {integrity: sha512-QJPUsbgUb97ZPPMkFUq6VQq0fLhC4Np19KL9aB/qKVwXnpKE6MIiILXqzhKnQ/UbnEDjKJ7Xv1d6zH4bYPCUdQ==} + '@oxfmt/binding-win32-ia32-msvc@0.74.0': + resolution: {integrity: sha512-1Fg+wYBO3Dsti1QX+/6EYHjeQzLC84tLOAqPu/r7ah3UJlUs9C/DB703Ay9Vcg+8VMzqZA2P5VGhzJraVUD4OQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxfmt/binding-win32-x64-msvc@0.73.0': - resolution: {integrity: sha512-cGcze2fu+ykIaFtkEvZlkZ3HvnCLk+WISthtq99zWTWn0x13t5L9TxvGdLZMUMvtfYR+ICkiCwKnguVubdcw0w==} + '@oxfmt/binding-win32-x64-msvc@0.74.0': + resolution: {integrity: sha512-y9jXUgPBm2TZIWbQhMYRRYAQM57+r4fbykgc+j24ICIIZl+pcuoNhnq1CRGm3oFiHnEUnZO00qOtSPGQdJ2ziQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -7190,8 +7190,8 @@ packages: resolution: {integrity: sha512-sJBRCbS5vh1Jp9EOgwp1Ws3c16lJrUkJYlvWTYC03oyiYVwS/ns7lKRWow4w4XjDyTrA2pplQv4B2naWSR6yDA==} engines: {node: '>=14.16'} - oxfmt@0.73.0: - resolution: {integrity: sha512-Ke4xbpuzqIBP4bkd48q815RhqWNJqOBzxVA9199M4qcF0y0LtpUv7UTg1dJ5ea6jw0RBUDZvX3qOUMNmmxfxbw==} + oxfmt@0.74.0: + resolution: {integrity: sha512-G4OP7FgwGYZR5ttRpCOOfJdyRsSyvtn34vSXnjDq6Oqed5Dufg5mB44mank+51nAdHOKuTJ0lj0mksY7L+N61A==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -13074,61 +13074,61 @@ snapshots: '@oxc-project/types@0.150.0': {} - '@oxfmt/binding-android-arm-eabi@0.73.0': + '@oxfmt/binding-android-arm-eabi@0.74.0': optional: true - '@oxfmt/binding-android-arm64@0.73.0': + '@oxfmt/binding-android-arm64@0.74.0': optional: true - '@oxfmt/binding-darwin-arm64@0.73.0': + '@oxfmt/binding-darwin-arm64@0.74.0': optional: true - '@oxfmt/binding-darwin-x64@0.73.0': + '@oxfmt/binding-darwin-x64@0.74.0': optional: true - '@oxfmt/binding-freebsd-x64@0.73.0': + '@oxfmt/binding-freebsd-x64@0.74.0': optional: true - '@oxfmt/binding-linux-arm-gnueabihf@0.73.0': + '@oxfmt/binding-linux-arm-gnueabihf@0.74.0': optional: true - '@oxfmt/binding-linux-arm-musleabihf@0.73.0': + '@oxfmt/binding-linux-arm-musleabihf@0.74.0': optional: true - '@oxfmt/binding-linux-arm64-gnu@0.73.0': + '@oxfmt/binding-linux-arm64-gnu@0.74.0': optional: true - '@oxfmt/binding-linux-arm64-musl@0.73.0': + '@oxfmt/binding-linux-arm64-musl@0.74.0': optional: true - '@oxfmt/binding-linux-ppc64-gnu@0.73.0': + '@oxfmt/binding-linux-ppc64-gnu@0.74.0': optional: true - '@oxfmt/binding-linux-riscv64-gnu@0.73.0': + '@oxfmt/binding-linux-riscv64-gnu@0.74.0': optional: true - '@oxfmt/binding-linux-riscv64-musl@0.73.0': + '@oxfmt/binding-linux-riscv64-musl@0.74.0': optional: true - '@oxfmt/binding-linux-s390x-gnu@0.73.0': + '@oxfmt/binding-linux-s390x-gnu@0.74.0': optional: true - '@oxfmt/binding-linux-x64-gnu@0.73.0': + '@oxfmt/binding-linux-x64-gnu@0.74.0': optional: true - '@oxfmt/binding-linux-x64-musl@0.73.0': + '@oxfmt/binding-linux-x64-musl@0.74.0': optional: true - '@oxfmt/binding-openharmony-arm64@0.73.0': + '@oxfmt/binding-openharmony-arm64@0.74.0': optional: true - '@oxfmt/binding-win32-arm64-msvc@0.73.0': + '@oxfmt/binding-win32-arm64-msvc@0.74.0': optional: true - '@oxfmt/binding-win32-ia32-msvc@0.73.0': + '@oxfmt/binding-win32-ia32-msvc@0.74.0': optional: true - '@oxfmt/binding-win32-x64-msvc@0.73.0': + '@oxfmt/binding-win32-x64-msvc@0.74.0': optional: true '@oxlint-tsgolint/darwin-arm64@0.22.1': @@ -17663,29 +17663,29 @@ snapshots: lodash.isequal: 4.5.0 vali-date: 1.0.0 - oxfmt@0.73.0: + oxfmt@0.74.0: dependencies: tinypool: 2.2.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.73.0 - '@oxfmt/binding-android-arm64': 0.73.0 - '@oxfmt/binding-darwin-arm64': 0.73.0 - '@oxfmt/binding-darwin-x64': 0.73.0 - '@oxfmt/binding-freebsd-x64': 0.73.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.73.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.73.0 - '@oxfmt/binding-linux-arm64-gnu': 0.73.0 - '@oxfmt/binding-linux-arm64-musl': 0.73.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.73.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.73.0 - '@oxfmt/binding-linux-riscv64-musl': 0.73.0 - '@oxfmt/binding-linux-s390x-gnu': 0.73.0 - '@oxfmt/binding-linux-x64-gnu': 0.73.0 - '@oxfmt/binding-linux-x64-musl': 0.73.0 - '@oxfmt/binding-openharmony-arm64': 0.73.0 - '@oxfmt/binding-win32-arm64-msvc': 0.73.0 - '@oxfmt/binding-win32-ia32-msvc': 0.73.0 - '@oxfmt/binding-win32-x64-msvc': 0.73.0 + '@oxfmt/binding-android-arm-eabi': 0.74.0 + '@oxfmt/binding-android-arm64': 0.74.0 + '@oxfmt/binding-darwin-arm64': 0.74.0 + '@oxfmt/binding-darwin-x64': 0.74.0 + '@oxfmt/binding-freebsd-x64': 0.74.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.74.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.74.0 + '@oxfmt/binding-linux-arm64-gnu': 0.74.0 + '@oxfmt/binding-linux-arm64-musl': 0.74.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.74.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.74.0 + '@oxfmt/binding-linux-riscv64-musl': 0.74.0 + '@oxfmt/binding-linux-s390x-gnu': 0.74.0 + '@oxfmt/binding-linux-x64-gnu': 0.74.0 + '@oxfmt/binding-linux-x64-musl': 0.74.0 + '@oxfmt/binding-openharmony-arm64': 0.74.0 + '@oxfmt/binding-win32-arm64-msvc': 0.74.0 + '@oxfmt/binding-win32-ia32-msvc': 0.74.0 + '@oxfmt/binding-win32-x64-msvc': 0.74.0 oxlint-tsgolint@0.22.1: optionalDependencies: diff --git a/scripts/documentation-renderer/doc-building.ts b/scripts/documentation-renderer/doc-building.ts index c5180882e..6ac8b935e 100644 --- a/scripts/documentation-renderer/doc-building.ts +++ b/scripts/documentation-renderer/doc-building.ts @@ -48,7 +48,9 @@ export async function renderDocs(categories: Record { if (!this.flags.silent) { const url = consoleRunUrl(actorId, yieldedRun.id); - const message: string[] = [`${chalk.yellow('Started')}: ${TimestampFormatter.display(yieldedRun.startedAt)}`]; + const message: string[] = [ + `${chalk.yellow('Started')}: ${TimestampFormatter.display(yieldedRun.startedAt)}`, + ]; // container url if (yieldedRun.containerUrl) { @@ -215,7 +217,9 @@ export class ActorsCallCommand extends ApifyCommand { message.push(messageParts.join(' ')); // timeout - message.push(`${chalk.yellow('Timeout')}: ${run.options.timeoutSecs.toLocaleString('en-US')} seconds`); + message.push( + `${chalk.yellow('Timeout')}: ${run.options.timeoutSecs.toLocaleString('en-US')} seconds`, + ); // memory limit message.push(`${chalk.yellow('Memory')}: ${run.options.memoryMbytes} MB`); diff --git a/src/commands/actors/ls.ts b/src/commands/actors/ls.ts index 8ecaacaa7..3e0ded5d5 100644 --- a/src/commands/actors/ls.ts +++ b/src/commands/actors/ls.ts @@ -241,7 +241,8 @@ export class ActorsLsCommand extends ApifyCommand { (item.actor.taggedBuilds ?? {}) as Record, ).find( ([tag, data]) => - data.buildNumber === item.actor!.defaultRunOptions.build || tag === item.actor!.defaultRunOptions.build, + data.buildNumber === item.actor!.defaultRunOptions.build || + tag === item.actor!.defaultRunOptions.build, ); if (buildVersionToTag) { @@ -268,7 +269,10 @@ export class ActorsLsCommand extends ApifyCommand { if (diff < Time.Week) { stringParts.push('\n', chalk.gray(`${ShortDurationFormatter.format(diff)} ago`)); } else { - stringParts.push('\n', chalk.gray('On', DateOnlyTimestampFormatter.display(item.lastRun.finishedAt))); + stringParts.push( + '\n', + chalk.gray('On', DateOnlyTimestampFormatter.display(item.lastRun.finishedAt)), + ); } } diff --git a/src/commands/actors/push.ts b/src/commands/actors/push.ts index 8c690bb53..28883af7b 100644 --- a/src/commands/actors/push.ts +++ b/src/commands/actors/push.ts @@ -108,7 +108,12 @@ export function resolvePushOutcome(buildStatus: string): PushOutcome { errorMessage: 'Build timed out', }; case ACTOR_JOB_STATUSES.FAILED: - return { resultLabel: 'FAILED', exitCode: CommandExitCodes.BuildFailed, ok: false, errorMessage: 'Build failed' }; + return { + resultLabel: 'FAILED', + exitCode: CommandExitCodes.BuildFailed, + ok: false, + errorMessage: 'Build failed', + }; default: return { resultLabel: 'UNKNOWN', @@ -217,7 +222,8 @@ export class ActorsPushCommand extends ApifyCommand { required: false, }), 'allow-missing-secrets': Flags.boolean({ - description: 'Allow the command to continue even when secret values are not found in the local secrets storage.', + description: + 'Allow the command to continue even when secret values are not found in the local secrets storage.', required: false, default: false, }), @@ -293,7 +299,8 @@ export class ActorsPushCommand extends ApifyCommand { let isActorCreatedNow = false; // User can override Actor version and build tag, attributes in localConfig will remain same. - const version = this.flags.version || (actorConfig?.version as string | undefined) || DEFAULT_ACTOR_VERSION_NUMBER; + const version = + this.flags.version || (actorConfig?.version as string | undefined) || DEFAULT_ACTOR_VERSION_NUMBER; let buildTag = this.flags.buildTag || (actorConfig?.buildTag as string | undefined); @@ -323,7 +330,8 @@ export class ActorsPushCommand extends ApifyCommand { } else { const { templates } = await fetchManifest(); const actorTemplate = templates.find((t) => t.name === actorConfig!.template); - const defaultRunOptions = (actorTemplate?.defaultRunOptions || DEFAULT_RUN_OPTIONS) as ActorDefaultRunOptions; + const defaultRunOptions = (actorTemplate?.defaultRunOptions || + DEFAULT_RUN_OPTIONS) as ActorDefaultRunOptions; const newActor: ActorCollectionCreateOptions = { name: actorConfig!.name as string, title: actorConfig!.title as string | undefined, @@ -462,7 +470,14 @@ Skipping push. Use --force to override.`, this.flags.applyEnvVarsToBuild ?? (actorConfig!.applyEnvVarsToBuild as boolean | undefined); if (actorCurrentVersion) { - const actorVersionModifier = { tarballUrl, sourceFiles, buildTag, sourceType, envVars, applyEnvVarsToBuild }; + const actorVersionModifier = { + tarballUrl, + sourceFiles, + buildTag, + sourceType, + envVars, + applyEnvVarsToBuild, + }; // TODO: fix this type too -.- await actorClient.version(version).update(actorVersionModifier as never); run({ message: `Updated version ${version} for Actor ${actor.name}.` }); diff --git a/src/commands/api.ts b/src/commands/api.ts index b35a2afe9..2f366027e 100644 --- a/src/commands/api.ts +++ b/src/commands/api.ts @@ -463,7 +463,9 @@ async function fetchEndpoints(): Promise { try { response = await fetch(OPENAPI_SPEC_URL); } catch (err) { - throw new Error(`Failed to download the Apify OpenAPI spec from ${OPENAPI_SPEC_URL}: ${(err as Error).message}`); + throw new Error( + `Failed to download the Apify OpenAPI spec from ${OPENAPI_SPEC_URL}: ${(err as Error).message}`, + ); } if (!response.ok) { diff --git a/src/commands/auth/login.ts b/src/commands/auth/login.ts index c0151d707..5774c6b46 100644 --- a/src/commands/auth/login.ts +++ b/src/commands/auth/login.ts @@ -289,7 +289,9 @@ export class AuthLoginCommand extends ApifyCommand { const result = await loginWithToken(tokens.access_token, getApiBaseUrlForLogin()); if (!result) { - error({ message: 'Login to Apify failed, the token issued by Apify Console was not accepted by the Apify API.' }); + error({ + message: 'Login to Apify failed, the token issued by Apify Console was not accepted by the Apify API.', + }); process.exitCode = CommandExitCodes.MissingAuth; return; } diff --git a/src/commands/builds/create.ts b/src/commands/builds/create.ts index 6a408b53f..b4135d54b 100644 --- a/src/commands/builds/create.ts +++ b/src/commands/builds/create.ts @@ -53,7 +53,8 @@ export class BuildsCreateCommand extends ApifyCommand actorVersion.buildTag ?? 'latest'); + const versionsByBuildTag = objectGroupBy( + actorInfo.versions, + (actorVersion) => actorVersion.buildTag ?? 'latest', + ); const taggedVersions = versionsByBuildTag[tag ?? 'latest']; const specificVersionExists = actorInfo.versions.find((v) => v.versionNumber === version); diff --git a/src/commands/builds/info.ts b/src/commands/builds/info.ts index 307183152..598f8811f 100644 --- a/src/commands/builds/info.ts +++ b/src/commands/builds/info.ts @@ -87,7 +87,9 @@ export class BuildsInfoCommand extends ApifyCommand { ); } else { const diff = Date.now() - build.startedAt.getTime(); - message.push(` ${chalk.yellow('Finished')}: ${chalk.gray(`Running for ${DurationFormatter.format(diff)}`)}`); + message.push( + ` ${chalk.yellow('Finished')}: ${chalk.gray(`Running for ${DurationFormatter.format(diff)}`)}`, + ); } if (build.stats?.computeUnits) { diff --git a/src/commands/create.ts b/src/commands/create.ts index 8abce12b5..22844802c 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -266,7 +266,10 @@ export class CreateCommand extends ApifyCommand { }; if (!templateArchiveUrl) { - const templateDefinition = await getTemplateDefinition(templateName, manifestPromise, { useCase, language }); + const templateDefinition = await getTemplateDefinition(templateName, manifestPromise, { + useCase, + language, + }); ({ archiveUrl: templateArchiveUrl, messages } = templateDefinition); templateId = templateDefinition.id; this.telemetryData.create.templateId = templateDefinition.id; @@ -303,12 +306,16 @@ export class CreateCommand extends ApifyCommand { // Catches a non-interactive run that named a repository but omitted --source, which would // otherwise silently take the Apify path. if (!gitProvider && gitRepo) { - throw new Error('--git-repo only applies to a Git source, so add --source github|gitlab|bitbucket or drop it.'); + throw new Error( + '--git-repo only applies to a Git source, so add --source github|gitlab|bitbucket or drop it.', + ); } // Only a Git source has a repository to rebuild from, so an Apify-sourced run would ignore this. if (!gitProvider && this.flags.autoBuild) { - throw new Error('--auto-build only applies to a Git source, so add --source github|gitlab|bitbucket or drop it.'); + throw new Error( + '--auto-build only applies to a Git source, so add --source github|gitlab|bitbucket or drop it.', + ); } // The platform only accepts archive URLs listed in the official manifest. @@ -381,7 +388,8 @@ export class CreateCommand extends ApifyCommand { // environment, dependencies, and Python version. Install them with `uv sync` instead of the // pip + requirements.txt flow. uv provides the Python pinned in `.python-version` on its own, // so this runs even when no system Python is detected. - const isPythonProject = project.type === ProjectLanguage.Python || project.type === ProjectLanguage.Scrapy; + const isPythonProject = + project.type === ProjectLanguage.Python || project.type === ProjectLanguage.Scrapy; if (isPythonProject && project.packageManager === 'uv') { const uvPath = await which('uv', { nothrow: true }); @@ -533,7 +541,15 @@ export class CreateCommand extends ApifyCommand { await execWithLog({ cmd: runtime.executablePath, - args: ['-m', 'pip', 'install', '--no-cache-dir', '--no-warn-script-location', '-r', 'requirements.txt'], + args: [ + '-m', + 'pip', + 'install', + '--no-cache-dir', + '--no-warn-script-location', + '-r', + 'requirements.txt', + ], opts: { cwd: actFolderDir }, }); @@ -568,7 +584,9 @@ export class CreateCommand extends ApifyCommand { } // Suggest install command if dependencies were not installed - const installCommandSuggestion = !dependenciesInstalled ? await getInstallCommandSuggestion(actFolderDir) : null; + const installCommandSuggestion = !dependenciesInstalled + ? await getInstallCommandSuggestion(actFolderDir) + : null; // The Git path's clone makes it a repository too, not only `git init`. const gitRepositoryInitialized = (gitInitAttempted && gitInitResult.success) || Boolean(actorDirHasGit); diff --git a/src/commands/datasets/get-items.ts b/src/commands/datasets/get-items.ts index e70570451..63fcf6b61 100644 --- a/src/commands/datasets/get-items.ts +++ b/src/commands/datasets/get-items.ts @@ -42,7 +42,8 @@ export class DatasetsGetItems extends ApifyCommand { static override flags = { limit: Flags.integer({ - description: 'The amount of elements to get from the dataset. By default, it will return all available items.', + description: + 'The amount of elements to get from the dataset. By default, it will return all available items.', }), offset: Flags.integer({ description: 'The offset in the dataset where to start getting items.', diff --git a/src/commands/datasets/info.ts b/src/commands/datasets/info.ts index 7150b4b28..2c12d2ddb 100644 --- a/src/commands/datasets/info.ts +++ b/src/commands/datasets/info.ts @@ -102,7 +102,8 @@ export class DatasetsInfoCommand extends ApifyCommand { if (closestMatches.length) { message += '\n '; - message += chalk.gray(`Did you mean: ${closestMatches.map((cmd) => chalk.whiteBright(cmd)).join(', ')}?`); + message += chalk.gray( + `Did you mean: ${closestMatches.map((cmd) => chalk.whiteBright(cmd)).join(', ')}?`, + ); } error({ diff --git a/src/commands/key-value-stores/get-value.ts b/src/commands/key-value-stores/get-value.ts index 7afdbaa32..cd9f1e933 100644 --- a/src/commands/key-value-stores/get-value.ts +++ b/src/commands/key-value-stores/get-value.ts @@ -10,7 +10,8 @@ export class KeyValueStoresGetValueCommand extends ApifyCommand { exclusive: ['resurrect'], }), resurrect: Flags.boolean({ - description: 'Whether to keep the default request queue, dataset and key-value store before the run starts.', + description: + 'Whether to keep the default request queue, dataset and key-value store before the run starts.', required: false, default: false, exclusive: ['purge'], @@ -180,7 +181,8 @@ export class RunCommand extends ApifyCommand { exclusive: ['input'], }), 'allow-missing-secrets': Flags.boolean({ - description: 'Allow the command to continue even when secret values are not found in the local secrets storage.', + description: + 'Allow the command to continue even when secret values are not found in the local secrets storage.', required: false, default: false, }), @@ -329,7 +331,11 @@ export class RunCommand extends ApifyCommand { CRAWLEE_PURGE_ON_START = '1'; if (crawleeVersion.isNone()) { - await Promise.all([purgeDefaultQueue(), purgeDefaultKeyValueStore(resolvedInputKey), purgeDefaultDataset()]); + await Promise.all([ + purgeDefaultQueue(), + purgeDefaultKeyValueStore(resolvedInputKey), + purgeDefaultDataset(), + ]); info({ message: 'All default local stores were purged.' }); } } @@ -389,9 +395,13 @@ export class RunCommand extends ApifyCommand { if (userId) localEnvVars[APIFY_ENV_VARS.USER_ID] = userId; if (token) localEnvVars[APIFY_ENV_VARS.TOKEN] = token; if (localConfig!.environmentVariables) { - const updatedEnv = replaceSecretsValue(localConfig!.environmentVariables as Record, undefined, { - allowMissing: this.flags.allowMissingSecrets, - }); + const updatedEnv = replaceSecretsValue( + localConfig!.environmentVariables as Record, + undefined, + { + allowMissing: this.flags.allowMissingSecrets, + }, + ); Object.assign(localEnvVars, updatedEnv); } @@ -593,10 +603,12 @@ export class RunCommand extends ApifyCommand { switch (inputOverride?.source) { case 'stdin': - errorHeader = 'The input provided through standard input is invalid. Please fix the following errors:\n'; + errorHeader = + 'The input provided through standard input is invalid. Please fix the following errors:\n'; break; case 'input': - errorHeader = 'The input provided through the --input flag is invalid. Please fix the following errors:\n'; + errorHeader = + 'The input provided through the --input flag is invalid. Please fix the following errors:\n'; break; default: if (inputOverride) { diff --git a/src/commands/runs/info.ts b/src/commands/runs/info.ts index 12b4eefd0..04d0e377c 100644 --- a/src/commands/runs/info.ts +++ b/src/commands/runs/info.ts @@ -183,7 +183,9 @@ export class RunsInfoCommand extends ApifyCommand { ); } else { const diff = Date.now() - run.startedAt.getTime(); - message.push(`${chalk.yellow('Finished')}: ${chalk.gray(`Running for ${ShortDurationFormatter.format(diff)}`)}`); + message.push( + `${chalk.yellow('Finished')}: ${chalk.gray(`Running for ${ShortDurationFormatter.format(diff)}`)}`, + ); } // Separator @@ -213,9 +215,9 @@ export class RunsInfoCommand extends ApifyCommand { const actorVersion = actor.versions.find((item) => item.versionNumber === expectedActorVersion); - const runVersionTaggedAs = Object.entries((actor.taggedBuilds ?? {}) as Record).find( - ([, data]) => data.buildNumber === run.buildNumber, - )?.[0]; + const runVersionTaggedAs = Object.entries( + (actor.taggedBuilds ?? {}) as Record, + ).find(([, data]) => data.buildNumber === run.buildNumber)?.[0]; const messageParts = [`${chalk.yellow('Build')}:`, chalk.cyan(run.buildNumber)]; diff --git a/src/commands/validate-schema.ts b/src/commands/validate-schema.ts index 4940f197a..e07c5d422 100644 --- a/src/commands/validate-schema.ts +++ b/src/commands/validate-schema.ts @@ -120,7 +120,8 @@ When no path is provided, validates all schemas found in '${LOCAL_CONFIG_PATH}': }, { label: 'Key-Value Store', - read: () => readStorageSchema({ cwd, key: 'keyValueStore', label: 'Key-Value Store', throwOnMissing: true }), + read: () => + readStorageSchema({ cwd, key: 'keyValueStore', label: 'Key-Value Store', throwOnMissing: true }), validate: validateKvsSchema, }, ]; @@ -132,7 +133,9 @@ When no path is provided, validates all schemas found in '${LOCAL_CONFIG_PATH}': if (result) { foundAny = true; - const location = result.schemaPath ? `at ${result.schemaPath}` : `embedded in '${LOCAL_CONFIG_PATH}'`; + const location = result.schemaPath + ? `at ${result.schemaPath}` + : `embedded in '${LOCAL_CONFIG_PATH}'`; info({ message: `Validating ${label} schema ${location}` }); validate(result.schema); @@ -146,7 +149,9 @@ When no path is provided, validates all schemas found in '${LOCAL_CONFIG_PATH}': } if (!foundAny) { - throw new Error(`No schemas found. Make sure '${LOCAL_CONFIG_PATH}' exists and defines at least one schema.`); + throw new Error( + `No schemas found. Make sure '${LOCAL_CONFIG_PATH}' exists and defines at least one schema.`, + ); } if (hasErrors) { diff --git a/src/lib/command-framework/CommandError.ts b/src/lib/command-framework/CommandError.ts index 1c8e55a44..e012c6ce4 100644 --- a/src/lib/command-framework/CommandError.ts +++ b/src/lib/command-framework/CommandError.ts @@ -82,14 +82,18 @@ export class CommandError extends Error { name: match.groups!.flagName, expectsValue: match.groups!.noArg === undefined, ambiguousFlag: match.groups!.ambiguous ? match.groups!.ambiguous : undefined, - ambiguousMessage: match.groups!.ambiguousMessage ? match.groups!.ambiguousMessage.trim() : undefined, + ambiguousMessage: match.groups!.ambiguousMessage + ? match.groups!.ambiguousMessage.trim() + : undefined, }; return flagData; } case CommandErrorCode.NODEJS_ERR_PARSE_ARGS_UNKNOWN_OPTION: { - const match = /Unknown option '-(?-)?(?.+)'\.(?.*)/gi.exec(this.message); + const match = /Unknown option '-(?-)?(?.+)'\.(?.*)/gi.exec( + this.message, + ); if (!match) { throw new Error( @@ -130,7 +134,9 @@ export class CommandError extends Error { chalk.gray( `Unknown flag provided: ${chalk.white.bold(flagData.shortForm ? `-${flagData.name}` : `--${flagData.name}`)}`, ), - flagData.unknownOptionSuggestion ? chalk.gray(` ${flagData.unknownOptionSuggestion.trim()}`) : null, + flagData.unknownOptionSuggestion + ? chalk.gray(` ${flagData.unknownOptionSuggestion.trim()}`) + : null, '', helpMessage, ] @@ -184,7 +190,9 @@ export class CommandError extends Error { for (const [a, b] of flagPairs) { messageParts.push( - chalk.gray(`${redArrow}${chalk.white.bold(a)} cannot also be provided when using ${chalk.white.bold(b)}`), + chalk.gray( + `${redArrow}${chalk.white.bold(a)} cannot also be provided when using ${chalk.white.bold(b)}`, + ), ); } diff --git a/src/lib/command-framework/apify-command.ts b/src/lib/command-framework/apify-command.ts index f6b94f60e..69660a70f 100644 --- a/src/lib/command-framework/apify-command.ts +++ b/src/lib/command-framework/apify-command.ts @@ -500,7 +500,9 @@ export abstract class ApifyCommand token.kind === 'option' && token.name === baseFlagName); + const usedShortFormOfTheFlag = rawTokens.some( + (token) => token.kind === 'option' && token.name === baseFlagName, + ); if (builderData.exclusive?.length) { const existingExclusiveFlags = exclusiveFlagMap.get(baseFlagName) ?? new Set(); @@ -848,14 +850,20 @@ export abstract class ApifyCommand