mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-07-05 08:08:37 +03:00
updates wrong yarn references and replaces with npm
This commit is contained in:
@@ -143,7 +143,7 @@ generic_extractor:
|
|||||||
|
|
||||||
**PyPi/ Local**:
|
**PyPi/ Local**:
|
||||||
|
|
||||||
When using the Auto Archiver PyPI package, or running locally, you will need additional system requirements to run the token generation script, namely either Docker, or Node.js and Yarn.
|
When using the Auto Archiver PyPI package, or running locally, you will need additional system requirements to run the token generation script, namely either Docker, or Node.js and npm (>=9).
|
||||||
|
|
||||||
See the [bgutil-ytdlp-pot-provider](https://github.com/Brainicism/bgutil-ytdlp-pot-provider?tab=readme-ov-file#a-http-server-option) documentation for more details.
|
See the [bgutil-ytdlp-pot-provider](https://github.com/Brainicism/bgutil-ytdlp-pot-provider?tab=readme-ov-file#a-http-server-option) documentation for more details.
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class GenericExtractor(Extractor):
|
|||||||
def setup_token_generation_script(self) -> None:
|
def setup_token_generation_script(self) -> None:
|
||||||
"""This function sets up the Proof of Origin Token generation script method for
|
"""This function sets up the Proof of Origin Token generation script method for
|
||||||
bgutil-ytdlp-pot-provider if enabled or in Docker."""
|
bgutil-ytdlp-pot-provider if enabled or in Docker."""
|
||||||
missing_tools = [tool for tool in ("node", "yarn", "npx") if shutil.which(tool) is None]
|
missing_tools = [tool for tool in ("node", "npm", "npx") if shutil.which(tool) is None]
|
||||||
if missing_tools:
|
if missing_tools:
|
||||||
logger.error(
|
logger.error(
|
||||||
f"Cannot set up PO Token script; missing required tools: {', '.join(missing_tools)}. "
|
f"Cannot set up PO Token script; missing required tools: {', '.join(missing_tools)}. "
|
||||||
@@ -151,7 +151,7 @@ class GenericExtractor(Extractor):
|
|||||||
shutil.move(os.path.join(extracted_root, "server"), server_dir)
|
shutil.move(os.path.join(extracted_root, "server"), server_dir)
|
||||||
shutil.rmtree(extracted_root)
|
shutil.rmtree(extracted_root)
|
||||||
logger.info("Installing dependencies and transpiling PoT Generator script...")
|
logger.info("Installing dependencies and transpiling PoT Generator script...")
|
||||||
subprocess.run(["yarn", "install", "--frozen-lockfile"], cwd=server_dir, check=True)
|
subprocess.run(["npm", "ci"], cwd=server_dir, check=True)
|
||||||
subprocess.run(["npx", "tsc"], cwd=server_dir, check=True)
|
subprocess.run(["npx", "tsc"], cwd=server_dir, check=True)
|
||||||
|
|
||||||
with open(version_file, "w") as vf:
|
with open(version_file, "w") as vf:
|
||||||
|
|||||||
Reference in New Issue
Block a user