initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
20
github/codeql-action-v2/node_modules/is-bun-module/LICENSE
generated
vendored
Normal file
20
github/codeql-action-v2/node_modules/is-bun-module/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2024 SunsetTechuila
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
28
github/codeql-action-v2/node_modules/is-bun-module/README.md
generated
vendored
Normal file
28
github/codeql-action-v2/node_modules/is-bun-module/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# is-bun-module
|
||||
|
||||
## How to use
|
||||
|
||||
To check if a specifier is a [Bun module](https://bun.sh/docs/runtime/bun-apis):
|
||||
|
||||
```typescript
|
||||
import { isBunModule } from "is-bun-module";
|
||||
isBunModule("bun"); // true
|
||||
isBunModule("bun:test", "1.0.0"); // true
|
||||
isBunModule("notBunModule"); // false
|
||||
```
|
||||
|
||||
To check if a specifier is a Node module [supported by Bun](https://bun.sh/docs/runtime/nodejs-apis):
|
||||
|
||||
```typescript
|
||||
import { isSupportedNodeModule } from "is-bun-module";
|
||||
isSupportedNodeModule("fs"); // true
|
||||
isSupportedNodeModule("node:fs"); // true
|
||||
isSupportedNodeModule("node:notNodeModule"); // false
|
||||
isSupportedNodeModule("node:http2", "1.0.0"); // false, added in 1.0.13
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- **Only Bun v1.0.0+ is supported**
|
||||
- You can also pass `latest` as Bun version
|
||||
- Inspired by [is-core-module](https://github.com/inspect-js/is-core-module) and made for [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript)
|
||||
7
github/codeql-action-v2/node_modules/is-bun-module/dist/cjs/index.d.ts
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/is-bun-module/dist/cjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
type SemVerStringified = `${number}.${number}.${number}`;
|
||||
type Version = SemVerStringified | "latest";
|
||||
declare const MINIMUM_BUN_VERSION = "1.0.0";
|
||||
declare function isBunModule(moduleName: string, bunVersion?: Version): boolean;
|
||||
declare function isSupportedNodeModule(moduleName: string, bunVersion?: Version): boolean;
|
||||
|
||||
export { MINIMUM_BUN_VERSION, type Version, isBunModule, isSupportedNodeModule };
|
||||
120
github/codeql-action-v2/node_modules/is-bun-module/dist/cjs/index.js
generated
vendored
Normal file
120
github/codeql-action-v2/node_modules/is-bun-module/dist/cjs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var src_exports = {};
|
||||
__export(src_exports, {
|
||||
MINIMUM_BUN_VERSION: () => MINIMUM_BUN_VERSION,
|
||||
isBunModule: () => isBunModule,
|
||||
isSupportedNodeModule: () => isSupportedNodeModule
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
var import_semver = __toESM(require("semver"));
|
||||
|
||||
// src/assets/bun-modules.json
|
||||
var bun_modules_default = {
|
||||
bun: true,
|
||||
"bun:ffi": true,
|
||||
"bun:jsc": true,
|
||||
"bun:sqlite": true,
|
||||
"bun:test": true
|
||||
};
|
||||
|
||||
// src/assets/node-modules.json
|
||||
var node_modules_default = {
|
||||
assert: true,
|
||||
async_hooks: true,
|
||||
buffer: true,
|
||||
child_process: true,
|
||||
cluster: ">= 1.1.25",
|
||||
console: true,
|
||||
crypto: true,
|
||||
dgram: ">= 1.1.6",
|
||||
dns: true,
|
||||
domain: true,
|
||||
events: true,
|
||||
fs: true,
|
||||
http: true,
|
||||
http2: ">= 1.0.13",
|
||||
https: true,
|
||||
module: true,
|
||||
net: true,
|
||||
os: true,
|
||||
path: true,
|
||||
perf_hooks: true,
|
||||
process: true,
|
||||
punycode: true,
|
||||
querystring: true,
|
||||
readline: true,
|
||||
stream: true,
|
||||
string_decoder: true,
|
||||
sys: true,
|
||||
timers: true,
|
||||
tls: true,
|
||||
tty: true,
|
||||
url: true,
|
||||
util: true,
|
||||
vm: true,
|
||||
wasi: true,
|
||||
worker_threads: true,
|
||||
zlib: true
|
||||
};
|
||||
|
||||
// src/index.ts
|
||||
var MINIMUM_BUN_VERSION = "1.0.0";
|
||||
function isBunModule(moduleName, bunVersion) {
|
||||
return checkModule(moduleName, bun_modules_default, bunVersion);
|
||||
}
|
||||
function isSupportedNodeModule(moduleName, bunVersion) {
|
||||
return checkModule(moduleName.replace(/^node:/, ""), node_modules_default, bunVersion);
|
||||
}
|
||||
function checkModule(moduleName, modules, bunVersion) {
|
||||
if (typeof moduleName !== "string") throw new TypeError("Module name must be a string");
|
||||
if (!(moduleName in modules)) return false;
|
||||
if (bunVersion != null && !isVersion(bunVersion)) {
|
||||
throw new TypeError("Bun version must be a string like 1.0.0 or 'latest' or undefined");
|
||||
}
|
||||
const targetBunVersion = bunVersion ? bunVersion === "latest" ? "999.999.999" : bunVersion : typeof process !== "undefined" && process.versions.bun;
|
||||
if (!targetBunVersion) throw "Bun version is not provided and cannot be detected";
|
||||
if (import_semver.default.lt(targetBunVersion, MINIMUM_BUN_VERSION)) {
|
||||
throw `Bun version must be at least ${MINIMUM_BUN_VERSION}`;
|
||||
}
|
||||
const versionRange = modules[moduleName];
|
||||
if (typeof versionRange === "boolean") return versionRange;
|
||||
return import_semver.default.satisfies(targetBunVersion, versionRange);
|
||||
}
|
||||
function isVersion(input) {
|
||||
return typeof input === "string" && (input === "latest" || Boolean(input.match(/^(?:\d+\.){2}\d+$/)));
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
MINIMUM_BUN_VERSION,
|
||||
isBunModule,
|
||||
isSupportedNodeModule
|
||||
});
|
||||
7
github/codeql-action-v2/node_modules/is-bun-module/dist/esm/index.d.mts
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/is-bun-module/dist/esm/index.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
type SemVerStringified = `${number}.${number}.${number}`;
|
||||
type Version = SemVerStringified | "latest";
|
||||
declare const MINIMUM_BUN_VERSION = "1.0.0";
|
||||
declare function isBunModule(moduleName: string, bunVersion?: Version): boolean;
|
||||
declare function isSupportedNodeModule(moduleName: string, bunVersion?: Version): boolean;
|
||||
|
||||
export { MINIMUM_BUN_VERSION, type Version, isBunModule, isSupportedNodeModule };
|
||||
83
github/codeql-action-v2/node_modules/is-bun-module/dist/esm/index.mjs
generated
vendored
Normal file
83
github/codeql-action-v2/node_modules/is-bun-module/dist/esm/index.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
// src/index.ts
|
||||
import semver from "semver";
|
||||
|
||||
// src/assets/bun-modules.json
|
||||
var bun_modules_default = {
|
||||
bun: true,
|
||||
"bun:ffi": true,
|
||||
"bun:jsc": true,
|
||||
"bun:sqlite": true,
|
||||
"bun:test": true
|
||||
};
|
||||
|
||||
// src/assets/node-modules.json
|
||||
var node_modules_default = {
|
||||
assert: true,
|
||||
async_hooks: true,
|
||||
buffer: true,
|
||||
child_process: true,
|
||||
cluster: ">= 1.1.25",
|
||||
console: true,
|
||||
crypto: true,
|
||||
dgram: ">= 1.1.6",
|
||||
dns: true,
|
||||
domain: true,
|
||||
events: true,
|
||||
fs: true,
|
||||
http: true,
|
||||
http2: ">= 1.0.13",
|
||||
https: true,
|
||||
module: true,
|
||||
net: true,
|
||||
os: true,
|
||||
path: true,
|
||||
perf_hooks: true,
|
||||
process: true,
|
||||
punycode: true,
|
||||
querystring: true,
|
||||
readline: true,
|
||||
stream: true,
|
||||
string_decoder: true,
|
||||
sys: true,
|
||||
timers: true,
|
||||
tls: true,
|
||||
tty: true,
|
||||
url: true,
|
||||
util: true,
|
||||
vm: true,
|
||||
wasi: true,
|
||||
worker_threads: true,
|
||||
zlib: true
|
||||
};
|
||||
|
||||
// src/index.ts
|
||||
var MINIMUM_BUN_VERSION = "1.0.0";
|
||||
function isBunModule(moduleName, bunVersion) {
|
||||
return checkModule(moduleName, bun_modules_default, bunVersion);
|
||||
}
|
||||
function isSupportedNodeModule(moduleName, bunVersion) {
|
||||
return checkModule(moduleName.replace(/^node:/, ""), node_modules_default, bunVersion);
|
||||
}
|
||||
function checkModule(moduleName, modules, bunVersion) {
|
||||
if (typeof moduleName !== "string") throw new TypeError("Module name must be a string");
|
||||
if (!(moduleName in modules)) return false;
|
||||
if (bunVersion != null && !isVersion(bunVersion)) {
|
||||
throw new TypeError("Bun version must be a string like 1.0.0 or 'latest' or undefined");
|
||||
}
|
||||
const targetBunVersion = bunVersion ? bunVersion === "latest" ? "999.999.999" : bunVersion : typeof process !== "undefined" && process.versions.bun;
|
||||
if (!targetBunVersion) throw "Bun version is not provided and cannot be detected";
|
||||
if (semver.lt(targetBunVersion, MINIMUM_BUN_VERSION)) {
|
||||
throw `Bun version must be at least ${MINIMUM_BUN_VERSION}`;
|
||||
}
|
||||
const versionRange = modules[moduleName];
|
||||
if (typeof versionRange === "boolean") return versionRange;
|
||||
return semver.satisfies(targetBunVersion, versionRange);
|
||||
}
|
||||
function isVersion(input) {
|
||||
return typeof input === "string" && (input === "latest" || Boolean(input.match(/^(?:\d+\.){2}\d+$/)));
|
||||
}
|
||||
export {
|
||||
MINIMUM_BUN_VERSION,
|
||||
isBunModule,
|
||||
isSupportedNodeModule
|
||||
};
|
||||
41
github/codeql-action-v2/node_modules/is-bun-module/package.json
generated
vendored
Normal file
41
github/codeql-action-v2/node_modules/is-bun-module/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "is-bun-module",
|
||||
"author": "SunsetTechuila <techuila.sunset@gmail.com>",
|
||||
"description": "Is this specifier a Bun core module or supported Node one?",
|
||||
"version": "1.1.0",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist/**/*"
|
||||
],
|
||||
"main": "./dist/cjs/index.js",
|
||||
"module": "./dist/esm/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"default": "./dist/esm/index.mjs",
|
||||
"types": "./dist/esm/index.d.mts"
|
||||
},
|
||||
"require": {
|
||||
"default": "./dist/cjs/index.js",
|
||||
"types": "./dist/cjs/index.d.ts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"homepage": "https://github.com/SunsetTechuila/is-bun-module",
|
||||
"repository": "github:SunsetTechuila/is-bun-module",
|
||||
"bugs": {
|
||||
"url": "https://github.com/SunsetTechuila/is-bun-module/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"core",
|
||||
"modules",
|
||||
"module",
|
||||
"node",
|
||||
"dependencies",
|
||||
"bun"
|
||||
],
|
||||
"dependencies": {
|
||||
"semver": "^7.6.3"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue