Skip to content

Commit

Permalink
Prepare reset of yargs
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Jan 29, 2025
1 parent eebe869 commit 7d9e8de
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Piral Changelog

## 1.8.2 (tbd)

- Fixed issue with command line parsing in the `piral-cli` on Windows

## 1.8.1 (January 27, 2025)

- Fixed build issue in `publish-microfrontend`
Expand Down
2 changes: 1 addition & 1 deletion src/tooling/piral-cli-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/mini-css-extract-plugin": "^2",
"@types/node": "^18",
"@types/terser-webpack-plugin": "^5.2.0",
"@types/yargs": "^17",
"@types/yargs": "^15",
"piral-cli": "^1.8.1",
"strip-ansi": "^6"
},
Expand Down
8 changes: 4 additions & 4 deletions src/tooling/piral-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@types/mime": "^4",
"@types/node": "^18",
"@types/rc": "^1",
"@types/yargs": "^17",
"@types/yargs": "^15",
"axios": "^1",
"chalk": "^5",
"enhanced-resolve": "^5",
Expand All @@ -68,14 +68,14 @@
"ora": "^8",
"rc": "^1",
"rimraf": "^6",
"tar": "^7"
"tar": "^7",
"yargs": "^15"
},
"dependencies": {
"css-conflict-inspector": "^0.2",
"dets": "^0.16.7",
"kras": "^1",
"open": "^10",
"typescript": "^5",
"yargs": "^17"
"typescript": "^5"
}
}
3 changes: 1 addition & 2 deletions src/tooling/piral-cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import yargs from 'yargs';
import { detailed } from 'yargs-parser';
import { caterpillerIcon, zapIcon, butterflyIcon, cliName, cliVersion } from './common';
import { runQuestionnaireFor } from './questionnaire';
import { yargs, detailed } from './external';
import { ToolCommand } from './types';

let argv = yargs;
Expand Down
4 changes: 4 additions & 0 deletions src/tooling/piral-cli/src/external/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as jju from 'jju';
import * as tar from 'tar';
import yargs from 'yargs';
import { detailed } from 'yargs-parser';
import glob from 'glob';
import FormData from 'form-data';
import rc = require('rc');
Expand Down Expand Up @@ -34,4 +36,6 @@ export {
getPort,
jju,
getModulePath,
yargs,
detailed,
};
4 changes: 2 additions & 2 deletions src/tooling/piral-cli/src/types/public.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Argv, Arguments } from 'yargs';
import { RuleRunner, PiletRuleContext, PiralRuleContext, LogLevels, SharedDependency } from './common';
import type { Argv, Arguments } from 'yargs';
import type { RuleRunner, PiletRuleContext, PiralRuleContext, LogLevels, SharedDependency } from './common';

export type FlagType = 'string' | 'number' | 'boolean' | 'object';

Expand Down
4 changes: 2 additions & 2 deletions src/tooling/publish-microfrontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@types/mime": "^4",
"@types/node": "^18",
"@types/rc": "^1",
"@types/yargs": "^17",
"@types/yargs": "^15",
"axios": "^1.7.7",
"chalk": "^5",
"enhanced-resolve": "^5",
Expand All @@ -66,6 +66,6 @@
"rimraf": "^6",
"tar": "^7",
"typescript": "^5",
"yargs": "^17"
"yargs": "^15"
}
}
5 changes: 2 additions & 3 deletions src/tooling/publish-microfrontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const defaultArgs = rc('microfrontend', {
interactive: false,
});

const y = yargs(process.argv.slice(2), current)
const args = yargs
.string('source')
.describe('source', 'Sets the source of either the previously packed *.tgz bundle or the directory to publish.')
.default('source', current)
Expand Down Expand Up @@ -53,10 +53,9 @@ const y = yargs(process.argv.slice(2), current)
.default('headers', defaultArgs.headers)
.boolean('interactive')
.describe('interactive', 'Defines if authorization tokens can be retrieved interactively.')
.default('interactive', defaultArgs.interactive);
.default('interactive', defaultArgs.interactive).argv;

async function run() {
const args = await y.argv;
const {
cert,
source,
Expand Down
63 changes: 56 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3898,10 +3898,10 @@
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.1.tgz#07773d7160494d56aa882d7531aac7319ea67c3b"
integrity sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==

"@types/yargs@^17":
version "17.0.33"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d"
integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==
"@types/yargs@^15":
version "15.0.19"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.19.tgz#328fb89e46109ecbdb70c295d96ff2f46dfd01b9"
integrity sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==
dependencies:
"@types/yargs-parser" "*"

Expand Down Expand Up @@ -5323,7 +5323,7 @@ camelcase-keys@^6.2.2:
map-obj "^4.0.0"
quick-lru "^4.0.1"

camelcase@^5.3.1:
camelcase@^5.0.0, camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
Expand Down Expand Up @@ -5570,6 +5570,15 @@ cli-width@^4.1.0:
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5"
integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==

cliui@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"

cliui@^7.0.2:
version "7.0.4"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
Expand Down Expand Up @@ -6140,7 +6149,7 @@ decamelize-keys@^1.1.0:
decamelize "^1.1.0"
map-obj "^1.0.0"

decamelize@^1.1.0:
decamelize@^1.1.0, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==
Expand Down Expand Up @@ -7350,7 +7359,7 @@ gensync@^1.0.0-beta.2:
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==

get-caller-file@^2.0.5:
get-caller-file@^2.0.1, get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
Expand Down Expand Up @@ -11498,6 +11507,11 @@ require-from-string@^2.0.2:
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==

require-main-filename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==

requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
Expand Down Expand Up @@ -13301,6 +13315,11 @@ which-collection@^1.0.1:
is-weakmap "^2.0.1"
is-weakset "^2.0.1"

which-module@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409"
integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==

which-typed-array@^1.1.11, which-typed-array@^1.1.13:
version "1.1.13"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36"
Expand Down Expand Up @@ -13482,6 +13501,11 @@ xtend@~4.0.1:
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==

y18n@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf"
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==

y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
Expand Down Expand Up @@ -13517,6 +13541,14 @@ [email protected], yargs-parser@^21.1.1:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==

yargs-parser@^18.1.2:
version "18.1.3"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
dependencies:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^20.2.2, yargs-parser@^20.2.3:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
Expand All @@ -13535,6 +13567,23 @@ [email protected], yargs@^17, yargs@^17.2.1, yargs@^17.6.2:
y18n "^5.0.5"
yargs-parser "^21.1.1"

yargs@^15:
version "15.4.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
dependencies:
cliui "^6.0.0"
decamelize "^1.2.0"
find-up "^4.1.0"
get-caller-file "^2.0.1"
require-directory "^2.1.1"
require-main-filename "^2.0.0"
set-blocking "^2.0.0"
string-width "^4.2.0"
which-module "^2.0.0"
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
Expand Down

0 comments on commit 7d9e8de

Please sign in to comment.