first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

42
node_modules/fb-dotslash/README.md generated vendored Normal file
View File

@@ -0,0 +1,42 @@
# DotSlash: simplified executable deployment
[DotSlash](https://dotslash-cli.com/docs/) (`dotslash`) is a command-line tool that lets you represent a set of
platform-specific, heavyweight executables with an equivalent small,
easy-to-read text file. In turn, this makes it efficient to store executables in
source control without hurting repository size. This paves the way for checking
build toolchains and other tools directly into the repo, reducing dependencies
on the host environment and thereby facilitating reproducible builds.
The `fb-dotslash` npm package allows you to use DotSlash in your Node.js projects without having to install DotSlash globally. This is particularly useful for package authors, who have traditionally needed to either include binaries for _all_ platforms or manage their own download and caching in a postinstall script.
## Using DotSlash in an npm package
First, you'll need to write a [DotSlash file](https://dotslash-cli.com/docs/dotslash-file/) that describes the binary you want to distribute.
If your npm package declares `fb-dotslash` as a dependency, any commands executed as part of `npm run` and `npm exec` will have `dotslash` available on the `PATH`. This means you can, for example, directly reference DotSlash files in your `package.json` scripts with no further setup:
```json
{
"name": "my-package",
"scripts": {
"foo": "path/to/dotslash/file"
},
"dependencies": {
"fb-dotslash": "^0.5.8"
}
}
```
If you need to use `dotslash` in some other context, you can use `require('fb-dotslash')` to get the path to the DotSlash executable appropriate for the current platform:
```js
const dotslash = require('fb-dotslash');
const {spawnSync} = require('child_process');
spawnSync(dotslash, ['path/to/dotslash/file'], {stdio: 'inherit']);
```
## License
DotSlash is licensed under both the MIT license and Apache-2.0 license; the
exact terms can be found in the [LICENSE-MIT](https://github.com/facebook/dotslash/blob/main/LICENSE-MIT) and
[LICENSE-APACHE](https://github.com/facebook/dotslash/blob/main/LICENSE-APACHE) files, respectively.

22
node_modules/fb-dotslash/bin/dotslash generated vendored Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env node
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under both the MIT license found in the
* LICENSE-MIT file in the root directory of this source tree and the Apache
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory
* of this source tree.
*/
'use strict';
const spawn = require('child_process').spawn;
const input = process.argv.slice(2);
const bin = require('../');
if (bin !== null) {
spawn(bin, input, { stdio: 'inherit' }).on('exit', process.exit);
} else {
throw new Error('Platform not supported.');
}

BIN
node_modules/fb-dotslash/bin/linux-musl.aarch64/dotslash generated vendored Executable file

Binary file not shown.

BIN
node_modules/fb-dotslash/bin/linux-musl.x86_64/dotslash generated vendored Executable file

Binary file not shown.

BIN
node_modules/fb-dotslash/bin/macos/dotslash generated vendored Executable file

Binary file not shown.

BIN
node_modules/fb-dotslash/bin/windows-arm64/dotslash.exe generated vendored Executable file

Binary file not shown.

BIN
node_modules/fb-dotslash/bin/windows/dotslash.exe generated vendored Executable file

Binary file not shown.

14
node_modules/fb-dotslash/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is dual-licensed under either the MIT license found in the
* LICENSE-MIT file in the root directory of this source tree or the Apache
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory
* of this source tree. You may select, at your option, one of the
* above-listed licenses.
*
* @format
*/
declare const binaryPath: string;
export = binaryPath;

20
node_modules/fb-dotslash/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is dual-licensed under either the MIT license found in the
* LICENSE-MIT file in the root directory of this source tree or the Apache
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory
* of this source tree. You may select, at your option, one of the
* above-listed licenses.
*/
'use strict';
const os = require('os');
const path = require('path');
const { artifactsByPlatformAndArch } = require('./platforms');
const artifacts = artifactsByPlatformAndArch[os.platform()];
const { slug, binary } = artifacts[os.arch()] ?? artifacts['*'];
module.exports = path.join(__dirname, 'bin', slug, binary);

15
node_modules/fb-dotslash/index.js.flow generated vendored Normal file
View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is dual-licensed under either the MIT license found in the
* LICENSE-MIT file in the root directory of this source tree or the Apache
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory
* of this source tree. You may select, at your option, one of the
* above-listed licenses.
*
* @format
* @flow strict-local
*/
declare var binaryPath: string;
module.exports = binaryPath;

40
node_modules/fb-dotslash/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "fb-dotslash",
"version": "0.5.8",
"bin": {
"dotslash": "bin/dotslash"
},
"description": "Command-line tool to facilitate fetching an executable, caching it, and then running it.",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/dotslash.git"
},
"homepage": "https://dotslash-cli.com/",
"bugs": "https://github.com/facebook/dotslash/issues",
"contributors": [
"Michael Bolin <bolinfest@gmail.com>",
"Andres Suarez <zertosh@gmail.com>",
"Moti Zilberman <motiz88@gmail.com>"
],
"main": "index.js",
"files": [
"bin",
"platforms.js",
"index.js",
"index.js.flow",
"index.d.ts"
],
"scripts": {
"clean": "node scripts/clean-package",
"build": "npm run fix && node scripts/build-package",
"fix": "prettier --write .",
"lint": "prettier --check ."
},
"license": "(MIT OR Apache-2.0)",
"engines": {
"node": ">=20"
},
"devDependencies": {
"prettier": "3.6.2"
}
}

47
node_modules/fb-dotslash/platforms.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is dual-licensed under either the MIT license found in the
* LICENSE-MIT file in the root directory of this source tree or the Apache
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory
* of this source tree. You may select, at your option, one of the
* above-listed licenses.
*/
module.exports = {
// Keep in sync with .github/workflows/release.yml - the 'npm-publish' job's dependencies
// MUST include the build job for each artifact listed below.
artifactsByPlatformAndArch: {
linux: {
arm64: {
// Build job: 'linux-musl-arm64'
slug: 'linux-musl.aarch64',
binary: 'dotslash',
},
x64: {
// Build job: 'linux-musl-x86_64'
slug: 'linux-musl.x86_64',
binary: 'dotslash',
},
},
darwin: {
'*': {
// Build job: 'macos'
slug: 'macos',
binary: 'dotslash',
},
},
win32: {
arm64: {
// Build job: 'windows-arm64'
slug: 'windows-arm64',
binary: 'dotslash.exe',
},
x64: {
// Build job: 'windows'
slug: 'windows',
binary: 'dotslash.exe',
},
},
},
};