# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit bash-completion-r1 yarn

DESCRIPTION="CLI tool for running Yeoman generators"
HOMEPAGE="https://yeoman.io/"
YARN_PKGS=(
	@babel/code-frame-7.27.1
	@babel/helper-validator-identifier-7.28.5
	@babel/runtime-7.28.4
	@inquirer/ansi-1.0.2
	@inquirer/checkbox-4.3.2
	@inquirer/confirm-5.1.21
	@inquirer/core-10.3.2
	@inquirer/editor-4.2.23
	@inquirer/expand-4.0.23
	@inquirer/external-editor-1.0.3
	@inquirer/figures-1.0.15
	@inquirer/input-4.3.1
	@inquirer/number-3.0.23
	@inquirer/password-4.0.23
	@inquirer/prompts-7.10.1
	@inquirer/rawlist-4.1.11
	@inquirer/search-3.2.2
	@inquirer/select-4.4.2
	@inquirer/type-3.0.10
	@isaacs/balanced-match-4.0.1
	@isaacs/brace-expansion-5.0.0
	@isaacs/fs-minipass-4.0.1
	@isaacs/string-locale-compare-1.1.0
	@kwsites/file-exists-1.1.1
	@kwsites/promise-deferred-1.1.1
	@nodelib/fs.scandir-2.1.5
	@nodelib/fs.stat-2.0.5
	@nodelib/fs.walk-1.2.8
	@npmcli/agent-4.0.0
	@npmcli/arborist-9.1.9
	@npmcli/fs-5.0.0
	@npmcli/git-7.0.1
	@npmcli/installed-package-contents-4.0.0
	@npmcli/map-workspaces-5.0.3
	@npmcli/metavuln-calculator-9.0.3
	@npmcli/name-from-folder-4.0.0
	@npmcli/node-gyp-5.0.0
	@npmcli/package-json-7.0.4
	@npmcli/promise-spawn-9.0.1
	@npmcli/query-5.0.0
	@npmcli/redact-4.0.0
	@npmcli/run-script-10.0.3
	@octokit/auth-token-5.1.2
	@octokit/core-6.1.6
	@octokit/endpoint-10.1.4
	@octokit/graphql-8.2.2
	@octokit/openapi-types-24.2.0
	@octokit/openapi-types-25.1.0
	@octokit/plugin-paginate-rest-11.6.0
	@octokit/plugin-request-log-5.3.1
	@octokit/plugin-rest-endpoint-methods-13.5.0
	@octokit/request-9.2.4
	@octokit/request-error-6.1.8
	@octokit/rest-21.1.1
	@octokit/types-13.10.0
	@octokit/types-14.1.0
	@pnpm/config.env-replace-1.1.0
	@pnpm/network.ca-file-1.0.2
	@pnpm/npm-conf-2.3.1
	@sec-ant/readable-stream-0.4.1
	@sigstore/bundle-4.0.0
	@sigstore/core-3.1.0
	@sigstore/protobuf-specs-0.5.0
	@sigstore/sign-4.1.0
	@sigstore/tuf-4.0.1
	@sigstore/verify-3.1.0
	@sindresorhus/merge-streams-2.3.0
	@sindresorhus/merge-streams-4.0.0
	@tufjs/canonical-json-2.0.0
	@tufjs/models-4.1.0
	@types/ejs-3.1.5
	@types/expect-1.20.4
	@types/lodash-4.17.21
	@types/lodash-es-4.17.12
	@types/node-25.0.3
	@types/normalize-package-data-2.4.4
	@types/vinyl-2.0.12
	@yeoman/adapter-3.1.1
	@yeoman/conflicter-4.0.0
	@yeoman/namespace-1.0.1
	@yeoman/transform-2.1.0
	@yeoman/types-1.9.1
	abbrev-4.0.0
	agent-base-7.1.4
	aggregate-error-4.0.1
	ansi-align-3.0.1
	ansi-regex-5.0.1
	ansi-regex-6.2.2
	ansi-styles-4.3.0
	ansi-styles-6.2.3
	array-differ-4.0.0
	array-union-3.0.1
	arrify-3.0.0
	async-3.2.6
	atomically-2.1.0
	b4a-1.7.3
	balanced-match-1.0.2
	bare-events-2.8.2
	before-after-hook-3.0.2
	bin-links-6.0.0
	binary-extensions-3.1.0
	binary-version-7.1.0
	binary-version-check-6.1.0
	binaryextensions-6.11.0
	boolean-3.2.0
	boxen-8.0.1
	brace-expansion-1.1.12
	brace-expansion-2.0.2
	braces-3.0.3
	bundle-name-4.1.0
	cacache-20.0.3
	camelcase-8.0.0
	chalk-4.1.2
	chalk-5.6.2
	chardet-2.1.1
	chownr-3.0.0
	clean-stack-4.2.0
	cli-boxes-3.0.0
	cli-cursor-5.0.0
	cli-list-1.0.0
	cli-spinners-3.3.0
	cli-table-0.3.11
	cli-width-4.1.0
	clone-2.1.2
	clone-regexp-3.0.0
	cmd-shim-8.0.0
	color-convert-2.0.1
	color-name-1.1.4
	colors-1.0.3
	commander-14.0.2
	common-ancestor-path-1.0.1
	commondir-1.0.1
	concat-map-0.0.1
	config-chain-1.1.13
	configstore-7.1.0
	convert-hrtime-5.0.0
	cross-spawn-7.0.6
	cssesc-3.0.0
	dateformat-5.0.3
	debug-4.4.3
	decamelize-6.0.1
	deep-extend-0.6.0
	default-browser-5.4.0
	default-browser-id-5.0.1
	default-uid-2.0.0
	define-data-property-1.1.4
	define-lazy-prop-3.0.0
	define-properties-1.2.1
	detect-node-2.1.0
	diff-8.0.2
	dot-prop-10.1.0
	dot-prop-9.0.0
	downgrade-root-2.0.0
	eastasianwidth-0.2.0
	editions-6.22.0
	ejs-3.1.10
	emoji-regex-10.6.0
	emoji-regex-8.0.0
	emoji-regex-9.2.2
	encoding-0.1.13
	env-paths-2.2.1
	env-paths-3.0.0
	err-code-2.0.3
	es-define-property-1.0.1
	es-errors-1.3.0
	es6-error-4.1.1
	escape-goat-4.0.0
	escape-string-regexp-4.0.0
	escape-string-regexp-5.0.0
	eventemitter3-5.0.1
	events-universal-1.0.1
	execa-5.1.1
	execa-8.0.1
	execa-9.6.1
	execall-3.0.0
	exponential-backoff-3.1.3
	fast-content-type-parse-2.0.1
	fast-fifo-1.3.2
	fast-glob-3.3.3
	fast-plist-0.1.3
	fastq-1.19.1
	fdir-6.5.0
	figures-6.1.0
	filelist-1.0.4
	fill-range-7.1.1
	filter-obj-5.1.0
	find-up-7.0.0
	find-up-simple-1.0.1
	find-versions-6.0.0
	first-chunk-stream-5.0.0
	fly-import-1.0.0
	foreachasync-3.0.0
	fs-minipass-3.0.3
	fullname-5.0.0
	function-timeout-1.0.2
	generator-code-1.11.15
	get-east-asian-width-1.4.0
	get-stream-6.0.1
	get-stream-8.0.1
	get-stream-9.0.1
	github-username-9.0.0
	glob-13.0.0
	glob-parent-5.1.2
	global-agent-3.0.0
	global-directory-4.0.1
	globalthis-1.0.4
	globby-14.1.0
	globby-16.1.0
	gopd-1.2.0
	graceful-fs-4.2.10
	graceful-fs-4.2.11
	grouped-queue-2.1.0
	has-flag-4.0.0
	has-property-descriptors-1.0.2
	hosted-git-info-7.0.2
	hosted-git-info-9.0.2
	http-cache-semantics-4.2.0
	http-proxy-agent-7.0.2
	https-proxy-agent-7.0.6
	human-signals-2.1.0
	human-signals-5.0.0
	human-signals-8.0.1
	humanize-string-3.1.0
	iconv-lite-0.6.3
	iconv-lite-0.7.1
	ignore-7.0.5
	ignore-walk-8.0.0
	imurmurhash-0.1.4
	indent-string-5.0.0
	index-to-position-1.2.0
	ini-1.3.8
	ini-4.1.1
	ini-5.0.0
	ini-6.0.0
	inquirer-12.11.1
	ip-address-10.1.0
	is-docker-2.2.1
	is-docker-3.0.0
	is-extglob-2.1.1
	is-fullwidth-code-point-3.0.0
	is-glob-4.0.3
	is-in-ci-1.0.0
	is-inside-container-1.0.0
	is-installed-globally-1.0.0
	is-interactive-2.0.0
	is-npm-6.1.0
	is-number-7.0.0
	is-path-inside-4.0.0
	is-plain-obj-4.1.0
	is-regexp-3.1.0
	is-root-3.0.0
	is-stream-2.0.1
	is-stream-3.0.0
	is-stream-4.0.1
	is-unicode-supported-2.1.0
	is-utf8-0.2.1
	is-wsl-3.1.0
	isbinaryfile-5.0.3
	isbinaryfile-5.0.7
	isexe-2.0.0
	isexe-3.1.1
	jake-10.9.4
	js-tokens-4.0.0
	json-parse-even-better-errors-5.0.0
	json-schema-0.4.0
	json-stringify-nice-1.1.4
	json-stringify-safe-5.0.1
	jsonparse-1.3.1
	just-diff-6.0.2
	just-diff-apply-5.5.0
	ky-1.14.1
	latest-version-9.0.0
	locate-path-7.2.0
	locate-path-8.0.0
	locutus-2.0.32
	lodash-4.17.21
	lodash-es-4.17.22
	log-symbols-7.0.1
	lru-cache-10.4.3
	lru-cache-11.2.4
	make-asynchronous-1.0.1
	make-fetch-happen-15.0.3
	map-age-cleaner-0.1.3
	matcher-3.0.0
	mem-5.1.1
	mem-fs-4.1.2
	mem-fs-editor-11.1.4
	meow-12.1.1
	meow-14.0.0
	merge-stream-2.0.0
	merge2-1.4.1
	micromatch-4.0.8
	mimic-fn-2.1.0
	mimic-fn-4.0.0
	mimic-function-5.0.1
	minimatch-10.1.1
	minimatch-3.0.8
	minimatch-5.1.6
	minimatch-9.0.5
	minimist-1.2.8
	minipass-3.3.6
	minipass-7.1.2
	minipass-collect-2.0.1
	minipass-fetch-5.0.0
	minipass-flush-1.0.5
	minipass-pipeline-1.2.4
	minipass-sized-1.0.3
	minizlib-3.1.0
	ms-2.1.3
	multimatch-7.0.0
	mute-stream-2.0.0
	negotiator-1.0.0
	node-gyp-12.1.0
	nopt-9.0.0
	normalize-package-data-6.0.2
	normalize-package-data-8.0.0
	normalize-path-3.0.0
	npm-bundled-5.0.0
	npm-install-checks-8.0.0
	npm-keyword-8.0.0
	npm-normalize-package-bin-5.0.0
	npm-package-arg-13.0.2
	npm-packlist-10.0.3
	npm-pick-manifest-11.0.3
	npm-registry-fetch-19.1.1
	npm-run-path-4.0.1
	npm-run-path-5.3.0
	npm-run-path-6.0.0
	object-keys-1.1.1
	onetime-5.1.2
	onetime-6.0.0
	onetime-7.0.0
	open-10.2.0
	ora-9.0.0
	p-any-4.0.0
	p-cancelable-3.0.0
	p-defer-1.0.0
	p-event-6.0.1
	p-is-promise-2.1.0
	p-limit-4.0.0
	p-locate-6.0.0
	p-map-7.0.4
	p-queue-8.1.1
	p-queue-9.0.1
	p-some-6.0.0
	p-timeout-6.1.4
	p-timeout-7.0.1
	p-transform-5.0.1
	package-json-10.0.1
	pacote-21.0.4
	pad-component-0.0.1
	parse-conflict-json-5.0.1
	parse-help-2.0.0
	parse-json-8.3.0
	parse-ms-4.0.0
	passwd-user-4.0.0
	path-exists-5.0.0
	path-key-3.1.1
	path-key-4.0.0
	path-scurry-2.0.1
	path-type-6.0.0
	picocolors-1.1.1
	picomatch-2.3.1
	picomatch-4.0.3
	postcss-selector-parser-7.1.1
	pretty-bytes-7.1.0
	pretty-ms-9.3.0
	proc-log-6.1.0
	proggy-4.0.0
	promise-all-reject-late-1.0.1
	promise-call-limit-3.0.2
	promise-retry-2.0.1
	proto-list-1.2.4
	pupa-3.3.0
	queue-microtask-1.2.3
	rc-1.2.8
	read-cmd-shim-6.0.0
	read-package-up-11.0.0
	read-package-up-12.0.0
	read-pkg-10.0.0
	read-pkg-9.0.1
	registry-auth-token-5.1.0
	registry-url-6.0.1
	registry-url-7.2.0
	remove-trailing-separator-1.1.0
	replace-ext-2.0.0
	request-light-0.8.0
	restore-cursor-5.1.0
	retry-0.12.0
	reusify-1.1.0
	roarr-2.15.4
	root-check-2.0.0
	run-applescript-7.1.0
	run-async-4.0.6
	run-parallel-1.2.0
	rxjs-7.8.2
	safer-buffer-2.1.2
	semver-7.7.3
	semver-compare-1.0.0
	semver-regex-4.0.5
	semver-truncate-3.0.0
	serialize-error-7.0.1
	shebang-command-2.0.0
	shebang-regex-3.0.0
	signal-exit-3.0.7
	signal-exit-4.1.0
	sigstore-4.1.0
	simple-git-3.30.0
	slash-5.1.0
	smart-buffer-4.2.0
	socks-2.8.7
	socks-proxy-agent-8.0.5
	sort-keys-5.1.0
	sort-on-7.0.0
	spdx-correct-3.2.0
	spdx-exceptions-2.5.0
	spdx-expression-parse-3.0.1
	spdx-license-ids-3.0.22
	sprintf-js-1.1.3
	ssri-13.0.0
	stdin-discarder-0.2.2
	streamx-2.23.0
	string-length-6.0.0
	string-width-4.2.3
	string-width-5.1.2
	string-width-6.1.0
	string-width-7.2.0
	string-width-8.1.0
	strip-ansi-6.0.1
	strip-ansi-7.1.2
	strip-bom-buf-3.0.1
	strip-bom-stream-5.0.0
	strip-final-newline-2.0.0
	strip-final-newline-3.0.0
	strip-final-newline-4.0.0
	strip-json-comments-2.0.1
	stubborn-fs-2.0.0
	stubborn-utils-1.0.2
	sudo-block-4.0.0
	super-regex-1.1.0
	supports-color-7.2.0
	supports-color-9.4.0
	tagged-tag-1.0.0
	tar-7.5.2
	teex-1.0.1
	text-decoder-1.2.3
	text-table-0.2.0
	textextensions-6.11.0
	time-span-5.1.0
	tinyglobby-0.2.15
	titleize-4.0.0
	to-regex-range-5.0.1
	treeverse-3.0.0
	tslib-2.8.1
	tuf-js-4.1.0
	twig-1.17.1
	type-fest-0.13.1
	type-fest-4.41.0
	type-fest-5.3.1
	undici-types-7.16.0
	unicorn-magic-0.1.0
	unicorn-magic-0.3.0
	unicorn-magic-0.4.0
	unique-filename-5.0.0
	unique-slug-6.0.0
	universal-user-agent-7.0.3
	untildify-6.0.0
	update-notifier-7.3.1
	util-deprecate-1.0.2
	validate-npm-package-license-3.0.4
	validate-npm-package-name-7.0.1
	version-range-4.15.0
	vinyl-3.0.1
	vinyl-file-5.0.0
	walk-2.3.15
	walk-up-path-4.0.0
	web-worker-1.2.0
	when-exit-2.1.5
	which-2.0.2
	which-6.0.0
	which-package-manager-1.0.1
	widest-line-5.0.0
	wrap-ansi-6.2.0
	wrap-ansi-8.1.0
	wrap-ansi-9.0.2
	write-file-atomic-7.0.0
	wsl-utils-0.1.0
	xdg-basedir-5.1.0
	yallist-4.0.0
	yallist-5.0.0
	yeoman-character-2.0.0
	yeoman-doctor-6.0.0
	yeoman-environment-5.1.2
	yeoman-generator-7.5.1
	yo-6.0.0
	yocto-queue-1.2.2
	yoctocolors-2.1.2
	yoctocolors-cjs-2.1.3
	yosay-3.0.0
)
yarn_set_globals
SRC_URI="${YARN_SRC_URI}"
S="${WORKDIR}"
LICENSE="BSD-2 MIT Apache-2.0 CC0-1.0 0BSD BlueOak-1.0.0 CC-BY-3.0 ISC WTFPL-2"
KEYWORDS="~amd64"
RESTRICT="mirror"

src_install() {
	yarn_src_install
	fperms 0755 "/usr/$(get_libdir)/node_modules/${PN}/node_modules/${PN}/lib/cli.js"
	dosym "../$(get_libdir)/node_modules/${PN}/node_modules/${PN}/lib/cli.js" "/usr/bin/${PN}"
}