@vercel/fs-detectors 5.0.1 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/detect-builders.js +701 -748
- package/dist/detect-builders.js.map +7 -1
- package/dist/detect-file-system-api.js +177 -154
- package/dist/detect-file-system-api.js.map +7 -1
- package/dist/detect-framework.js +196 -143
- package/dist/detect-framework.js.map +7 -1
- package/dist/detectors/filesystem.js +106 -109
- package/dist/detectors/filesystem.js.map +7 -1
- package/dist/detectors/local-file-system-detector.js +90 -63
- package/dist/detectors/local-file-system-detector.js.map +7 -1
- package/dist/get-project-paths.js +74 -35
- package/dist/get-project-paths.js.map +7 -1
- package/dist/index.js +85 -48
- package/dist/index.js.map +7 -1
- package/dist/is-official-runtime.js +34 -19
- package/dist/is-official-runtime.js.map +7 -1
- package/dist/monorepos/get-monorepo-default-settings.js +154 -150
- package/dist/monorepos/get-monorepo-default-settings.js.map +7 -1
- package/dist/monorepos/monorepo-managers.js +112 -100
- package/dist/monorepos/monorepo-managers.js.map +7 -1
- package/dist/package-managers/package-managers.js +79 -55
- package/dist/package-managers/package-managers.js.map +7 -1
- package/dist/workspaces/get-glob-fs.js +90 -66
- package/dist/workspaces/get-glob-fs.js.map +7 -1
- package/dist/workspaces/get-workspace-package-paths.js +130 -79
- package/dist/workspaces/get-workspace-package-paths.js.map +7 -1
- package/dist/workspaces/get-workspaces.js +71 -31
- package/dist/workspaces/get-workspaces.js.map +7 -1
- package/dist/workspaces/workspace-managers.js +104 -92
- package/dist/workspaces/workspace-managers.js.map +7 -1
- package/package.json +5 -5
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/detectors/filesystem.ts"],
|
|
4
|
+
"sourcesContent": ["import { posix as posixPath } from 'path';\n\nexport interface DetectorFilesystemStat {\n name: string;\n path: string;\n type: 'file' | 'dir';\n}\n/**\n * `DetectorFilesystem` is an abstract class that represents a virtual filesystem\n * to perform read-only operations on in order to detect which framework is being\n * used.\n *\n * Its abstract methods must be implemented by a subclass that perform the actual\n * FS operations. Example subclasses could be implemented as:\n *\n * - Local filesystem, which proxies the FS operations to the equivalent `fs`\n * module functions.\n * - HTTP filesystem, which implements the FS operations over an HTTP server\n * and does not require a local copy of the files.\n * - `Files` filesystem, which operates on a virtual `Files` object (i.e. from\n * the `glob()` function) which could include `FileFsRef`, `FileBlob`, etc.\n *\n * This base class implements various helper functions for common tasks (i.e.\n * read and parse a JSON file). It also includes caching for all FS operations\n * so that multiple detector functions de-dup read operations on the same file\n * to reduce network/filesystem overhead.\n *\n * **NOTE:** It's important that all instance methods in this base class are\n * bound to `this` so that the `fs` object may be destructured in the detector\n * functions. The easiest way to do this is to use the `=` syntax when defining\n * methods in this class definition.\n */\nexport abstract class DetectorFilesystem {\n protected abstract _hasPath(name: string): Promise<boolean>;\n protected abstract _readFile(name: string): Promise<Buffer>;\n protected abstract _isFile(name: string): Promise<boolean>;\n protected abstract _readdir(name: string): Promise<DetectorFilesystemStat[]>;\n protected abstract _chdir(name: string): DetectorFilesystem;\n\n private pathCache: Map<string, Promise<boolean>>;\n private fileCache: Map<string, Promise<boolean>>;\n private readFileCache: Map<string, Promise<Buffer>>;\n private readdirCache: Map<string, Promise<DetectorFilesystemStat[]>>;\n\n constructor() {\n this.pathCache = new Map();\n this.fileCache = new Map();\n this.readFileCache = new Map();\n this.readdirCache = new Map();\n }\n\n public hasPath = async (path: string): Promise<boolean> => {\n let p = this.pathCache.get(path);\n if (!p) {\n p = this._hasPath(path);\n this.pathCache.set(path, p);\n }\n return p;\n };\n\n public isFile = async (name: string): Promise<boolean> => {\n let p = this.fileCache.get(name);\n if (!p) {\n p = this._isFile(name);\n this.fileCache.set(name, p);\n }\n return p;\n };\n\n public readFile = async (name: string): Promise<Buffer> => {\n let p = this.readFileCache.get(name);\n if (!p) {\n p = this._readFile(name);\n this.readFileCache.set(name, p);\n }\n return p;\n };\n\n /**\n * Returns a list of Stat objects from the current working directory.\n * @param dirPath The path of the directory to read.\n * @param options.potentialFiles optional. Array of potential file names (relative to the path). If provided, these will be used to mark the filesystem caches as existing or not existing.\n */\n public readdir = async (\n dirPath: string,\n options?: { potentialFiles?: string[] }\n ): Promise<DetectorFilesystemStat[]> => {\n let p = this.readdirCache.get(dirPath);\n if (!p) {\n p = this._readdir(dirPath);\n this.readdirCache.set(dirPath, p);\n }\n\n const directoryContent = await p;\n const directoryFiles = new Set<string>();\n\n for (const file of directoryContent) {\n if (file.type === 'file') {\n // we know this file exists, mark it as so on the filesystem\n this.fileCache.set(file.path, Promise.resolve(true));\n this.pathCache.set(file.path, Promise.resolve(true));\n directoryFiles.add(file.name);\n }\n }\n\n if (options?.potentialFiles) {\n // calculate the set of paths that truly do not exist\n const filesThatDoNotExist = options.potentialFiles.filter(\n path => !directoryFiles.has(path)\n );\n for (const filePath of filesThatDoNotExist) {\n const fullFilePath =\n dirPath === '/' ? filePath : posixPath.join(dirPath, filePath);\n // we know this file does not exist, mark it as so on the filesystem\n this.fileCache.set(fullFilePath, Promise.resolve(false));\n this.pathCache.set(fullFilePath, Promise.resolve(false));\n }\n }\n\n return p;\n };\n\n /**\n * Changes the current directory to the specified path and returns a new instance of DetectorFilesystem.\n */\n public chdir = (name: string): DetectorFilesystem => {\n return this._chdir(name);\n };\n\n /**\n * Writes a file to the filesystem cache.\n * @param name the name of the file to write\n * @param content The content of the file\n */\n public writeFile = async (name: string, content: string): Promise<void> => {\n this.readFileCache.set(name, Promise.resolve(Buffer.from(content)));\n this.fileCache.set(name, Promise.resolve(true));\n this.pathCache.set(name, Promise.resolve(true));\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmC;AAgC5B,MAAe,mBAAmB;AAAA,EAYvC,cAAc;AAOd,SAAO,UAAU,OAAO,SAAmC;AACzD,UAAI,IAAI,KAAK,UAAU,IAAI,IAAI;AAC/B,UAAI,CAAC,GAAG;AACN,YAAI,KAAK,SAAS,IAAI;AACtB,aAAK,UAAU,IAAI,MAAM,CAAC;AAAA,MAC5B;AACA,aAAO;AAAA,IACT;AAEA,SAAO,SAAS,OAAO,SAAmC;AACxD,UAAI,IAAI,KAAK,UAAU,IAAI,IAAI;AAC/B,UAAI,CAAC,GAAG;AACN,YAAI,KAAK,QAAQ,IAAI;AACrB,aAAK,UAAU,IAAI,MAAM,CAAC;AAAA,MAC5B;AACA,aAAO;AAAA,IACT;AAEA,SAAO,WAAW,OAAO,SAAkC;AACzD,UAAI,IAAI,KAAK,cAAc,IAAI,IAAI;AACnC,UAAI,CAAC,GAAG;AACN,YAAI,KAAK,UAAU,IAAI;AACvB,aAAK,cAAc,IAAI,MAAM,CAAC;AAAA,MAChC;AACA,aAAO;AAAA,IACT;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAO,UAAU,OACf,SACA,YACsC;AACtC,UAAI,IAAI,KAAK,aAAa,IAAI,OAAO;AACrC,UAAI,CAAC,GAAG;AACN,YAAI,KAAK,SAAS,OAAO;AACzB,aAAK,aAAa,IAAI,SAAS,CAAC;AAAA,MAClC;AAEA,YAAM,mBAAmB,MAAM;AAC/B,YAAM,iBAAiB,oBAAI,IAAY;AAEvC,iBAAW,QAAQ,kBAAkB;AACnC,YAAI,KAAK,SAAS,QAAQ;AAExB,eAAK,UAAU,IAAI,KAAK,MAAM,QAAQ,QAAQ,IAAI,CAAC;AACnD,eAAK,UAAU,IAAI,KAAK,MAAM,QAAQ,QAAQ,IAAI,CAAC;AACnD,yBAAe,IAAI,KAAK,IAAI;AAAA,QAC9B;AAAA,MACF;AAEA,UAAI,SAAS,gBAAgB;AAE3B,cAAM,sBAAsB,QAAQ,eAAe;AAAA,UACjD,UAAQ,CAAC,eAAe,IAAI,IAAI;AAAA,QAClC;AACA,mBAAW,YAAY,qBAAqB;AAC1C,gBAAM,eACJ,YAAY,MAAM,WAAW,YAAAA,MAAU,KAAK,SAAS,QAAQ;AAE/D,eAAK,UAAU,IAAI,cAAc,QAAQ,QAAQ,KAAK,CAAC;AACvD,eAAK,UAAU,IAAI,cAAc,QAAQ,QAAQ,KAAK,CAAC;AAAA,QACzD;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAKA;AAAA;AAAA;AAAA,SAAO,QAAQ,CAAC,SAAqC;AACnD,aAAO,KAAK,OAAO,IAAI;AAAA,IACzB;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAO,YAAY,OAAO,MAAc,YAAmC;AACzE,WAAK,cAAc,IAAI,MAAM,QAAQ,QAAQ,OAAO,KAAK,OAAO,CAAC,CAAC;AAClE,WAAK,UAAU,IAAI,MAAM,QAAQ,QAAQ,IAAI,CAAC;AAC9C,WAAK,UAAU,IAAI,MAAM,QAAQ,QAAQ,IAAI,CAAC;AAAA,IAChD;AA7FE,SAAK,YAAY,oBAAI,IAAI;AACzB,SAAK,YAAY,oBAAI,IAAI;AACzB,SAAK,gBAAgB,oBAAI,IAAI;AAC7B,SAAK,eAAe,oBAAI,IAAI;AAAA,EAC9B;AA0FF;",
|
|
6
|
+
"names": ["posixPath"]
|
|
7
|
+
}
|
|
@@ -1,68 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var local_file_system_detector_exports = {};
|
|
30
|
+
__export(local_file_system_detector_exports, {
|
|
31
|
+
LocalFileSystemDetector: () => LocalFileSystemDetector
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(local_file_system_detector_exports);
|
|
34
|
+
var import_promises = __toESM(require("fs/promises"));
|
|
35
|
+
var import_path = require("path");
|
|
36
|
+
var import_filesystem = require("./filesystem");
|
|
37
|
+
var import_error_utils = require("@vercel/error-utils");
|
|
38
|
+
class LocalFileSystemDetector extends import_filesystem.DetectorFilesystem {
|
|
39
|
+
constructor(rootPath) {
|
|
40
|
+
super();
|
|
41
|
+
this.rootPath = rootPath;
|
|
42
|
+
}
|
|
43
|
+
async _hasPath(name) {
|
|
44
|
+
try {
|
|
45
|
+
await import_promises.default.stat(this.getFilePath(name));
|
|
46
|
+
return true;
|
|
47
|
+
} catch (err) {
|
|
48
|
+
if ((0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT") {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
throw err;
|
|
15
52
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
53
|
+
}
|
|
54
|
+
_readFile(name) {
|
|
55
|
+
return import_promises.default.readFile(this.getFilePath(name));
|
|
56
|
+
}
|
|
57
|
+
async _isFile(name) {
|
|
58
|
+
const stat = await import_promises.default.stat(this.getFilePath(name));
|
|
59
|
+
return stat.isFile();
|
|
60
|
+
}
|
|
61
|
+
async _readdir(dir) {
|
|
62
|
+
const dirPath = this.getFilePath(dir);
|
|
63
|
+
const files = await import_promises.default.readdir(dirPath);
|
|
64
|
+
return Promise.all(
|
|
65
|
+
files.map(async (name) => {
|
|
66
|
+
const absPath = (0, import_path.join)(this.rootPath, dir, name);
|
|
67
|
+
const path = (0, import_path.join)(this.getRelativeFilePath(dir), name);
|
|
68
|
+
const stat = await import_promises.default.stat(absPath);
|
|
69
|
+
let type;
|
|
70
|
+
if (stat.isFile()) {
|
|
71
|
+
type = "file";
|
|
72
|
+
} else if (stat.isDirectory()) {
|
|
73
|
+
type = "dir";
|
|
74
|
+
} else {
|
|
75
|
+
throw new Error(`Dirent was neither file nor directory: ${path}`);
|
|
26
76
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const path = (0, path_1.join)(this.getRelativeFilePath(dir), name);
|
|
41
|
-
const stat = await promises_1.default.stat(absPath);
|
|
42
|
-
let type;
|
|
43
|
-
if (stat.isFile()) {
|
|
44
|
-
type = 'file';
|
|
45
|
-
}
|
|
46
|
-
else if (stat.isDirectory()) {
|
|
47
|
-
type = 'dir';
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
throw new Error(`Dirent was neither file nor directory: ${path}`);
|
|
51
|
-
}
|
|
52
|
-
return { name, path, type };
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
_chdir(name) {
|
|
56
|
-
return new LocalFileSystemDetector(this.getFilePath(name));
|
|
57
|
-
}
|
|
58
|
-
getRelativeFilePath(name) {
|
|
59
|
-
return name.startsWith(this.rootPath)
|
|
60
|
-
? (0, path_1.relative)(this.rootPath, name)
|
|
61
|
-
: name;
|
|
62
|
-
}
|
|
63
|
-
getFilePath(name) {
|
|
64
|
-
return (0, path_1.join)(this.rootPath, this.getRelativeFilePath(name));
|
|
65
|
-
}
|
|
77
|
+
return { name, path, type };
|
|
78
|
+
})
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
_chdir(name) {
|
|
82
|
+
return new LocalFileSystemDetector(this.getFilePath(name));
|
|
83
|
+
}
|
|
84
|
+
getRelativeFilePath(name) {
|
|
85
|
+
return name.startsWith(this.rootPath) ? (0, import_path.relative)(this.rootPath, name) : name;
|
|
86
|
+
}
|
|
87
|
+
getFilePath(name) {
|
|
88
|
+
return (0, import_path.join)(this.rootPath, this.getRelativeFilePath(name));
|
|
89
|
+
}
|
|
66
90
|
}
|
|
67
|
-
|
|
68
|
-
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
LocalFileSystemDetector
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=local-file-system-detector.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/detectors/local-file-system-detector.ts"],
|
|
4
|
+
"sourcesContent": ["import fs from 'fs/promises';\nimport { join, relative } from 'path';\nimport { DetectorFilesystem, DetectorFilesystemStat } from './filesystem';\nimport { isErrnoException } from '@vercel/error-utils';\n\nexport class LocalFileSystemDetector extends DetectorFilesystem {\n private rootPath: string;\n\n constructor(rootPath: string) {\n super();\n this.rootPath = rootPath;\n }\n\n async _hasPath(name: string): Promise<boolean> {\n try {\n await fs.stat(this.getFilePath(name));\n return true;\n } catch (err) {\n if (isErrnoException(err) && err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n }\n\n _readFile(name: string): Promise<Buffer> {\n return fs.readFile(this.getFilePath(name));\n }\n\n async _isFile(name: string): Promise<boolean> {\n const stat = await fs.stat(this.getFilePath(name));\n return stat.isFile();\n }\n\n async _readdir(dir: string): Promise<DetectorFilesystemStat[]> {\n const dirPath = this.getFilePath(dir);\n const files = await fs.readdir(dirPath);\n return Promise.all(\n files.map(async name => {\n const absPath = join(this.rootPath, dir, name);\n const path = join(this.getRelativeFilePath(dir), name);\n\n const stat = await fs.stat(absPath);\n let type: DetectorFilesystemStat['type'];\n if (stat.isFile()) {\n type = 'file';\n } else if (stat.isDirectory()) {\n type = 'dir';\n } else {\n throw new Error(`Dirent was neither file nor directory: ${path}`);\n }\n\n return { name, path, type };\n })\n );\n }\n\n _chdir(name: string): DetectorFilesystem {\n return new LocalFileSystemDetector(this.getFilePath(name));\n }\n\n private getRelativeFilePath(name: string) {\n return name.startsWith(this.rootPath)\n ? relative(this.rootPath, name)\n : name;\n }\n\n private getFilePath(name: string) {\n return join(this.rootPath, this.getRelativeFilePath(name));\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AACf,kBAA+B;AAC/B,wBAA2D;AAC3D,yBAAiC;AAE1B,MAAM,gCAAgC,qCAAmB;AAAA,EAG9D,YAAY,UAAkB;AAC5B,UAAM;AACN,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA,MAAM,SAAS,MAAgC;AAC7C,QAAI;AACF,YAAM,gBAAAA,QAAG,KAAK,KAAK,YAAY,IAAI,CAAC;AACpC,aAAO;AAAA,IACT,SAAS,KAAK;AACZ,cAAI,qCAAiB,GAAG,KAAK,IAAI,SAAS,UAAU;AAClD,eAAO;AAAA,MACT;AACA,YAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,UAAU,MAA+B;AACvC,WAAO,gBAAAA,QAAG,SAAS,KAAK,YAAY,IAAI,CAAC;AAAA,EAC3C;AAAA,EAEA,MAAM,QAAQ,MAAgC;AAC5C,UAAM,OAAO,MAAM,gBAAAA,QAAG,KAAK,KAAK,YAAY,IAAI,CAAC;AACjD,WAAO,KAAK,OAAO;AAAA,EACrB;AAAA,EAEA,MAAM,SAAS,KAAgD;AAC7D,UAAM,UAAU,KAAK,YAAY,GAAG;AACpC,UAAM,QAAQ,MAAM,gBAAAA,QAAG,QAAQ,OAAO;AACtC,WAAO,QAAQ;AAAA,MACb,MAAM,IAAI,OAAM,SAAQ;AACtB,cAAM,cAAU,kBAAK,KAAK,UAAU,KAAK,IAAI;AAC7C,cAAM,WAAO,kBAAK,KAAK,oBAAoB,GAAG,GAAG,IAAI;AAErD,cAAM,OAAO,MAAM,gBAAAA,QAAG,KAAK,OAAO;AAClC,YAAI;AACJ,YAAI,KAAK,OAAO,GAAG;AACjB,iBAAO;AAAA,QACT,WAAW,KAAK,YAAY,GAAG;AAC7B,iBAAO;AAAA,QACT,OAAO;AACL,gBAAM,IAAI,MAAM,0CAA0C,IAAI,EAAE;AAAA,QAClE;AAEA,eAAO,EAAE,MAAM,MAAM,KAAK;AAAA,MAC5B,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,MAAkC;AACvC,WAAO,IAAI,wBAAwB,KAAK,YAAY,IAAI,CAAC;AAAA,EAC3D;AAAA,EAEQ,oBAAoB,MAAc;AACxC,WAAO,KAAK,WAAW,KAAK,QAAQ,QAChC,sBAAS,KAAK,UAAU,IAAI,IAC5B;AAAA,EACN;AAAA,EAEQ,YAAY,MAAc;AAChC,eAAO,kBAAK,KAAK,UAAU,KAAK,oBAAoB,IAAI,CAAC;AAAA,EAC3D;AACF;",
|
|
6
|
+
"names": ["fs"]
|
|
7
|
+
}
|
|
@@ -1,40 +1,79 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var get_project_paths_exports = {};
|
|
30
|
+
__export(get_project_paths_exports, {
|
|
31
|
+
getProjectPaths: () => getProjectPaths
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(get_project_paths_exports);
|
|
34
|
+
var import_detect_framework = require("./detect-framework");
|
|
35
|
+
var import_frameworks = __toESM(require("@vercel/frameworks"));
|
|
9
36
|
const MAX_DEPTH_TRAVERSE = 3;
|
|
10
|
-
const getProjectPaths = async ({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
if (framework !== null)
|
|
23
|
-
allPaths.push(topPath);
|
|
24
|
-
if (depth > 1) {
|
|
25
|
-
const directoryContents = await fs.readdir(topPath);
|
|
26
|
-
const childDirectories = directoryContents.filter(stat => stat.type === 'dir' && !skipPaths?.includes(stat.path));
|
|
27
|
-
const paths = (await Promise.all(childDirectories.map(({ path }) => {
|
|
28
|
-
return (0, exports.getProjectPaths)({
|
|
29
|
-
fs,
|
|
30
|
-
path,
|
|
31
|
-
depth: depth - 1,
|
|
32
|
-
skipPaths,
|
|
33
|
-
});
|
|
34
|
-
}))).flat();
|
|
35
|
-
return [...paths, ...allPaths];
|
|
36
|
-
}
|
|
37
|
+
const getProjectPaths = async ({
|
|
38
|
+
fs,
|
|
39
|
+
path,
|
|
40
|
+
skipPaths,
|
|
41
|
+
depth = MAX_DEPTH_TRAVERSE
|
|
42
|
+
}) => {
|
|
43
|
+
if (depth === 0)
|
|
44
|
+
return [];
|
|
45
|
+
const allPaths = [];
|
|
46
|
+
const topPath = path ?? "./";
|
|
47
|
+
if (path && skipPaths?.includes(path)) {
|
|
37
48
|
return allPaths;
|
|
49
|
+
}
|
|
50
|
+
const framework = await (0, import_detect_framework.detectFramework)({
|
|
51
|
+
fs: fs.chdir(topPath),
|
|
52
|
+
frameworkList: import_frameworks.default
|
|
53
|
+
});
|
|
54
|
+
if (framework !== null)
|
|
55
|
+
allPaths.push(topPath);
|
|
56
|
+
if (depth > 1) {
|
|
57
|
+
const directoryContents = await fs.readdir(topPath);
|
|
58
|
+
const childDirectories = directoryContents.filter(
|
|
59
|
+
(stat) => stat.type === "dir" && !skipPaths?.includes(stat.path)
|
|
60
|
+
);
|
|
61
|
+
const paths = (await Promise.all(
|
|
62
|
+
childDirectories.map(({ path: path2 }) => {
|
|
63
|
+
return getProjectPaths({
|
|
64
|
+
fs,
|
|
65
|
+
path: path2,
|
|
66
|
+
depth: depth - 1,
|
|
67
|
+
skipPaths
|
|
68
|
+
});
|
|
69
|
+
})
|
|
70
|
+
)).flat();
|
|
71
|
+
return [...paths, ...allPaths];
|
|
72
|
+
}
|
|
73
|
+
return allPaths;
|
|
38
74
|
};
|
|
39
|
-
|
|
40
|
-
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
getProjectPaths
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=get-project-paths.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/get-project-paths.ts"],
|
|
4
|
+
"sourcesContent": ["import { detectFramework } from './detect-framework';\nimport { DetectorFilesystem } from './detectors/filesystem';\nimport frameworks from '@vercel/frameworks';\n\nconst MAX_DEPTH_TRAVERSE = 3;\n\nexport interface GetProjectPathsOptions {\n fs: DetectorFilesystem;\n path?: string;\n skipPaths?: string[];\n depth?: number;\n}\n\nexport type ProjectPath = string;\n\nexport const getProjectPaths = async ({\n fs,\n path,\n skipPaths,\n depth = MAX_DEPTH_TRAVERSE,\n}: GetProjectPathsOptions): Promise<ProjectPath[]> => {\n if (depth === 0) return [];\n\n const allPaths: Array<ProjectPath> = [];\n const topPath: string = path ?? './';\n\n if (path && skipPaths?.includes(path)) {\n return allPaths;\n }\n const framework = await detectFramework({\n fs: fs.chdir(topPath),\n frameworkList: frameworks,\n });\n\n if (framework !== null) allPaths.push(topPath);\n\n if (depth > 1) {\n const directoryContents = await fs.readdir(topPath);\n const childDirectories = directoryContents.filter(\n stat => stat.type === 'dir' && !skipPaths?.includes(stat.path)\n );\n\n const paths = (\n await Promise.all(\n childDirectories.map(({ path }) => {\n return getProjectPaths({\n fs,\n path,\n depth: depth - 1,\n skipPaths,\n });\n })\n )\n ).flat();\n\n return [...paths, ...allPaths];\n }\n\n return allPaths;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAgC;AAEhC,wBAAuB;AAEvB,MAAM,qBAAqB;AAWpB,MAAM,kBAAkB,OAAO;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAsD;AACpD,MAAI,UAAU;AAAG,WAAO,CAAC;AAEzB,QAAM,WAA+B,CAAC;AACtC,QAAM,UAAkB,QAAQ;AAEhC,MAAI,QAAQ,WAAW,SAAS,IAAI,GAAG;AACrC,WAAO;AAAA,EACT;AACA,QAAM,YAAY,UAAM,yCAAgB;AAAA,IACtC,IAAI,GAAG,MAAM,OAAO;AAAA,IACpB,eAAe,kBAAAA;AAAA,EACjB,CAAC;AAED,MAAI,cAAc;AAAM,aAAS,KAAK,OAAO;AAE7C,MAAI,QAAQ,GAAG;AACb,UAAM,oBAAoB,MAAM,GAAG,QAAQ,OAAO;AAClD,UAAM,mBAAmB,kBAAkB;AAAA,MACzC,UAAQ,KAAK,SAAS,SAAS,CAAC,WAAW,SAAS,KAAK,IAAI;AAAA,IAC/D;AAEA,UAAM,SACJ,MAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,CAAC,EAAE,MAAAC,MAAK,MAAM;AACjC,eAAO,gBAAgB;AAAA,UACrB;AAAA,UACA,MAAAA;AAAA,UACA,OAAO,QAAQ;AAAA,UACf;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,GACA,KAAK;AAEP,WAAO,CAAC,GAAG,OAAO,GAAG,QAAQ;AAAA,EAC/B;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": ["frameworks", "path"]
|
|
7
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,50 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
9
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
DetectorFilesystem: () => import_filesystem.DetectorFilesystem,
|
|
23
|
+
GetWorkspaceOptions: () => import_get_workspaces.GetWorkspaceOptions,
|
|
24
|
+
GetWorkspacePackagePathsOptions: () => import_get_workspace_package_paths.GetWorkspacePackagePathsOptions,
|
|
25
|
+
LocalFileSystemDetector: () => import_local_file_system_detector.LocalFileSystemDetector,
|
|
26
|
+
Workspace: () => import_get_workspaces.Workspace,
|
|
27
|
+
WorkspaceType: () => import_get_workspaces.WorkspaceType,
|
|
28
|
+
detectApiDirectory: () => import_detect_builders.detectApiDirectory,
|
|
29
|
+
detectApiExtensions: () => import_detect_builders.detectApiExtensions,
|
|
30
|
+
detectBuilders: () => import_detect_builders.detectBuilders,
|
|
31
|
+
detectFileSystemAPI: () => import_detect_file_system_api.detectFileSystemAPI,
|
|
32
|
+
detectFramework: () => import_detect_framework.detectFramework,
|
|
33
|
+
detectFrameworkRecord: () => import_detect_framework.detectFrameworkRecord,
|
|
34
|
+
detectFrameworkVersion: () => import_detect_framework.detectFrameworkVersion,
|
|
35
|
+
detectFrameworks: () => import_detect_framework.detectFrameworks,
|
|
36
|
+
detectOutputDirectory: () => import_detect_builders.detectOutputDirectory,
|
|
37
|
+
getProjectPaths: () => import_get_project_paths.getProjectPaths,
|
|
38
|
+
getWorkspacePackagePaths: () => import_get_workspace_package_paths.getWorkspacePackagePaths,
|
|
39
|
+
getWorkspaces: () => import_get_workspaces.getWorkspaces,
|
|
40
|
+
isOfficialRuntime: () => import_is_official_runtime.isOfficialRuntime,
|
|
41
|
+
isStaticRuntime: () => import_is_official_runtime.isStaticRuntime,
|
|
42
|
+
monorepoManagers: () => import_monorepo_managers.monorepoManagers,
|
|
43
|
+
packageManagers: () => import_package_managers.packageManagers,
|
|
44
|
+
workspaceManagers: () => import_workspace_managers.workspaceManagers
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(src_exports);
|
|
47
|
+
var import_detect_builders = require("./detect-builders");
|
|
48
|
+
var import_detect_file_system_api = require("./detect-file-system-api");
|
|
49
|
+
var import_detect_framework = require("./detect-framework");
|
|
50
|
+
var import_get_project_paths = require("./get-project-paths");
|
|
51
|
+
var import_filesystem = require("./detectors/filesystem");
|
|
52
|
+
var import_local_file_system_detector = require("./detectors/local-file-system-detector");
|
|
53
|
+
var import_workspace_managers = require("./workspaces/workspace-managers");
|
|
54
|
+
var import_get_workspaces = require("./workspaces/get-workspaces");
|
|
55
|
+
var import_get_workspace_package_paths = require("./workspaces/get-workspace-package-paths");
|
|
56
|
+
var import_monorepo_managers = require("./monorepos/monorepo-managers");
|
|
57
|
+
var import_is_official_runtime = require("./is-official-runtime");
|
|
58
|
+
var import_package_managers = require("./package-managers/package-managers");
|
|
59
|
+
__reExport(src_exports, require("./monorepos/get-monorepo-default-settings"), module.exports);
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
DetectorFilesystem,
|
|
63
|
+
GetWorkspaceOptions,
|
|
64
|
+
GetWorkspacePackagePathsOptions,
|
|
65
|
+
LocalFileSystemDetector,
|
|
66
|
+
Workspace,
|
|
67
|
+
WorkspaceType,
|
|
68
|
+
detectApiDirectory,
|
|
69
|
+
detectApiExtensions,
|
|
70
|
+
detectBuilders,
|
|
71
|
+
detectFileSystemAPI,
|
|
72
|
+
detectFramework,
|
|
73
|
+
detectFrameworkRecord,
|
|
74
|
+
detectFrameworkVersion,
|
|
75
|
+
detectFrameworks,
|
|
76
|
+
detectOutputDirectory,
|
|
77
|
+
getProjectPaths,
|
|
78
|
+
getWorkspacePackagePaths,
|
|
79
|
+
getWorkspaces,
|
|
80
|
+
isOfficialRuntime,
|
|
81
|
+
isStaticRuntime,
|
|
82
|
+
monorepoManagers,
|
|
83
|
+
packageManagers,
|
|
84
|
+
workspaceManagers,
|
|
85
|
+
...require("./monorepos/get-monorepo-default-settings")
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["export {\n detectBuilders,\n detectOutputDirectory,\n detectApiDirectory,\n detectApiExtensions,\n} from './detect-builders';\nexport { detectFileSystemAPI } from './detect-file-system-api';\nexport {\n detectFramework,\n detectFrameworks,\n detectFrameworkRecord,\n detectFrameworkVersion,\n} from './detect-framework';\nexport { getProjectPaths } from './get-project-paths';\nexport { DetectorFilesystem } from './detectors/filesystem';\nexport { LocalFileSystemDetector } from './detectors/local-file-system-detector';\nexport { workspaceManagers } from './workspaces/workspace-managers';\nexport {\n getWorkspaces,\n GetWorkspaceOptions,\n Workspace,\n WorkspaceType,\n} from './workspaces/get-workspaces';\nexport {\n getWorkspacePackagePaths,\n GetWorkspacePackagePathsOptions,\n} from './workspaces/get-workspace-package-paths';\nexport { monorepoManagers } from './monorepos/monorepo-managers';\nexport { isOfficialRuntime, isStaticRuntime } from './is-official-runtime';\nexport { packageManagers } from './package-managers/package-managers';\nexport * from './monorepos/get-monorepo-default-settings';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAKO;AACP,oCAAoC;AACpC,8BAKO;AACP,+BAAgC;AAChC,wBAAmC;AACnC,wCAAwC;AACxC,gCAAkC;AAClC,4BAKO;AACP,yCAGO;AACP,+BAAiC;AACjC,iCAAmD;AACnD,8BAAgC;AAChC,wBAAc,sDA9Bd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var is_official_runtime_exports = {};
|
|
20
|
+
__export(is_official_runtime_exports, {
|
|
21
|
+
isOfficialRuntime: () => isOfficialRuntime,
|
|
22
|
+
isStaticRuntime: () => isStaticRuntime
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(is_official_runtime_exports);
|
|
7
25
|
const isOfficialRuntime = (desired, name) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
name === `@now/${desired}` ||
|
|
13
|
-
name.startsWith(`@vercel/${desired}@`) ||
|
|
14
|
-
name.startsWith(`@now/${desired}@`));
|
|
26
|
+
if (typeof name !== "string") {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return name === `@vercel/${desired}` || name === `@now/${desired}` || name.startsWith(`@vercel/${desired}@`) || name.startsWith(`@now/${desired}@`);
|
|
15
30
|
};
|
|
16
|
-
exports.isOfficialRuntime = isOfficialRuntime;
|
|
17
|
-
/*
|
|
18
|
-
* Helper function to detect both `@vercel/static` and legacy `@now/static` official Runtimes.
|
|
19
|
-
*/
|
|
20
31
|
const isStaticRuntime = (name) => {
|
|
21
|
-
|
|
32
|
+
return isOfficialRuntime("static", name);
|
|
22
33
|
};
|
|
23
|
-
|
|
24
|
-
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
isOfficialRuntime,
|
|
37
|
+
isStaticRuntime
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=is-official-runtime.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/is-official-runtime.ts"],
|
|
4
|
+
"sourcesContent": ["/*\n * Helper function to support both `@vercel` and legacy `@now` official Runtimes.\n */\nexport const isOfficialRuntime = (desired: string, name?: string): boolean => {\n if (typeof name !== 'string') {\n return false;\n }\n return (\n name === `@vercel/${desired}` ||\n name === `@now/${desired}` ||\n name.startsWith(`@vercel/${desired}@`) ||\n name.startsWith(`@now/${desired}@`)\n );\n};\n\n/*\n * Helper function to detect both `@vercel/static` and legacy `@now/static` official Runtimes.\n */\nexport const isStaticRuntime = (name?: string): boolean => {\n return isOfficialRuntime('static', name);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,oBAAoB,CAAC,SAAiB,SAA2B;AAC5E,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AACA,SACE,SAAS,WAAW,OAAO,MAC3B,SAAS,QAAQ,OAAO,MACxB,KAAK,WAAW,WAAW,OAAO,GAAG,KACrC,KAAK,WAAW,QAAQ,OAAO,GAAG;AAEtC;AAKO,MAAM,kBAAkB,CAAC,SAA2B;AACzD,SAAO,kBAAkB,UAAU,IAAI;AACzC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|