@slicemachine/init 0.1.1-dev-plugins-m2.2 → 0.1.1-dev-plugins-m3.0
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/bin/slicemachine-init.js +0 -0
- package/dist/SliceMachineInitProcess.cjs +1 -1
- package/dist/SliceMachineInitProcess.js +1 -1
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs.map +1 -1
- package/dist/_node_modules/@babel/code-frame/lib/index.js.map +1 -1
- package/dist/_node_modules/minimist-options/_node_modules/is-plain-obj/index.cjs.map +1 -0
- package/dist/_node_modules/minimist-options/_node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/_node_modules/minimist-options/index.cjs +1 -1
- package/dist/_node_modules/minimist-options/index.js +1 -1
- package/dist/lib/framework.cjs +14 -1
- package/dist/lib/framework.cjs.map +1 -1
- package/dist/lib/framework.js +14 -1
- package/dist/lib/framework.js.map +1 -1
- package/dist/{_node_modules → packages/init/_node_modules}/globby/ignore.cjs +6 -5
- package/dist/packages/init/_node_modules/globby/ignore.cjs.map +1 -0
- package/dist/{_node_modules → packages/init/_node_modules}/globby/ignore.js +6 -5
- package/dist/packages/init/_node_modules/globby/ignore.js.map +1 -0
- package/dist/{_node_modules → packages/init/_node_modules}/globby/index.cjs +5 -5
- package/dist/packages/init/_node_modules/globby/index.cjs.map +1 -0
- package/dist/{_node_modules → packages/init/_node_modules}/globby/index.js +5 -5
- package/dist/packages/init/_node_modules/globby/index.js.map +1 -0
- package/dist/packages/init/package.json.cjs +5 -5
- package/dist/packages/init/package.json.js +5 -5
- package/package.json +5 -5
- package/src/lib/framework.ts +14 -1
- package/dist/_node_modules/globby/ignore.cjs.map +0 -1
- package/dist/_node_modules/globby/ignore.js.map +0 -1
- package/dist/_node_modules/globby/index.cjs.map +0 -1
- package/dist/_node_modules/globby/index.js.map +0 -1
- package/dist/_node_modules/is-plain-obj/index.cjs.map +0 -1
- package/dist/_node_modules/is-plain-obj/index.js.map +0 -1
- /package/dist/_node_modules/{is-plain-obj → minimist-options/_node_modules/is-plain-obj}/index.cjs +0 -0
- /package/dist/_node_modules/{is-plain-obj → minimist-options/_node_modules/is-plain-obj}/index.js +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/globby/utilities.cjs +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/globby/utilities.cjs.map +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/globby/utilities.js +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/globby/utilities.js.map +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/slash/index.cjs +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/slash/index.cjs.map +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/slash/index.js +0 -0
- /package/dist/{_node_modules → packages/init/_node_modules}/slash/index.js.map +0 -0
package/bin/slicemachine-init.js
CHANGED
|
File without changes
|
|
@@ -11,7 +11,7 @@ const path = require("node:path");
|
|
|
11
11
|
const chalk = require("chalk");
|
|
12
12
|
const open = require("open");
|
|
13
13
|
const logSymbols = require("log-symbols");
|
|
14
|
-
const index = require('./_node_modules/globby/index.cjs');
|
|
14
|
+
const index = require('./packages/init/_node_modules/globby/index.cjs');
|
|
15
15
|
const manager = require("@slicemachine/manager");
|
|
16
16
|
const _package = require("./packages/init/package.json.cjs");
|
|
17
17
|
const framework = require("./lib/framework.cjs");
|
|
@@ -9,7 +9,7 @@ import * as path from "node:path";
|
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
import open from "open";
|
|
11
11
|
import logSymbols from "log-symbols";
|
|
12
|
-
import { globby } from './_node_modules/globby/index.js';
|
|
12
|
+
import { globby } from './packages/init/_node_modules/globby/index.js';
|
|
13
13
|
import { createSliceMachineManager } from "@slicemachine/manager";
|
|
14
14
|
import pkg from "./packages/init/package.json.js";
|
|
15
15
|
import { detectFramework } from "./lib/framework.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@babel/code-frame/lib/index.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@babel/code-frame/lib/index.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\nvar _highlight = require(\"@babel/highlight\");\nlet deprecationWarningShown = false;\nfunction getDefs(chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold\n };\n}\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);\n const chalk = (0, _highlight.getChalk)(opts);\n const defs = getDefs(chalk);\n const maybeHighlight = (chalkFn, string) => {\n return highlighted ? chalkFn(string) : string;\n };\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n\n//# sourceMappingURL=index.js.map\n"],"names":["lib","require$$0","index"],"mappings":";;;;AAEA,OAAO,eAAeA,MAAO,WAAE,cAAc;AAAA,EAC3C,OAAO;AACT,CAAC;AACuBA,MAAA,UAAA,mBAAG;AACZA,MAAA,UAAA,UAAG;AAClB,IAAI,aAAaC,QAAAA;AACjB,IAAI,0BAA0B;AAC9B,SAAS,QAAQ,OAAO;AACtB,SAAO;AAAA,IACL,QAAQ,MAAM;AAAA,IACd,QAAQ,MAAM,IAAI;AAAA,IAClB,SAAS,MAAM,IAAI;AAAA,EACvB;AACA;AACA,MAAM,UAAU;AAChB,SAAS,eAAe,KAAK,QAAQ,MAAM;AACzC,QAAM,WAAW,OAAO,OAAO;AAAA,IAC7B,QAAQ;AAAA,IACR,MAAM;AAAA,EACV,GAAK,IAAI,KAAK;AACZ,QAAM,SAAS,OAAO,OAAO,CAAE,GAAE,UAAU,IAAI,GAAG;AAClD,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,EACjB,IAAM,QAAQ,CAAA;AACZ,QAAM,YAAY,SAAS;AAC3B,QAAM,cAAc,SAAS;AAC7B,QAAM,UAAU,OAAO;AACvB,QAAM,YAAY,OAAO;AACzB,MAAI,QAAQ,KAAK,IAAI,aAAa,aAAa,IAAI,CAAC;AACpD,MAAI,MAAM,KAAK,IAAI,OAAO,QAAQ,UAAU,UAAU;AACtD,MAAI,cAAc,IAAI;AACpB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AAAA,IACjF;AAAA,EACL,CAAG,EAAE,KAAK,IAAI;AACZ,MAAI,KAAK,WAAW,CAAC,YAAY;AAC/B,YAAQ,GAAG,IAAI,OAAO,iBAAiB,CAAC,IAAI,KAAK;AAAA,EAAY;AAAA,EAC9D;AACD,MAAI,aAAa;AACf,WAAO,MAAM,MAAM,KAAK;AAAA,EAC5B,OAAS;AACL,WAAO;AAAA,EACR;AACH;AACA,SAAS,SAAS,UAAU,YAAY,WAAW,OAAO,CAAA,GAAI;AAC5D,MAAI,CAAC,yBAAyB;AAC5B,8BAA0B;AAC1B,UAAM,UAAU;AAChB,QAAI,QAAQ,aAAa;AACvB,cAAQ,YAAY,SAAS,oBAAoB;AAAA,IACvD,OAAW;AACL,YAAM,mBAAmB,IAAI,MAAM,OAAO;AAC1C,uBAAiB,OAAO;AACxB,cAAQ,KAAK,IAAI,MAAM,OAAO,CAAC;AAAA,IAChC;AAAA,EACF;AACD,cAAY,KAAK,IAAI,WAAW,CAAC;AACjC,QAAM,WAAW;AAAA,IACf,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,IACP;AAAA,EACL;AACE,SAAO,iBAAiB,UAAU,UAAU,IAAI;AAClD;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@babel/code-frame/lib/index.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@babel/code-frame/lib/index.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\nvar _highlight = require(\"@babel/highlight\");\nlet deprecationWarningShown = false;\nfunction getDefs(chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold\n };\n}\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);\n const chalk = (0, _highlight.getChalk)(opts);\n const defs = getDefs(chalk);\n const maybeHighlight = (chalkFn, string) => {\n return highlighted ? chalkFn(string) : string;\n };\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n\n//# sourceMappingURL=index.js.map\n"],"names":["require$$0"],"mappings":";;;AAEA,OAAO,eAAe,KAAS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L,YAAM,mBAAmB,IAAI,MAAM,OAAO;AAC1C,uBAAiB,OAAO;AACxB,cAAQ,KAAK,IAAI,MAAM,OAAO,CAAC;AAAA,IAChC;AAAA,EACF;AACD,cAAY,KAAK,IAAI,WAAW,CAAC;AACjC,QAAM,WAAW;AAAA,IACf,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,IACP;AAAA,EACL;AACE,SAAO,iBAAiB,UAAU,UAAU,IAAI;AAClD;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/minimist-options/node_modules/is-plain-obj/index.js"],"sourcesContent":["'use strict';\nvar toString = Object.prototype.toString;\n\nmodule.exports = function (x) {\n\tvar prototype;\n\treturn toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));\n};\n"],"names":[],"mappings":";AACA,IAAI,WAAW,OAAO,UAAU;IAEhC,aAAiB,SAAU,GAAG;AAC7B,MAAI;AACJ,SAAO,SAAS,KAAK,CAAC,MAAM,sBAAsB,YAAY,OAAO,eAAe,CAAC,GAAG,cAAc,QAAQ,cAAc,OAAO,eAAe,CAAE,CAAA;AACrJ;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/minimist-options/node_modules/is-plain-obj/index.js"],"sourcesContent":["'use strict';\nvar toString = Object.prototype.toString;\n\nmodule.exports = function (x) {\n\tvar prototype;\n\treturn toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));\n};\n"],"names":[],"mappings":"AACA,IAAI,WAAW,OAAO,UAAU;IAEhC,aAAiB,SAAU,GAAG;AAC7B,MAAI;AACJ,SAAO,SAAS,KAAK,CAAC,MAAM,sBAAsB,YAAY,OAAO,eAAe,CAAC,GAAG,cAAc,QAAQ,cAAc,OAAO,eAAe,CAAE,CAAA;AACrJ;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const index = require("../../_virtual/index2.cjs");
|
|
3
|
-
const index$1 = require(
|
|
3
|
+
const index$1 = require('./_node_modules/is-plain-obj/index.cjs');
|
|
4
4
|
const index$2 = require("../arrify/index.cjs");
|
|
5
5
|
const index$3 = require("../kind-of/index.cjs");
|
|
6
6
|
const isPlainObject = index$1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { exports as minimistOptionsExports, __module as minimistOptions } from "../../_virtual/index2.js";
|
|
2
|
-
import isPlainObj from
|
|
2
|
+
import isPlainObj from './_node_modules/is-plain-obj/index.js';
|
|
3
3
|
import arrify$1 from "../arrify/index.js";
|
|
4
4
|
import kindOf$1 from "../kind-of/index.js";
|
|
5
5
|
const isPlainObject = isPlainObj;
|
package/dist/lib/framework.cjs
CHANGED
|
@@ -11,10 +11,23 @@ const FRAMEWORKS = {
|
|
|
11
11
|
name: "Nuxt 2",
|
|
12
12
|
prismicName: "nuxt-2",
|
|
13
13
|
prismicDocumentation: "https://prismic.dev/init/nuxt-2",
|
|
14
|
-
adapterName: "@slicemachine/adapter-
|
|
14
|
+
adapterName: "@slicemachine/adapter-nuxt2",
|
|
15
15
|
compatibility: {
|
|
16
16
|
nuxt: "^2.0.0"
|
|
17
17
|
},
|
|
18
|
+
devDependencies: {
|
|
19
|
+
...DEFAULT_DEV_DEPENDENCIES,
|
|
20
|
+
"@slicemachine/adapter-nuxt2": "latest"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"nuxt-3": {
|
|
24
|
+
name: "Nuxt 3",
|
|
25
|
+
prismicName: "nuxt-3",
|
|
26
|
+
prismicDocumentation: "https://prismic.dev/init/nuxt-3",
|
|
27
|
+
adapterName: "@slicemachine/adapter-nuxt",
|
|
28
|
+
compatibility: {
|
|
29
|
+
nuxt: "^3.0.0"
|
|
30
|
+
},
|
|
18
31
|
devDependencies: {
|
|
19
32
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
20
33
|
"@slicemachine/adapter-nuxt": "latest"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.cjs","sources":["../../../src/lib/framework.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport semver from \"semver\";\n\nexport type Framework = {\n\t/**\n\t * Framework's human readable name.\n\t */\n\tname: string;\n\n\t/**\n\t * Framework's name sent to Prismic\n\t */\n\tprismicName: string;\n\n\t/**\n\t * A link to the Prismic documentation for the framework\n\t */\n\tprismicDocumentation: string;\n\n\t/**\n\t * Package name of the adapter responsible for this framework\n\t */\n\tadapterName: string;\n\n\t/**\n\t * A package name/semver range map defining framework compatibility\n\t * requirements.\n\t *\n\t * Project should match all entries to be considered compatible.\n\t */\n\tcompatibility: Record<string, string>;\n\n\t/**\n\t * A package name/semver range map defining development dependencies to be\n\t * installed. Typically Slice Machine and the framework's adapter.\n\t *\n\t * @remarks\n\t * Dependencies required to work with the framework (e.g. `@prismicio/next`\n\t * for Next.js) should not be defined here. Those are to be defined by the\n\t * adapter.\n\t */\n\tdevDependencies: Record<string, string>;\n};\n\nconst DEFAULT_DEV_DEPENDENCIES: Record<string, string> = {\n\t\"slice-machine-ui\": \"<1.0.0\",\n};\n\n/**\n * Frameworks we support, orders shouldn't matter much but is respected (the\n * higher it is the more priority it has in case multiple matches)\n */\nexport const FRAMEWORKS: Record<string, Framework> = {\n\t\"nuxt-2\": {\n\t\tname: \"Nuxt 2\",\n\t\tprismicName: \"nuxt-2\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-2\",\n\t\tadapterName: \"@slicemachine/adapter-
|
|
1
|
+
{"version":3,"file":"framework.cjs","sources":["../../../src/lib/framework.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport semver from \"semver\";\n\nexport type Framework = {\n\t/**\n\t * Framework's human readable name.\n\t */\n\tname: string;\n\n\t/**\n\t * Framework's name sent to Prismic\n\t */\n\tprismicName: string;\n\n\t/**\n\t * A link to the Prismic documentation for the framework\n\t */\n\tprismicDocumentation: string;\n\n\t/**\n\t * Package name of the adapter responsible for this framework\n\t */\n\tadapterName: string;\n\n\t/**\n\t * A package name/semver range map defining framework compatibility\n\t * requirements.\n\t *\n\t * Project should match all entries to be considered compatible.\n\t */\n\tcompatibility: Record<string, string>;\n\n\t/**\n\t * A package name/semver range map defining development dependencies to be\n\t * installed. Typically Slice Machine and the framework's adapter.\n\t *\n\t * @remarks\n\t * Dependencies required to work with the framework (e.g. `@prismicio/next`\n\t * for Next.js) should not be defined here. Those are to be defined by the\n\t * adapter.\n\t */\n\tdevDependencies: Record<string, string>;\n};\n\nconst DEFAULT_DEV_DEPENDENCIES: Record<string, string> = {\n\t\"slice-machine-ui\": \"<1.0.0\",\n};\n\n/**\n * Frameworks we support, orders shouldn't matter much but is respected (the\n * higher it is the more priority it has in case multiple matches)\n */\nexport const FRAMEWORKS: Record<string, Framework> = {\n\t\"nuxt-2\": {\n\t\tname: \"Nuxt 2\",\n\t\tprismicName: \"nuxt-2\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-2\",\n\t\tadapterName: \"@slicemachine/adapter-nuxt2\",\n\t\tcompatibility: {\n\t\t\tnuxt: \"^2.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-nuxt2\": \"latest\",\n\t\t},\n\t},\n\t\"nuxt-3\": {\n\t\tname: \"Nuxt 3\",\n\t\tprismicName: \"nuxt-3\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-3\",\n\t\tadapterName: \"@slicemachine/adapter-nuxt\",\n\t\tcompatibility: {\n\t\t\tnuxt: \"^3.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-nuxt\": \"latest\",\n\t\t},\n\t},\n\t\"next-11-13\": {\n\t\tname: \"Next.js 11-13\",\n\t\tprismicName: \"next-11-13\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/next-11-13\",\n\t\tadapterName: \"@slicemachine/adapter-next\",\n\t\tcompatibility: {\n\t\t\tnext: \"^11.0.0 || ^12.0.0 || ^13.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-next\": \"latest\",\n\t\t},\n\t},\n} as const;\n\n/**\n * Universal package used when framework is not supported.\n */\nexport const UNIVERSAL: Framework = {\n\tname: \"universal (no framework)\",\n\tprismicName: \"universal\",\n\tprismicDocumentation: \"https://prismic.dev/init/universal\",\n\tadapterName: \"@slicemachine/adapter-universal\",\n\tcompatibility: {},\n\tdevDependencies: {\n\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\"@slicemachine/adapter-universal\": \"latest\",\n\t},\n};\n\nexport const detectFramework = async (cwd: string): Promise<Framework> => {\n\tconst path = join(cwd, \"package.json\");\n\n\tlet allDependencies: Record<string, string>;\n\ttry {\n\t\tconst pkg = JSON.parse(await readFile(path, \"utf-8\"));\n\n\t\tallDependencies = {\n\t\t\t...pkg.dependencies,\n\t\t\t...pkg.devDependencies,\n\t\t};\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Failed to read project's \\`package.json\\` at \\`${path}\\``,\n\t\t\t{ cause: error },\n\t\t);\n\t}\n\n\treturn (\n\t\tObject.values(FRAMEWORKS).find((framework) => {\n\t\t\treturn Object.entries(framework.compatibility).every(([pkg, range]) => {\n\t\t\t\tif (pkg in allDependencies) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Determine lowest version possibly in use\n\t\t\t\t\t\tconst minimumVersion = semver.minVersion(allDependencies[pkg]);\n\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\treturn semver.satisfies(minimumVersion!, range);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// We assume unconventional tags, `latest`, `beta`, `dev` matches the framework\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}) || UNIVERSAL\n\t);\n};\n"],"names":["path","join","readFile"],"mappings":";;;;;AA8CA,MAAM,2BAAmD;AAAA,EACxD,oBAAoB;;AAOd,MAAM,aAAwC;AAAA,EACpD,UAAU;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,eAAe;AAAA,MACd,MAAM;AAAA,IACN;AAAA,IACD,iBAAiB;AAAA,MAChB,GAAG;AAAA,MACH,+BAA+B;AAAA,IAC/B;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,eAAe;AAAA,MACd,MAAM;AAAA,IACN;AAAA,IACD,iBAAiB;AAAA,MAChB,GAAG;AAAA,MACH,8BAA8B;AAAA,IAC9B;AAAA,EACD;AAAA,EACD,cAAc;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,eAAe;AAAA,MACd,MAAM;AAAA,IACN;AAAA,IACD,iBAAiB;AAAA,MAChB,GAAG;AAAA,MACH,8BAA8B;AAAA,IAC9B;AAAA,EACD;;AAMK,MAAM,YAAuB;AAAA,EACnC,MAAM;AAAA,EACN,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,eAAe,CAAE;AAAA,EACjB,iBAAiB;AAAA,IAChB,GAAG;AAAA,IACH,mCAAmC;AAAA,EACnC;;AAGW,MAAA,kBAAkB,OAAO,QAAmC;AAClE,QAAAA,SAAOC,KAAAA,KAAK,KAAK,cAAc;AAEjC,MAAA;AACA,MAAA;AACH,UAAM,MAAM,KAAK,MAAM,MAAMC,GAAAA,SAASF,QAAM,OAAO,CAAC;AAElC,sBAAA;AAAA,MACjB,GAAG,IAAI;AAAA,MACP,GAAG,IAAI;AAAA,IAAA;AAAA,WAEA;AACR,UAAM,IAAI,MACT,kDAAkDA,YAClD,EAAE,OAAO,OAAO;AAAA,EAEjB;AAED,SACC,OAAO,OAAO,UAAU,EAAE,KAAK,CAAC,cAAa;AACrC,WAAA,OAAO,QAAQ,UAAU,aAAa,EAAE,MAAM,CAAC,CAAC,KAAK,KAAK,MAAK;AACrE,UAAI,OAAO,iBAAiB;AACvB,YAAA;AAEH,gBAAM,iBAAiB,OAAO,WAAW,gBAAgB,GAAG,CAAC;AAGtD,iBAAA,OAAO,UAAU,gBAAiB,KAAK;AAAA,iBACtC;AAED,iBAAA;AAAA,QACP;AAAA,MACD;AAEM,aAAA;AAAA,IAAA,CACP;AAAA,EACD,CAAA,KAAK;AAER;;;;"}
|
package/dist/lib/framework.js
CHANGED
|
@@ -9,10 +9,23 @@ const FRAMEWORKS = {
|
|
|
9
9
|
name: "Nuxt 2",
|
|
10
10
|
prismicName: "nuxt-2",
|
|
11
11
|
prismicDocumentation: "https://prismic.dev/init/nuxt-2",
|
|
12
|
-
adapterName: "@slicemachine/adapter-
|
|
12
|
+
adapterName: "@slicemachine/adapter-nuxt2",
|
|
13
13
|
compatibility: {
|
|
14
14
|
nuxt: "^2.0.0"
|
|
15
15
|
},
|
|
16
|
+
devDependencies: {
|
|
17
|
+
...DEFAULT_DEV_DEPENDENCIES,
|
|
18
|
+
"@slicemachine/adapter-nuxt2": "latest"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"nuxt-3": {
|
|
22
|
+
name: "Nuxt 3",
|
|
23
|
+
prismicName: "nuxt-3",
|
|
24
|
+
prismicDocumentation: "https://prismic.dev/init/nuxt-3",
|
|
25
|
+
adapterName: "@slicemachine/adapter-nuxt",
|
|
26
|
+
compatibility: {
|
|
27
|
+
nuxt: "^3.0.0"
|
|
28
|
+
},
|
|
16
29
|
devDependencies: {
|
|
17
30
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
18
31
|
"@slicemachine/adapter-nuxt": "latest"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.js","sources":["../../../src/lib/framework.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport semver from \"semver\";\n\nexport type Framework = {\n\t/**\n\t * Framework's human readable name.\n\t */\n\tname: string;\n\n\t/**\n\t * Framework's name sent to Prismic\n\t */\n\tprismicName: string;\n\n\t/**\n\t * A link to the Prismic documentation for the framework\n\t */\n\tprismicDocumentation: string;\n\n\t/**\n\t * Package name of the adapter responsible for this framework\n\t */\n\tadapterName: string;\n\n\t/**\n\t * A package name/semver range map defining framework compatibility\n\t * requirements.\n\t *\n\t * Project should match all entries to be considered compatible.\n\t */\n\tcompatibility: Record<string, string>;\n\n\t/**\n\t * A package name/semver range map defining development dependencies to be\n\t * installed. Typically Slice Machine and the framework's adapter.\n\t *\n\t * @remarks\n\t * Dependencies required to work with the framework (e.g. `@prismicio/next`\n\t * for Next.js) should not be defined here. Those are to be defined by the\n\t * adapter.\n\t */\n\tdevDependencies: Record<string, string>;\n};\n\nconst DEFAULT_DEV_DEPENDENCIES: Record<string, string> = {\n\t\"slice-machine-ui\": \"<1.0.0\",\n};\n\n/**\n * Frameworks we support, orders shouldn't matter much but is respected (the\n * higher it is the more priority it has in case multiple matches)\n */\nexport const FRAMEWORKS: Record<string, Framework> = {\n\t\"nuxt-2\": {\n\t\tname: \"Nuxt 2\",\n\t\tprismicName: \"nuxt-2\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-2\",\n\t\tadapterName: \"@slicemachine/adapter-
|
|
1
|
+
{"version":3,"file":"framework.js","sources":["../../../src/lib/framework.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nimport semver from \"semver\";\n\nexport type Framework = {\n\t/**\n\t * Framework's human readable name.\n\t */\n\tname: string;\n\n\t/**\n\t * Framework's name sent to Prismic\n\t */\n\tprismicName: string;\n\n\t/**\n\t * A link to the Prismic documentation for the framework\n\t */\n\tprismicDocumentation: string;\n\n\t/**\n\t * Package name of the adapter responsible for this framework\n\t */\n\tadapterName: string;\n\n\t/**\n\t * A package name/semver range map defining framework compatibility\n\t * requirements.\n\t *\n\t * Project should match all entries to be considered compatible.\n\t */\n\tcompatibility: Record<string, string>;\n\n\t/**\n\t * A package name/semver range map defining development dependencies to be\n\t * installed. Typically Slice Machine and the framework's adapter.\n\t *\n\t * @remarks\n\t * Dependencies required to work with the framework (e.g. `@prismicio/next`\n\t * for Next.js) should not be defined here. Those are to be defined by the\n\t * adapter.\n\t */\n\tdevDependencies: Record<string, string>;\n};\n\nconst DEFAULT_DEV_DEPENDENCIES: Record<string, string> = {\n\t\"slice-machine-ui\": \"<1.0.0\",\n};\n\n/**\n * Frameworks we support, orders shouldn't matter much but is respected (the\n * higher it is the more priority it has in case multiple matches)\n */\nexport const FRAMEWORKS: Record<string, Framework> = {\n\t\"nuxt-2\": {\n\t\tname: \"Nuxt 2\",\n\t\tprismicName: \"nuxt-2\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-2\",\n\t\tadapterName: \"@slicemachine/adapter-nuxt2\",\n\t\tcompatibility: {\n\t\t\tnuxt: \"^2.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-nuxt2\": \"latest\",\n\t\t},\n\t},\n\t\"nuxt-3\": {\n\t\tname: \"Nuxt 3\",\n\t\tprismicName: \"nuxt-3\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/nuxt-3\",\n\t\tadapterName: \"@slicemachine/adapter-nuxt\",\n\t\tcompatibility: {\n\t\t\tnuxt: \"^3.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-nuxt\": \"latest\",\n\t\t},\n\t},\n\t\"next-11-13\": {\n\t\tname: \"Next.js 11-13\",\n\t\tprismicName: \"next-11-13\",\n\t\tprismicDocumentation: \"https://prismic.dev/init/next-11-13\",\n\t\tadapterName: \"@slicemachine/adapter-next\",\n\t\tcompatibility: {\n\t\t\tnext: \"^11.0.0 || ^12.0.0 || ^13.0.0\",\n\t\t},\n\t\tdevDependencies: {\n\t\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\t\"@slicemachine/adapter-next\": \"latest\",\n\t\t},\n\t},\n} as const;\n\n/**\n * Universal package used when framework is not supported.\n */\nexport const UNIVERSAL: Framework = {\n\tname: \"universal (no framework)\",\n\tprismicName: \"universal\",\n\tprismicDocumentation: \"https://prismic.dev/init/universal\",\n\tadapterName: \"@slicemachine/adapter-universal\",\n\tcompatibility: {},\n\tdevDependencies: {\n\t\t...DEFAULT_DEV_DEPENDENCIES,\n\t\t\"@slicemachine/adapter-universal\": \"latest\",\n\t},\n};\n\nexport const detectFramework = async (cwd: string): Promise<Framework> => {\n\tconst path = join(cwd, \"package.json\");\n\n\tlet allDependencies: Record<string, string>;\n\ttry {\n\t\tconst pkg = JSON.parse(await readFile(path, \"utf-8\"));\n\n\t\tallDependencies = {\n\t\t\t...pkg.dependencies,\n\t\t\t...pkg.devDependencies,\n\t\t};\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Failed to read project's \\`package.json\\` at \\`${path}\\``,\n\t\t\t{ cause: error },\n\t\t);\n\t}\n\n\treturn (\n\t\tObject.values(FRAMEWORKS).find((framework) => {\n\t\t\treturn Object.entries(framework.compatibility).every(([pkg, range]) => {\n\t\t\t\tif (pkg in allDependencies) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Determine lowest version possibly in use\n\t\t\t\t\t\tconst minimumVersion = semver.minVersion(allDependencies[pkg]);\n\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\treturn semver.satisfies(minimumVersion!, range);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// We assume unconventional tags, `latest`, `beta`, `dev` matches the framework\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}) || UNIVERSAL\n\t);\n};\n"],"names":[],"mappings":";;;AA8CA,MAAM,2BAAmD;AAAA,EACxD,oBAAoB;;AAOd,MAAM,aAAwC;AAAA,EACpD,UAAU;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,eAAe;AAAA,MACd,MAAM;AAAA,IACN;AAAA,IACD,iBAAiB;AAAA,MAChB,GAAG;AAAA,MACH,+BAA+B;AAAA,IAC/B;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,eAAe;AAAA,MACd,MAAM;AAAA,IACN;AAAA,IACD,iBAAiB;AAAA,MAChB,GAAG;AAAA,MACH,8BAA8B;AAAA,IAC9B;AAAA,EACD;AAAA,EACD,cAAc;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,eAAe;AAAA,MACd,MAAM;AAAA,IACN;AAAA,IACD,iBAAiB;AAAA,MAChB,GAAG;AAAA,MACH,8BAA8B;AAAA,IAC9B;AAAA,EACD;;AAMK,MAAM,YAAuB;AAAA,EACnC,MAAM;AAAA,EACN,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,eAAe,CAAE;AAAA,EACjB,iBAAiB;AAAA,IAChB,GAAG;AAAA,IACH,mCAAmC;AAAA,EACnC;;AAGW,MAAA,kBAAkB,OAAO,QAAmC;AAClE,QAAA,OAAO,KAAK,KAAK,cAAc;AAEjC,MAAA;AACA,MAAA;AACH,UAAM,MAAM,KAAK,MAAM,MAAM,SAAS,MAAM,OAAO,CAAC;AAElC,sBAAA;AAAA,MACjB,GAAG,IAAI;AAAA,MACP,GAAG,IAAI;AAAA,IAAA;AAAA,WAEA;AACR,UAAM,IAAI,MACT,kDAAkD,UAClD,EAAE,OAAO,OAAO;AAAA,EAEjB;AAED,SACC,OAAO,OAAO,UAAU,EAAE,KAAK,CAAC,cAAa;AACrC,WAAA,OAAO,QAAQ,UAAU,aAAa,EAAE,MAAM,CAAC,CAAC,KAAK,KAAK,MAAK;AACrE,UAAI,OAAO,iBAAiB;AACvB,YAAA;AAEH,gBAAM,iBAAiB,OAAO,WAAW,gBAAgB,GAAG,CAAC;AAGtD,iBAAA,OAAO,UAAU,gBAAiB,KAAK;AAAA,iBACtC;AAED,iBAAA;AAAA,QACP;AAAA,MACD;AAEM,aAAA;AAAA,IAAA,CACP;AAAA,EACD,CAAA,KAAK;AAER;"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const process = require("node:process");
|
|
4
4
|
const fs = require("node:fs");
|
|
5
5
|
const path = require("node:path");
|
|
6
|
-
const index = require(
|
|
7
|
-
const index$1 = require(
|
|
6
|
+
const index = require('./../../../../_node_modules/fast-glob/out/index.cjs');
|
|
7
|
+
const index$1 = require('./../../../../_node_modules/ignore/index.cjs');
|
|
8
8
|
const index$2 = require("../slash/index.cjs");
|
|
9
9
|
const utilities = require("./utilities.cjs");
|
|
10
10
|
const ignoreFilesGlobOptions = {
|
|
@@ -43,11 +43,12 @@ const getIsIgnoredPredicate = (files, cwd) => {
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
const normalizeOptions = (options = {}) => ({
|
|
46
|
-
cwd: utilities.toPath(options.cwd) || process.cwd()
|
|
46
|
+
cwd: utilities.toPath(options.cwd) || process.cwd(),
|
|
47
|
+
suppressErrors: Boolean(options.suppressErrors)
|
|
47
48
|
});
|
|
48
49
|
const isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
49
|
-
const { cwd } = normalizeOptions(options);
|
|
50
|
-
const paths = await index(patterns, { cwd, ...ignoreFilesGlobOptions });
|
|
50
|
+
const { cwd, suppressErrors } = normalizeOptions(options);
|
|
51
|
+
const paths = await index(patterns, { cwd, suppressErrors, ...ignoreFilesGlobOptions });
|
|
51
52
|
const files = await Promise.all(
|
|
52
53
|
paths.map(async (filePath) => ({
|
|
53
54
|
filePath,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.cjs","sources":["../../../../../node_modules/globby/ignore.js"],"sourcesContent":["import process from 'node:process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport fastGlob from 'fast-glob';\nimport gitIgnore from 'ignore';\nimport slash from 'slash';\nimport {toPath, isNegativePattern} from './utilities.js';\n\nconst ignoreFilesGlobOptions = {\n\tignore: [\n\t\t'**/node_modules',\n\t\t'**/flow-typed',\n\t\t'**/coverage',\n\t\t'**/.git',\n\t],\n\tabsolute: true,\n\tdot: true,\n};\n\nexport const GITIGNORE_FILES_PATTERN = '**/.gitignore';\n\nconst applyBaseToPattern = (pattern, base) => isNegativePattern(pattern)\n\t? '!' + path.posix.join(base, pattern.slice(1))\n\t: path.posix.join(base, pattern);\n\nconst parseIgnoreFile = (file, cwd) => {\n\tconst base = slash(path.relative(cwd, path.dirname(file.filePath)));\n\n\treturn file.content\n\t\t.split(/\\r?\\n/)\n\t\t.filter(line => line && !line.startsWith('#'))\n\t\t.map(pattern => applyBaseToPattern(pattern, base));\n};\n\nconst toRelativePath = (fileOrDirectory, cwd) => {\n\tcwd = slash(cwd);\n\tif (path.isAbsolute(fileOrDirectory)) {\n\t\tif (slash(fileOrDirectory).startsWith(cwd)) {\n\t\t\treturn path.relative(cwd, fileOrDirectory);\n\t\t}\n\n\t\tthrow new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);\n\t}\n\n\treturn fileOrDirectory;\n};\n\nconst getIsIgnoredPredicate = (files, cwd) => {\n\tconst patterns = files.flatMap(file => parseIgnoreFile(file, cwd));\n\tconst ignores = gitIgnore().add(patterns);\n\n\treturn fileOrDirectory => {\n\t\tfileOrDirectory = toPath(fileOrDirectory);\n\t\tfileOrDirectory = toRelativePath(fileOrDirectory, cwd);\n\t\treturn fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;\n\t};\n};\n\nconst normalizeOptions = (options = {}) => ({\n\tcwd: toPath(options.cwd) || process.cwd(),\n\tsuppressErrors: Boolean(options.suppressErrors),\n});\n\nexport const isIgnoredByIgnoreFiles = async (patterns, options) => {\n\tconst {cwd, suppressErrors} = normalizeOptions(options);\n\n\tconst paths = await fastGlob(patterns, {cwd, suppressErrors, ...ignoreFilesGlobOptions});\n\n\tconst files = await Promise.all(\n\t\tpaths.map(async filePath => ({\n\t\t\tfilePath,\n\t\t\tcontent: await fs.promises.readFile(filePath, 'utf8'),\n\t\t})),\n\t);\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isIgnoredByIgnoreFilesSync = (patterns, options) => {\n\tconst {cwd, suppressErrors} = normalizeOptions(options);\n\n\tconst paths = fastGlob.sync(patterns, {cwd, suppressErrors, ...ignoreFilesGlobOptions});\n\n\tconst files = paths.map(filePath => ({\n\t\tfilePath,\n\t\tcontent: fs.readFileSync(filePath, 'utf8'),\n\t}));\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);\nexport const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);\n"],"names":["isNegativePattern","slash","gitIgnore","toPath","fastGlob"],"mappings":";;;;;;;;;AAQA,MAAM,yBAAyB;AAAA,EAC9B,QAAQ;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EACD,UAAU;AAAA,EACV,KAAK;AACN;AAEY,MAAC,0BAA0B;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AAc,IAAI,iBAAiB,OAAO;AAEtD,QAAM,QAAQ,MAAMC,MAAS,UAAU,EAAC,KAAK,gBAAgB,GAAG,uBAAsB,CAAC;AAEvF,QAAM,QAAQ,MAAM,QAAQ;AAAA,IAC3B,MAAM,IAAI,OAAM,cAAa;AAAA,MAC5B;AAAA,MACA,SAAS,MAAM,GAAG,SAAS,SAAS,UAAU,MAAM;AAAA,IACvD,EAAI;AAAA,EACJ;AAEC,SAAO,sBAAsB,OAAO,GAAG;AACxC;;;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path__default from "node:path";
|
|
4
|
-
import out from
|
|
5
|
-
import ignore from
|
|
4
|
+
import out from './../../../../_node_modules/fast-glob/out/index.js';
|
|
5
|
+
import ignore from './../../../../_node_modules/ignore/index.js';
|
|
6
6
|
import slash from "../slash/index.js";
|
|
7
7
|
import { toPath, isNegativePattern } from "./utilities.js";
|
|
8
8
|
const ignoreFilesGlobOptions = {
|
|
@@ -41,11 +41,12 @@ const getIsIgnoredPredicate = (files, cwd) => {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
const normalizeOptions = (options = {}) => ({
|
|
44
|
-
cwd: toPath(options.cwd) || process.cwd()
|
|
44
|
+
cwd: toPath(options.cwd) || process.cwd(),
|
|
45
|
+
suppressErrors: Boolean(options.suppressErrors)
|
|
45
46
|
});
|
|
46
47
|
const isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
47
|
-
const { cwd } = normalizeOptions(options);
|
|
48
|
-
const paths = await out(patterns, { cwd, ...ignoreFilesGlobOptions });
|
|
48
|
+
const { cwd, suppressErrors } = normalizeOptions(options);
|
|
49
|
+
const paths = await out(patterns, { cwd, suppressErrors, ...ignoreFilesGlobOptions });
|
|
49
50
|
const files = await Promise.all(
|
|
50
51
|
paths.map(async (filePath) => ({
|
|
51
52
|
filePath,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.js","sources":["../../../../../node_modules/globby/ignore.js"],"sourcesContent":["import process from 'node:process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport fastGlob from 'fast-glob';\nimport gitIgnore from 'ignore';\nimport slash from 'slash';\nimport {toPath, isNegativePattern} from './utilities.js';\n\nconst ignoreFilesGlobOptions = {\n\tignore: [\n\t\t'**/node_modules',\n\t\t'**/flow-typed',\n\t\t'**/coverage',\n\t\t'**/.git',\n\t],\n\tabsolute: true,\n\tdot: true,\n};\n\nexport const GITIGNORE_FILES_PATTERN = '**/.gitignore';\n\nconst applyBaseToPattern = (pattern, base) => isNegativePattern(pattern)\n\t? '!' + path.posix.join(base, pattern.slice(1))\n\t: path.posix.join(base, pattern);\n\nconst parseIgnoreFile = (file, cwd) => {\n\tconst base = slash(path.relative(cwd, path.dirname(file.filePath)));\n\n\treturn file.content\n\t\t.split(/\\r?\\n/)\n\t\t.filter(line => line && !line.startsWith('#'))\n\t\t.map(pattern => applyBaseToPattern(pattern, base));\n};\n\nconst toRelativePath = (fileOrDirectory, cwd) => {\n\tcwd = slash(cwd);\n\tif (path.isAbsolute(fileOrDirectory)) {\n\t\tif (slash(fileOrDirectory).startsWith(cwd)) {\n\t\t\treturn path.relative(cwd, fileOrDirectory);\n\t\t}\n\n\t\tthrow new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);\n\t}\n\n\treturn fileOrDirectory;\n};\n\nconst getIsIgnoredPredicate = (files, cwd) => {\n\tconst patterns = files.flatMap(file => parseIgnoreFile(file, cwd));\n\tconst ignores = gitIgnore().add(patterns);\n\n\treturn fileOrDirectory => {\n\t\tfileOrDirectory = toPath(fileOrDirectory);\n\t\tfileOrDirectory = toRelativePath(fileOrDirectory, cwd);\n\t\treturn fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;\n\t};\n};\n\nconst normalizeOptions = (options = {}) => ({\n\tcwd: toPath(options.cwd) || process.cwd(),\n\tsuppressErrors: Boolean(options.suppressErrors),\n});\n\nexport const isIgnoredByIgnoreFiles = async (patterns, options) => {\n\tconst {cwd, suppressErrors} = normalizeOptions(options);\n\n\tconst paths = await fastGlob(patterns, {cwd, suppressErrors, ...ignoreFilesGlobOptions});\n\n\tconst files = await Promise.all(\n\t\tpaths.map(async filePath => ({\n\t\t\tfilePath,\n\t\t\tcontent: await fs.promises.readFile(filePath, 'utf8'),\n\t\t})),\n\t);\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isIgnoredByIgnoreFilesSync = (patterns, options) => {\n\tconst {cwd, suppressErrors} = normalizeOptions(options);\n\n\tconst paths = fastGlob.sync(patterns, {cwd, suppressErrors, ...ignoreFilesGlobOptions});\n\n\tconst files = paths.map(filePath => ({\n\t\tfilePath,\n\t\tcontent: fs.readFileSync(filePath, 'utf8'),\n\t}));\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);\nexport const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);\n"],"names":["path","gitIgnore","fastGlob"],"mappings":";;;;;;;AAQA,MAAM,yBAAyB;AAAA,EAC9B,QAAQ;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EACD,UAAU;AAAA,EACV,KAAK;AACN;AAEY,MAAC,0BAA0B;AAEvC,MAAM,qBAAqB,CAAC,SAAS,SAAS,kBAAkB,OAAO,IACpE,MAAMA,cAAK,MAAM,KAAK,MAAM,QAAQ,MAAM,CAAC,CAAC,IAC5CA,cAAK,MAAM,KAAK,MAAM,OAAO;AAEhC,MAAM,kBAAkB,CAAC,MAAM,QAAQ;AACtC,QAAM,OAAO,MAAMA,cAAK,SAAS,KAAKA,cAAK,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAElE,SAAO,KAAK,QACV,MAAM,OAAO,EACb,OAAO,UAAQ,QAAQ,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
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const fs = require("node:fs");
|
|
4
4
|
const path = require("node:path");
|
|
5
|
-
require(
|
|
6
|
-
const index = require(
|
|
7
|
-
require(
|
|
5
|
+
require('./../../../../_node_modules/merge2/index.cjs');
|
|
6
|
+
const index = require('./../../../../_node_modules/fast-glob/out/index.cjs');
|
|
7
|
+
require('./../../../../_node_modules/dir-glob/index.cjs');
|
|
8
8
|
const ignore = require("./ignore.cjs");
|
|
9
9
|
const utilities = require("./utilities.cjs");
|
|
10
|
-
const index$1 = require("
|
|
10
|
+
const index$1 = require("../../../../_virtual/index3.cjs");
|
|
11
11
|
const assertPatternsInput = (patterns) => {
|
|
12
12
|
if (patterns.some((pattern) => typeof pattern !== "string")) {
|
|
13
13
|
throw new TypeError("Patterns must be a string or an array of strings");
|
|
@@ -54,7 +54,7 @@ const getIgnoreFilesPatterns = (options) => {
|
|
|
54
54
|
const getFilter = async (options) => {
|
|
55
55
|
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
56
56
|
return createFilterFunction(
|
|
57
|
-
ignoreFilesPatterns.length > 0 && await ignore.isIgnoredByIgnoreFiles(ignoreFilesPatterns,
|
|
57
|
+
ignoreFilesPatterns.length > 0 && await ignore.isIgnoredByIgnoreFiles(ignoreFilesPatterns, options)
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
const createFilterFunction = (isIgnored) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../node_modules/globby/index.js"],"sourcesContent":["import fs from 'node:fs';\nimport nodePath from 'node:path';\nimport merge2 from 'merge2';\nimport fastGlob from 'fast-glob';\nimport dirGlob from 'dir-glob';\nimport {\n\tGITIGNORE_FILES_PATTERN,\n\tisIgnoredByIgnoreFiles,\n\tisIgnoredByIgnoreFilesSync,\n} from './ignore.js';\nimport {FilterStream, toPath, isNegativePattern} from './utilities.js';\n\nconst assertPatternsInput = patterns => {\n\tif (patterns.some(pattern => typeof pattern !== 'string')) {\n\t\tthrow new TypeError('Patterns must be a string or an array of strings');\n\t}\n};\n\nconst toPatternsArray = patterns => {\n\tpatterns = [...new Set([patterns].flat())];\n\tassertPatternsInput(patterns);\n\treturn patterns;\n};\n\nconst checkCwdOption = options => {\n\tif (!options.cwd) {\n\t\treturn;\n\t}\n\n\tlet stat;\n\ttry {\n\t\tstat = fs.statSync(options.cwd);\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (!stat.isDirectory()) {\n\t\tthrow new Error('The `cwd` option must be a path to a directory');\n\t}\n};\n\nconst normalizeOptions = (options = {}) => {\n\toptions = {\n\t\tignore: [],\n\t\texpandDirectories: true,\n\t\t...options,\n\t\tcwd: toPath(options.cwd),\n\t};\n\n\tcheckCwdOption(options);\n\n\treturn options;\n};\n\nconst normalizeArguments = fn => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\nconst normalizeArgumentsSync = fn => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\n\nconst getIgnoreFilesPatterns = options => {\n\tconst {ignoreFiles, gitignore} = options;\n\n\tconst patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];\n\tif (gitignore) {\n\t\tpatterns.push(GITIGNORE_FILES_PATTERN);\n\t}\n\n\treturn patterns;\n};\n\nconst getFilter = async options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options),\n\t);\n};\n\nconst getFilterSync = options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options),\n\t);\n};\n\nconst createFilterFunction = isIgnored => {\n\tconst seen = new Set();\n\n\treturn fastGlobResult => {\n\t\tconst path = fastGlobResult.path || fastGlobResult;\n\t\tconst pathKey = nodePath.normalize(path);\n\t\tconst seenOrIgnored = seen.has(pathKey) || (isIgnored && isIgnored(path));\n\t\tseen.add(pathKey);\n\t\treturn !seenOrIgnored;\n\t};\n};\n\nconst unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));\nconst unionFastGlobStreams = (streams, filter) => merge2(streams).pipe(new FilterStream(fastGlobResult => filter(fastGlobResult)));\n\nconst convertNegativePatterns = (patterns, options) => {\n\tconst tasks = [];\n\n\twhile (patterns.length > 0) {\n\t\tconst index = patterns.findIndex(pattern => isNegativePattern(pattern));\n\n\t\tif (index === -1) {\n\t\t\ttasks.push({patterns, options});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst ignorePattern = patterns[index].slice(1);\n\n\t\tfor (const task of tasks) {\n\t\t\ttask.options.ignore.push(ignorePattern);\n\t\t}\n\n\t\tif (index !== 0) {\n\t\t\ttasks.push({\n\t\t\t\tpatterns: patterns.slice(0, index),\n\t\t\t\toptions: {\n\t\t\t\t\t...options,\n\t\t\t\t\tignore: [\n\t\t\t\t\t\t...options.ignore,\n\t\t\t\t\t\tignorePattern,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpatterns = patterns.slice(index + 1);\n\t}\n\n\treturn tasks;\n};\n\nconst getDirGlobOptions = (options, cwd) => ({\n\t...(cwd ? {cwd} : {}),\n\t...(Array.isArray(options) ? {files: options} : options),\n});\n\nconst generateTasks = async (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn Promise.all(\n\t\tglobTasks.map(async task => {\n\t\t\tlet {patterns, options} = task;\n\n\t\t\t[\n\t\t\t\tpatterns,\n\t\t\t\toptions.ignore,\n\t\t\t] = await Promise.all([\n\t\t\t\tdirGlob(patterns, patternExpandOptions),\n\t\t\t\tdirGlob(options.ignore, ignoreExpandOptions),\n\t\t\t]);\n\n\t\t\treturn {patterns, options};\n\t\t}),\n\t);\n};\n\nconst generateTasksSync = (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn globTasks.map(task => {\n\t\tlet {patterns, options} = task;\n\t\tpatterns = dirGlob.sync(patterns, patternExpandOptions);\n\t\toptions.ignore = dirGlob.sync(options.ignore, ignoreExpandOptions);\n\t\treturn {patterns, options};\n\t});\n};\n\nexport const globby = normalizeArguments(async (patterns, options) => {\n\tconst [\n\t\ttasks,\n\t\tfilter,\n\t] = await Promise.all([\n\t\tgenerateTasks(patterns, options),\n\t\tgetFilter(options),\n\t]);\n\tconst results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbySync = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst results = tasks.map(task => fastGlob.sync(task.patterns, task.options));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbyStream = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));\n\n\treturn unionFastGlobStreams(streams, filter);\n});\n\nexport const isDynamicPattern = normalizeArgumentsSync(\n\t(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),\n);\n\nexport const generateGlobTasks = normalizeArguments(generateTasks);\nexport const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);\n\nexport {\n\tisGitIgnored,\n\tisGitIgnoredSync,\n} from './ignore.js';\n"],"names":["toPath","GITIGNORE_FILES_PATTERN","isIgnoredByIgnoreFiles","path","nodePath","index","isNegativePattern","patterns","options","dirGlob","fastGlob"],"mappings":";;;;;;;;;;AAYA,MAAM,sBAAsB,cAAY;AACvC,MAAI,SAAS,KAAK,aAAW,OAAO,YAAY,QAAQ,GAAG;AAC1D,UAAM,IAAI,UAAU,kDAAkD;AAAA,EACtE;AACF;AAEA,MAAM,kBAAkB,cAAY;AACnC,aAAW,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,KAAM,CAAA,CAAC;AACzC,sBAAoB,QAAQ;AAC5B,SAAO;AACR;AAEA,MAAM,iBAAiB,aAAW;AACjC,MAAI,CAAC,QAAQ,KAAK;AACjB;AAAA,EACA;AAED,MAAI;AACJ,MAAI;AACH,WAAO,GAAG,SAAS,QAAQ,GAAG;AAAA,EAChC,QAAG;AACD;AAAA,EACA;AAED,MAAI,CAAC,KAAK,eAAe;AACxB,UAAM,IAAI,MAAM,gDAAgD;AAAA,EAChE;AACF;AAEA,MAAM,mBAAmB,CAAC,UAAU,OAAO;AAC1C,YAAU;AAAA,IACT,QAAQ,CAAE;AAAA,IACV,mBAAmB;AAAA,IACnB,GAAG;AAAA,IACH,KAAKA,UAAAA,OAAO,QAAQ,GAAG;AAAA,EACzB;AAEC,iBAAe,OAAO;AAEtB,SAAO;AACR;AAEA,MAAM,qBAAqB,QAAM,OAAO,UAAU,YAAY,GAAG,gBAAgB,QAAQ,GAAG,iBAAiB,OAAO,CAAC;AAGrH,MAAM,yBAAyB,aAAW;AACzC,QAAM,EAAC,aAAa,UAAS,IAAI;AAEjC,QAAM,WAAW,cAAc,gBAAgB,WAAW,IAAI,CAAA;AAC9D,MAAI,WAAW;AACd,aAAS,KAAKC,OAAAA,uBAAuB;AAAA,EACrC;AAED,SAAO;AACR;AAEA,MAAM,YAAY,OAAM,YAAW;AAClC,QAAM,sBAAsB,uBAAuB,OAAO;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OAAO,QAAO,IAAI;AACjD;AAEA,MAAM,gBAAgB,OAAO,UAAU,YAAY;AAClD,QAAM,YAAY,wBAAwB,UAAU,OAAO;AAE3D,QAAM,EAAC,KAAK,kBAAiB,IAAI;AAEjC,MAAI,CAAC,mBAAmB;AACvB,WAAO;AAAA,EACP;AAED,QAAM,uBAAuB,kBAAkB,mBAAmB,GAAG;AACrE,QAAM,sBAAsB,MAAM,EAAC,IAAG,IAAI;AAE1C,SAAO,QAAQ;AAAA,IACd,UAAU,IAAI,OAAM,SAAQ;AAC3B,UAAI,EAAC,UAAAE,WAAU,SAAAC,SAAO,IAAI;AAE1B;AAAA,QACCD;AAAA,QACAC,SAAQ;AAAA,MACZ,IAAO,MAAM,QAAQ,IAAI;AAAA,QACrBC,QAAO,QAACF,WAAU,oBAAoB;AAAA,QACtCE,gBAAQD,SAAQ,QAAQ,mBAAmB;AAAA,MAC/C,CAAI;AAED,aAAO,EAAC,UAAAD,WAAU,SAAAC,SAAO;AAAA,IAC5B,CAAG;AAAA,EACH;AACA;AAsBY,MAAC,SAAS,mBAAmB,OAAO,UAAU,YAAY;AACrE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,EACF,IAAK,MAAM,QAAQ,IAAI;AAAA,IACrB,cAAc,UAAU,OAAO;AAAA,IAC/B,UAAU,OAAO;AAAA,EACnB,CAAE;AACD,QAAM,UAAU,MAAM,QAAQ,IAAI,MAAM,IAAI,UAAQE,MAAS,KAAK,UAAU,KAAK,OAAO,CAAC,CAAC;AAE1F,SAAO,qBAAqB,SAAS,MAAM;AAC5C,CAAC;;","x_google_ignoreList":[0]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path__default from "node:path";
|
|
3
|
-
import
|
|
4
|
-
import out from
|
|
5
|
-
import
|
|
3
|
+
import './../../../../_node_modules/merge2/index.js';
|
|
4
|
+
import out from './../../../../_node_modules/fast-glob/out/index.js';
|
|
5
|
+
import './../../../../_node_modules/dir-glob/index.js';
|
|
6
6
|
import { isIgnoredByIgnoreFiles, GITIGNORE_FILES_PATTERN } from "./ignore.js";
|
|
7
7
|
import { toPath, isNegativePattern } from "./utilities.js";
|
|
8
|
-
import { exports as dirGlobExports } from "
|
|
8
|
+
import { exports as dirGlobExports } from "../../../../_virtual/index3.js";
|
|
9
9
|
const assertPatternsInput = (patterns) => {
|
|
10
10
|
if (patterns.some((pattern) => typeof pattern !== "string")) {
|
|
11
11
|
throw new TypeError("Patterns must be a string or an array of strings");
|
|
@@ -52,7 +52,7 @@ const getIgnoreFilesPatterns = (options) => {
|
|
|
52
52
|
const getFilter = async (options) => {
|
|
53
53
|
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
54
54
|
return createFilterFunction(
|
|
55
|
-
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns,
|
|
55
|
+
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options)
|
|
56
56
|
);
|
|
57
57
|
};
|
|
58
58
|
const createFilterFunction = (isIgnored) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/globby/index.js"],"sourcesContent":["import fs from 'node:fs';\nimport nodePath from 'node:path';\nimport merge2 from 'merge2';\nimport fastGlob from 'fast-glob';\nimport dirGlob from 'dir-glob';\nimport {\n\tGITIGNORE_FILES_PATTERN,\n\tisIgnoredByIgnoreFiles,\n\tisIgnoredByIgnoreFilesSync,\n} from './ignore.js';\nimport {FilterStream, toPath, isNegativePattern} from './utilities.js';\n\nconst assertPatternsInput = patterns => {\n\tif (patterns.some(pattern => typeof pattern !== 'string')) {\n\t\tthrow new TypeError('Patterns must be a string or an array of strings');\n\t}\n};\n\nconst toPatternsArray = patterns => {\n\tpatterns = [...new Set([patterns].flat())];\n\tassertPatternsInput(patterns);\n\treturn patterns;\n};\n\nconst checkCwdOption = options => {\n\tif (!options.cwd) {\n\t\treturn;\n\t}\n\n\tlet stat;\n\ttry {\n\t\tstat = fs.statSync(options.cwd);\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (!stat.isDirectory()) {\n\t\tthrow new Error('The `cwd` option must be a path to a directory');\n\t}\n};\n\nconst normalizeOptions = (options = {}) => {\n\toptions = {\n\t\tignore: [],\n\t\texpandDirectories: true,\n\t\t...options,\n\t\tcwd: toPath(options.cwd),\n\t};\n\n\tcheckCwdOption(options);\n\n\treturn options;\n};\n\nconst normalizeArguments = fn => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\nconst normalizeArgumentsSync = fn => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\n\nconst getIgnoreFilesPatterns = options => {\n\tconst {ignoreFiles, gitignore} = options;\n\n\tconst patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];\n\tif (gitignore) {\n\t\tpatterns.push(GITIGNORE_FILES_PATTERN);\n\t}\n\n\treturn patterns;\n};\n\nconst getFilter = async options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options),\n\t);\n};\n\nconst getFilterSync = options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options),\n\t);\n};\n\nconst createFilterFunction = isIgnored => {\n\tconst seen = new Set();\n\n\treturn fastGlobResult => {\n\t\tconst path = fastGlobResult.path || fastGlobResult;\n\t\tconst pathKey = nodePath.normalize(path);\n\t\tconst seenOrIgnored = seen.has(pathKey) || (isIgnored && isIgnored(path));\n\t\tseen.add(pathKey);\n\t\treturn !seenOrIgnored;\n\t};\n};\n\nconst unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));\nconst unionFastGlobStreams = (streams, filter) => merge2(streams).pipe(new FilterStream(fastGlobResult => filter(fastGlobResult)));\n\nconst convertNegativePatterns = (patterns, options) => {\n\tconst tasks = [];\n\n\twhile (patterns.length > 0) {\n\t\tconst index = patterns.findIndex(pattern => isNegativePattern(pattern));\n\n\t\tif (index === -1) {\n\t\t\ttasks.push({patterns, options});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst ignorePattern = patterns[index].slice(1);\n\n\t\tfor (const task of tasks) {\n\t\t\ttask.options.ignore.push(ignorePattern);\n\t\t}\n\n\t\tif (index !== 0) {\n\t\t\ttasks.push({\n\t\t\t\tpatterns: patterns.slice(0, index),\n\t\t\t\toptions: {\n\t\t\t\t\t...options,\n\t\t\t\t\tignore: [\n\t\t\t\t\t\t...options.ignore,\n\t\t\t\t\t\tignorePattern,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpatterns = patterns.slice(index + 1);\n\t}\n\n\treturn tasks;\n};\n\nconst getDirGlobOptions = (options, cwd) => ({\n\t...(cwd ? {cwd} : {}),\n\t...(Array.isArray(options) ? {files: options} : options),\n});\n\nconst generateTasks = async (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn Promise.all(\n\t\tglobTasks.map(async task => {\n\t\t\tlet {patterns, options} = task;\n\n\t\t\t[\n\t\t\t\tpatterns,\n\t\t\t\toptions.ignore,\n\t\t\t] = await Promise.all([\n\t\t\t\tdirGlob(patterns, patternExpandOptions),\n\t\t\t\tdirGlob(options.ignore, ignoreExpandOptions),\n\t\t\t]);\n\n\t\t\treturn {patterns, options};\n\t\t}),\n\t);\n};\n\nconst generateTasksSync = (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn globTasks.map(task => {\n\t\tlet {patterns, options} = task;\n\t\tpatterns = dirGlob.sync(patterns, patternExpandOptions);\n\t\toptions.ignore = dirGlob.sync(options.ignore, ignoreExpandOptions);\n\t\treturn {patterns, options};\n\t});\n};\n\nexport const globby = normalizeArguments(async (patterns, options) => {\n\tconst [\n\t\ttasks,\n\t\tfilter,\n\t] = await Promise.all([\n\t\tgenerateTasks(patterns, options),\n\t\tgetFilter(options),\n\t]);\n\tconst results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbySync = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst results = tasks.map(task => fastGlob.sync(task.patterns, task.options));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbyStream = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));\n\n\treturn unionFastGlobStreams(streams, filter);\n});\n\nexport const isDynamicPattern = normalizeArgumentsSync(\n\t(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),\n);\n\nexport const generateGlobTasks = normalizeArguments(generateTasks);\nexport const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);\n\nexport {\n\tisGitIgnored,\n\tisGitIgnoredSync,\n} from './ignore.js';\n"],"names":["nodePath","patterns","options","dirGlob","fastGlob"],"mappings":";;;;;;;;AAYA,MAAM,sBAAsB,cAAY;AACvC,MAAI,SAAS,KAAK,aAAW,OAAO,YAAY,QAAQ,GAAG;AAC1D,UAAM,IAAI,UAAU,kDAAkD;AAAA,EACtE;AACF;AAEA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Q;AAC3B,UAAI,EAAC,UAAAC,WAAU,SAAAC,SAAO,IAAI;AAE1B;AAAA,QACCD;AAAA,QACAC,SAAQ;AAAA,MACZ,IAAO,MAAM,QAAQ,IAAI;AAAA,QACrBC,eAAQF,WAAU,oBAAoB;AAAA,QACtCE,eAAQD,SAAQ,QAAQ,mBAAmB;AAAA,MAC/C,CAAI;AAED,aAAO,EAAC,UAAAD,WAAU,SAAAC,SAAO;AAAA,IAC5B,CAAG;AAAA,EACH;AACA;AAsBY,MAAC,SAAS,mBAAmB,OAAO,UAAU,YAAY;AACrE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,EACF,IAAK,MAAM,QAAQ,IAAI;AAAA,IACrB,cAAc,UAAU,OAAO;AAAA,IAC/B,UAAU,OAAO;AAAA,EACnB,CAAE;AACD,QAAM,UAAU,MAAM,QAAQ,IAAI,MAAM,IAAI,UAAQE,IAAS,KAAK,UAAU,KAAK,OAAO,CAAC,CAAC;AAE1F,SAAO,qBAAqB,SAAS,MAAM;AAC5C,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const name = "@slicemachine/init";
|
|
4
|
-
const version = "0.1.1-dev-plugins-
|
|
4
|
+
const version = "0.1.1-dev-plugins-m3.0";
|
|
5
5
|
const description = "Init Prismic Slice Machine in your project";
|
|
6
6
|
const keywords = [
|
|
7
7
|
"typescript",
|
|
@@ -54,7 +54,7 @@ const scripts = {
|
|
|
54
54
|
const dependencies = {
|
|
55
55
|
"@antfu/ni": "^0.20.0",
|
|
56
56
|
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
57
|
-
"@slicemachine/manager": "0.1.1-dev-plugins-
|
|
57
|
+
"@slicemachine/manager": "0.1.1-dev-plugins-m3.0",
|
|
58
58
|
chalk: "^4.1.2",
|
|
59
59
|
globby: "^13.1.3",
|
|
60
60
|
listr: "^0.14.3",
|
|
@@ -66,7 +66,7 @@ const dependencies = {
|
|
|
66
66
|
};
|
|
67
67
|
const devDependencies = {
|
|
68
68
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
69
|
-
"@slicemachine/plugin-kit": "0.1.8-dev-plugins-
|
|
69
|
+
"@slicemachine/plugin-kit": "0.1.8-dev-plugins-m3.0",
|
|
70
70
|
"@types/listr": "^0.14.4",
|
|
71
71
|
"@types/prompts": "^2.4.3",
|
|
72
72
|
"@types/semver": "^7.3.13",
|
|
@@ -75,7 +75,7 @@ const devDependencies = {
|
|
|
75
75
|
"@vitest/coverage-c8": "^0.27.3",
|
|
76
76
|
"better-npm-audit": "^3.7.3",
|
|
77
77
|
depcheck: "^1.4.3",
|
|
78
|
-
eslint: "^8.
|
|
78
|
+
eslint: "^8.37.0",
|
|
79
79
|
"eslint-config-prettier": "^8.7.0",
|
|
80
80
|
"eslint-plugin-prettier": "^4.2.1",
|
|
81
81
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
@@ -92,7 +92,7 @@ const devDependencies = {
|
|
|
92
92
|
"vite-plugin-sdk": "^0.1.1",
|
|
93
93
|
vitest: "^0.27.3"
|
|
94
94
|
};
|
|
95
|
-
const gitHead = "
|
|
95
|
+
const gitHead = "9223acb43eebf3f0e1731090b48c44ebd96f4aae";
|
|
96
96
|
const pkg = {
|
|
97
97
|
name,
|
|
98
98
|
version,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const name = "@slicemachine/init";
|
|
2
|
-
const version = "0.1.1-dev-plugins-
|
|
2
|
+
const version = "0.1.1-dev-plugins-m3.0";
|
|
3
3
|
const description = "Init Prismic Slice Machine in your project";
|
|
4
4
|
const keywords = [
|
|
5
5
|
"typescript",
|
|
@@ -52,7 +52,7 @@ const scripts = {
|
|
|
52
52
|
const dependencies = {
|
|
53
53
|
"@antfu/ni": "^0.20.0",
|
|
54
54
|
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
55
|
-
"@slicemachine/manager": "0.1.1-dev-plugins-
|
|
55
|
+
"@slicemachine/manager": "0.1.1-dev-plugins-m3.0",
|
|
56
56
|
chalk: "^4.1.2",
|
|
57
57
|
globby: "^13.1.3",
|
|
58
58
|
listr: "^0.14.3",
|
|
@@ -64,7 +64,7 @@ const dependencies = {
|
|
|
64
64
|
};
|
|
65
65
|
const devDependencies = {
|
|
66
66
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
67
|
-
"@slicemachine/plugin-kit": "0.1.8-dev-plugins-
|
|
67
|
+
"@slicemachine/plugin-kit": "0.1.8-dev-plugins-m3.0",
|
|
68
68
|
"@types/listr": "^0.14.4",
|
|
69
69
|
"@types/prompts": "^2.4.3",
|
|
70
70
|
"@types/semver": "^7.3.13",
|
|
@@ -73,7 +73,7 @@ const devDependencies = {
|
|
|
73
73
|
"@vitest/coverage-c8": "^0.27.3",
|
|
74
74
|
"better-npm-audit": "^3.7.3",
|
|
75
75
|
depcheck: "^1.4.3",
|
|
76
|
-
eslint: "^8.
|
|
76
|
+
eslint: "^8.37.0",
|
|
77
77
|
"eslint-config-prettier": "^8.7.0",
|
|
78
78
|
"eslint-plugin-prettier": "^4.2.1",
|
|
79
79
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
@@ -90,7 +90,7 @@ const devDependencies = {
|
|
|
90
90
|
"vite-plugin-sdk": "^0.1.1",
|
|
91
91
|
vitest: "^0.27.3"
|
|
92
92
|
};
|
|
93
|
-
const gitHead = "
|
|
93
|
+
const gitHead = "9223acb43eebf3f0e1731090b48c44ebd96f4aae";
|
|
94
94
|
const pkg = {
|
|
95
95
|
name,
|
|
96
96
|
version,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slicemachine/init",
|
|
3
|
-
"version": "0.1.1-dev-plugins-
|
|
3
|
+
"version": "0.1.1-dev-plugins-m3.0",
|
|
4
4
|
"description": "Init Prismic Slice Machine in your project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@antfu/ni": "^0.20.0",
|
|
55
55
|
"@lihbr/listr-update-renderer": "^0.5.3",
|
|
56
|
-
"@slicemachine/manager": "0.1.1-dev-plugins-
|
|
56
|
+
"@slicemachine/manager": "0.1.1-dev-plugins-m3.0",
|
|
57
57
|
"chalk": "^4.1.2",
|
|
58
58
|
"globby": "^13.1.3",
|
|
59
59
|
"listr": "^0.14.3",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
68
|
-
"@slicemachine/plugin-kit": "0.1.8-dev-plugins-
|
|
68
|
+
"@slicemachine/plugin-kit": "0.1.8-dev-plugins-m3.0",
|
|
69
69
|
"@types/listr": "^0.14.4",
|
|
70
70
|
"@types/prompts": "^2.4.3",
|
|
71
71
|
"@types/semver": "^7.3.13",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@vitest/coverage-c8": "^0.27.3",
|
|
75
75
|
"better-npm-audit": "^3.7.3",
|
|
76
76
|
"depcheck": "^1.4.3",
|
|
77
|
-
"eslint": "^8.
|
|
77
|
+
"eslint": "^8.37.0",
|
|
78
78
|
"eslint-config-prettier": "^8.7.0",
|
|
79
79
|
"eslint-plugin-prettier": "^4.2.1",
|
|
80
80
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"vite-plugin-sdk": "^0.1.1",
|
|
92
92
|
"vitest": "^0.27.3"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "9223acb43eebf3f0e1731090b48c44ebd96f4aae"
|
|
95
95
|
}
|
package/src/lib/framework.ts
CHANGED
|
@@ -57,10 +57,23 @@ export const FRAMEWORKS: Record<string, Framework> = {
|
|
|
57
57
|
name: "Nuxt 2",
|
|
58
58
|
prismicName: "nuxt-2",
|
|
59
59
|
prismicDocumentation: "https://prismic.dev/init/nuxt-2",
|
|
60
|
-
adapterName: "@slicemachine/adapter-
|
|
60
|
+
adapterName: "@slicemachine/adapter-nuxt2",
|
|
61
61
|
compatibility: {
|
|
62
62
|
nuxt: "^2.0.0",
|
|
63
63
|
},
|
|
64
|
+
devDependencies: {
|
|
65
|
+
...DEFAULT_DEV_DEPENDENCIES,
|
|
66
|
+
"@slicemachine/adapter-nuxt2": "latest",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
"nuxt-3": {
|
|
70
|
+
name: "Nuxt 3",
|
|
71
|
+
prismicName: "nuxt-3",
|
|
72
|
+
prismicDocumentation: "https://prismic.dev/init/nuxt-3",
|
|
73
|
+
adapterName: "@slicemachine/adapter-nuxt",
|
|
74
|
+
compatibility: {
|
|
75
|
+
nuxt: "^3.0.0",
|
|
76
|
+
},
|
|
64
77
|
devDependencies: {
|
|
65
78
|
...DEFAULT_DEV_DEPENDENCIES,
|
|
66
79
|
"@slicemachine/adapter-nuxt": "latest",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ignore.cjs","sources":["../../../../../node_modules/globby/ignore.js"],"sourcesContent":["import process from 'node:process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport fastGlob from 'fast-glob';\nimport gitIgnore from 'ignore';\nimport slash from 'slash';\nimport {toPath, isNegativePattern} from './utilities.js';\n\nconst ignoreFilesGlobOptions = {\n\tignore: [\n\t\t'**/node_modules',\n\t\t'**/flow-typed',\n\t\t'**/coverage',\n\t\t'**/.git',\n\t],\n\tabsolute: true,\n\tdot: true,\n};\n\nexport const GITIGNORE_FILES_PATTERN = '**/.gitignore';\n\nconst applyBaseToPattern = (pattern, base) => isNegativePattern(pattern)\n\t? '!' + path.posix.join(base, pattern.slice(1))\n\t: path.posix.join(base, pattern);\n\nconst parseIgnoreFile = (file, cwd) => {\n\tconst base = slash(path.relative(cwd, path.dirname(file.filePath)));\n\n\treturn file.content\n\t\t.split(/\\r?\\n/)\n\t\t.filter(line => line && !line.startsWith('#'))\n\t\t.map(pattern => applyBaseToPattern(pattern, base));\n};\n\nconst toRelativePath = (fileOrDirectory, cwd) => {\n\tcwd = slash(cwd);\n\tif (path.isAbsolute(fileOrDirectory)) {\n\t\tif (slash(fileOrDirectory).startsWith(cwd)) {\n\t\t\treturn path.relative(cwd, fileOrDirectory);\n\t\t}\n\n\t\tthrow new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);\n\t}\n\n\treturn fileOrDirectory;\n};\n\nconst getIsIgnoredPredicate = (files, cwd) => {\n\tconst patterns = files.flatMap(file => parseIgnoreFile(file, cwd));\n\tconst ignores = gitIgnore().add(patterns);\n\n\treturn fileOrDirectory => {\n\t\tfileOrDirectory = toPath(fileOrDirectory);\n\t\tfileOrDirectory = toRelativePath(fileOrDirectory, cwd);\n\t\treturn fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;\n\t};\n};\n\nconst normalizeOptions = (options = {}) => ({\n\tcwd: toPath(options.cwd) || process.cwd(),\n});\n\nexport const isIgnoredByIgnoreFiles = async (patterns, options) => {\n\tconst {cwd} = normalizeOptions(options);\n\n\tconst paths = await fastGlob(patterns, {cwd, ...ignoreFilesGlobOptions});\n\n\tconst files = await Promise.all(\n\t\tpaths.map(async filePath => ({\n\t\t\tfilePath,\n\t\t\tcontent: await fs.promises.readFile(filePath, 'utf8'),\n\t\t})),\n\t);\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isIgnoredByIgnoreFilesSync = (patterns, options) => {\n\tconst {cwd} = normalizeOptions(options);\n\n\tconst paths = fastGlob.sync(patterns, {cwd, ...ignoreFilesGlobOptions});\n\n\tconst files = paths.map(filePath => ({\n\t\tfilePath,\n\t\tcontent: fs.readFileSync(filePath, 'utf8'),\n\t}));\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);\nexport const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);\n"],"names":["isNegativePattern","slash","gitIgnore","toPath","fastGlob"],"mappings":";;;;;;;;;AAQA,MAAM,yBAAyB;AAAA,EAC9B,QAAQ;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EACD,UAAU;AAAA,EACV,KAAK;AACN;AAEY,MAAC,0BAA0B;AAEvC,MAAM,qBAAqB,CAAC,SAAS,SAASA,UAAAA,kBAAkB,OAAO,IACpE,MAAM,KAAK,MAAM,KAAK,MAAM,QAAQ,MAAM,CAAC,CAAC,IAC5C,KAAK,MAAM,KAAK,MAAM,OAAO;AAEhC,MAAM,kBAAkB,CAAC,MAAM,QAAQ;AACtC,QAAM,OAAOC,QAAM,KAAK,SAAS,KAAK,KAAK,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAElE,SAAO,KAAK,QACV,MAAM,OAAO,EACb,OAAO,UAAQ,QAAQ,CAAC,KAAK,WAAW,GAAG,CAAC,EAC5C,IAAI,aAAW,mBAAmB,SAAS,IAAI,CAAC;AACnD;AAEA,MAAM,iBAAiB,CAAC,iBAAiB,QAAQ;AAChD,QAAMA,QAAM,GAAG;AACf,MAAI,KAAK,WAAW,eAAe,GAAG;AACrC,QAAIA,QAAM,eAAe,EAAE,WAAW,GAAG,GAAG;AAC3C,aAAO,KAAK,SAAS,KAAK,eAAe;AAAA,IACzC;AAED,UAAM,IAAI,MAAM,QAAQ,iCAAiC,KAAK;AAAA,EAC9D;AAED,SAAO;AACR;AAEA,MAAM,wBAAwB,CAAC,OAAO,QAAQ;AAC7C,QAAM,WAAW,MAAM,QAAQ,UAAQ,gBAAgB,MAAM,GAAG,CAAC;AACjE,QAAM,UAAUC,QAAS,EAAG,IAAI,QAAQ;AAExC,SAAO,qBAAmB;AACzB,sBAAkBC,UAAAA,OAAO,eAAe;AACxC,sBAAkB,eAAe,iBAAiB,GAAG;AACrD,WAAO,kBAAkB,QAAQ,QAAQF,QAAM,eAAe,CAAC,IAAI;AAAA,EACrE;AACA;AAEA,MAAM,mBAAmB,CAAC,UAAU,QAAQ;AAAA,EAC3C,KAAKE,UAAM,OAAC,QAAQ,GAAG,KAAK,QAAQ,IAAK;AAC1C;AAEY,MAAC,yBAAyB,OAAO,UAAU,YAAY;AAClE,QAAM,EAAC,IAAG,IAAI,iBAAiB,OAAO;AAEtC,QAAM,QAAQ,MAAMC,MAAS,UAAU,EAAC,KAAK,GAAG,uBAAsB,CAAC;AAEvE,QAAM,QAAQ,MAAM,QAAQ;AAAA,IAC3B,MAAM,IAAI,OAAM,cAAa;AAAA,MAC5B;AAAA,MACA,SAAS,MAAM,GAAG,SAAS,SAAS,UAAU,MAAM;AAAA,IACvD,EAAI;AAAA,EACJ;AAEC,SAAO,sBAAsB,OAAO,GAAG;AACxC;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ignore.js","sources":["../../../../../node_modules/globby/ignore.js"],"sourcesContent":["import process from 'node:process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport fastGlob from 'fast-glob';\nimport gitIgnore from 'ignore';\nimport slash from 'slash';\nimport {toPath, isNegativePattern} from './utilities.js';\n\nconst ignoreFilesGlobOptions = {\n\tignore: [\n\t\t'**/node_modules',\n\t\t'**/flow-typed',\n\t\t'**/coverage',\n\t\t'**/.git',\n\t],\n\tabsolute: true,\n\tdot: true,\n};\n\nexport const GITIGNORE_FILES_PATTERN = '**/.gitignore';\n\nconst applyBaseToPattern = (pattern, base) => isNegativePattern(pattern)\n\t? '!' + path.posix.join(base, pattern.slice(1))\n\t: path.posix.join(base, pattern);\n\nconst parseIgnoreFile = (file, cwd) => {\n\tconst base = slash(path.relative(cwd, path.dirname(file.filePath)));\n\n\treturn file.content\n\t\t.split(/\\r?\\n/)\n\t\t.filter(line => line && !line.startsWith('#'))\n\t\t.map(pattern => applyBaseToPattern(pattern, base));\n};\n\nconst toRelativePath = (fileOrDirectory, cwd) => {\n\tcwd = slash(cwd);\n\tif (path.isAbsolute(fileOrDirectory)) {\n\t\tif (slash(fileOrDirectory).startsWith(cwd)) {\n\t\t\treturn path.relative(cwd, fileOrDirectory);\n\t\t}\n\n\t\tthrow new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);\n\t}\n\n\treturn fileOrDirectory;\n};\n\nconst getIsIgnoredPredicate = (files, cwd) => {\n\tconst patterns = files.flatMap(file => parseIgnoreFile(file, cwd));\n\tconst ignores = gitIgnore().add(patterns);\n\n\treturn fileOrDirectory => {\n\t\tfileOrDirectory = toPath(fileOrDirectory);\n\t\tfileOrDirectory = toRelativePath(fileOrDirectory, cwd);\n\t\treturn fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;\n\t};\n};\n\nconst normalizeOptions = (options = {}) => ({\n\tcwd: toPath(options.cwd) || process.cwd(),\n});\n\nexport const isIgnoredByIgnoreFiles = async (patterns, options) => {\n\tconst {cwd} = normalizeOptions(options);\n\n\tconst paths = await fastGlob(patterns, {cwd, ...ignoreFilesGlobOptions});\n\n\tconst files = await Promise.all(\n\t\tpaths.map(async filePath => ({\n\t\t\tfilePath,\n\t\t\tcontent: await fs.promises.readFile(filePath, 'utf8'),\n\t\t})),\n\t);\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isIgnoredByIgnoreFilesSync = (patterns, options) => {\n\tconst {cwd} = normalizeOptions(options);\n\n\tconst paths = fastGlob.sync(patterns, {cwd, ...ignoreFilesGlobOptions});\n\n\tconst files = paths.map(filePath => ({\n\t\tfilePath,\n\t\tcontent: fs.readFileSync(filePath, 'utf8'),\n\t}));\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);\nexport const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN,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AU,QAAQ;AAAA,EAC3C,KAAK,OAAO,QAAQ,GAAG,KAAK,QAAQ,IAAK;AAC1C;AAEY,MAAC,yBAAyB,OAAO,UAAU,YAAY;AAClE,QAAM,EAAC,IAAG,IAAI,iBAAiB,OAAO;AAEtC,QAAM,QAAQ,MAAMC,IAAS,UAAU,EAAC,KAAK,GAAG,uBAAsB,CAAC;AAEvE,QAAM,QAAQ,MAAM,QAAQ;AAAA,IAC3B,MAAM,IAAI,OAAM,cAAa;AAAA,MAC5B;AAAA,MACA,SAAS,MAAM,GAAG,SAAS,SAAS,UAAU,MAAM;AAAA,IACvD,EAAI;AAAA,EACJ;AAEC,SAAO,sBAAsB,OAAO,GAAG;AACxC;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../node_modules/globby/index.js"],"sourcesContent":["import fs from 'node:fs';\nimport nodePath from 'node:path';\nimport merge2 from 'merge2';\nimport fastGlob from 'fast-glob';\nimport dirGlob from 'dir-glob';\nimport {\n\tGITIGNORE_FILES_PATTERN,\n\tisIgnoredByIgnoreFiles,\n\tisIgnoredByIgnoreFilesSync,\n} from './ignore.js';\nimport {FilterStream, toPath, isNegativePattern} from './utilities.js';\n\nconst assertPatternsInput = patterns => {\n\tif (patterns.some(pattern => typeof pattern !== 'string')) {\n\t\tthrow new TypeError('Patterns must be a string or an array of strings');\n\t}\n};\n\nconst toPatternsArray = patterns => {\n\tpatterns = [...new Set([patterns].flat())];\n\tassertPatternsInput(patterns);\n\treturn patterns;\n};\n\nconst checkCwdOption = options => {\n\tif (!options.cwd) {\n\t\treturn;\n\t}\n\n\tlet stat;\n\ttry {\n\t\tstat = fs.statSync(options.cwd);\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (!stat.isDirectory()) {\n\t\tthrow new Error('The `cwd` option must be a path to a directory');\n\t}\n};\n\nconst normalizeOptions = (options = {}) => {\n\toptions = {\n\t\tignore: [],\n\t\texpandDirectories: true,\n\t\t...options,\n\t\tcwd: toPath(options.cwd),\n\t};\n\n\tcheckCwdOption(options);\n\n\treturn options;\n};\n\nconst normalizeArguments = fn => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\nconst normalizeArgumentsSync = fn => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\n\nconst getIgnoreFilesPatterns = options => {\n\tconst {ignoreFiles, gitignore} = options;\n\n\tconst patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];\n\tif (gitignore) {\n\t\tpatterns.push(GITIGNORE_FILES_PATTERN);\n\t}\n\n\treturn patterns;\n};\n\nconst getFilter = async options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, {cwd: options.cwd}),\n\t);\n};\n\nconst getFilterSync = options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, {cwd: options.cwd}),\n\t);\n};\n\nconst createFilterFunction = isIgnored => {\n\tconst seen = new Set();\n\n\treturn fastGlobResult => {\n\t\tconst path = fastGlobResult.path || fastGlobResult;\n\t\tconst pathKey = nodePath.normalize(path);\n\t\tconst seenOrIgnored = seen.has(pathKey) || (isIgnored && isIgnored(path));\n\t\tseen.add(pathKey);\n\t\treturn !seenOrIgnored;\n\t};\n};\n\nconst unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));\nconst unionFastGlobStreams = (streams, filter) => merge2(streams).pipe(new FilterStream(fastGlobResult => filter(fastGlobResult)));\n\nconst convertNegativePatterns = (patterns, options) => {\n\tconst tasks = [];\n\n\twhile (patterns.length > 0) {\n\t\tconst index = patterns.findIndex(pattern => isNegativePattern(pattern));\n\n\t\tif (index === -1) {\n\t\t\ttasks.push({patterns, options});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst ignorePattern = patterns[index].slice(1);\n\n\t\tfor (const task of tasks) {\n\t\t\ttask.options.ignore.push(ignorePattern);\n\t\t}\n\n\t\tif (index !== 0) {\n\t\t\ttasks.push({\n\t\t\t\tpatterns: patterns.slice(0, index),\n\t\t\t\toptions: {\n\t\t\t\t\t...options,\n\t\t\t\t\tignore: [\n\t\t\t\t\t\t...options.ignore,\n\t\t\t\t\t\tignorePattern,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpatterns = patterns.slice(index + 1);\n\t}\n\n\treturn tasks;\n};\n\nconst getDirGlobOptions = (options, cwd) => ({\n\t...(cwd ? {cwd} : {}),\n\t...(Array.isArray(options) ? {files: options} : options),\n});\n\nconst generateTasks = async (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn Promise.all(\n\t\tglobTasks.map(async task => {\n\t\t\tlet {patterns, options} = task;\n\n\t\t\t[\n\t\t\t\tpatterns,\n\t\t\t\toptions.ignore,\n\t\t\t] = await Promise.all([\n\t\t\t\tdirGlob(patterns, patternExpandOptions),\n\t\t\t\tdirGlob(options.ignore, ignoreExpandOptions),\n\t\t\t]);\n\n\t\t\treturn {patterns, options};\n\t\t}),\n\t);\n};\n\nconst generateTasksSync = (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn globTasks.map(task => {\n\t\tlet {patterns, options} = task;\n\t\tpatterns = dirGlob.sync(patterns, patternExpandOptions);\n\t\toptions.ignore = dirGlob.sync(options.ignore, ignoreExpandOptions);\n\t\treturn {patterns, options};\n\t});\n};\n\nexport const globby = normalizeArguments(async (patterns, options) => {\n\tconst [\n\t\ttasks,\n\t\tfilter,\n\t] = await Promise.all([\n\t\tgenerateTasks(patterns, options),\n\t\tgetFilter(options),\n\t]);\n\tconst results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbySync = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst results = tasks.map(task => fastGlob.sync(task.patterns, task.options));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbyStream = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));\n\n\treturn unionFastGlobStreams(streams, filter);\n});\n\nexport const isDynamicPattern = normalizeArgumentsSync(\n\t(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),\n);\n\nexport const generateGlobTasks = normalizeArguments(generateTasks);\nexport const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);\n\nexport {\n\tisGitIgnored,\n\tisGitIgnoredSync,\n} from './ignore.js';\n"],"names":["toPath","GITIGNORE_FILES_PATTERN","isIgnoredByIgnoreFiles","path","nodePath","index","isNegativePattern","patterns","options","dirGlob","fastGlob"],"mappings":";;;;;;;;;;AAYA,MAAM,sBAAsB,cAAY;AACvC,MAAI,SAAS,KAAK,aAAW,OAAO,YAAY,QAAQ,GAAG;AAC1D,UAAM,IAAI,UAAU,kDAAkD;AAAA,EACtE;AACF;AAEA,MAAM,kBAAkB,cAAY;AACnC,aAAW,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,KAAM,CAAA,CAAC;AACzC,sBAAoB,QAAQ;AAC5B,SAAO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A,QACCD;AAAA,QACAC,SAAQ;AAAA,MACZ,IAAO,MAAM,QAAQ,IAAI;AAAA,QACrBC,QAAO,QAACF,WAAU,oBAAoB;AAAA,QACtCE,gBAAQD,SAAQ,QAAQ,mBAAmB;AAAA,MAC/C,CAAI;AAED,aAAO,EAAC,UAAAD,WAAU,SAAAC,SAAO;AAAA,IAC5B,CAAG;AAAA,EACH;AACA;AAsBY,MAAC,SAAS,mBAAmB,OAAO,UAAU,YAAY;AACrE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,EACF,IAAK,MAAM,QAAQ,IAAI;AAAA,IACrB,cAAc,UAAU,OAAO;AAAA,IAC/B,UAAU,OAAO;AAAA,EACnB,CAAE;AACD,QAAM,UAAU,MAAM,QAAQ,IAAI,MAAM,IAAI,UAAQE,MAAS,KAAK,UAAU,KAAK,OAAO,CAAC,CAAC;AAE1F,SAAO,qBAAqB,SAAS,MAAM;AAC5C,CAAC;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/globby/index.js"],"sourcesContent":["import fs from 'node:fs';\nimport nodePath from 'node:path';\nimport merge2 from 'merge2';\nimport fastGlob from 'fast-glob';\nimport dirGlob from 'dir-glob';\nimport {\n\tGITIGNORE_FILES_PATTERN,\n\tisIgnoredByIgnoreFiles,\n\tisIgnoredByIgnoreFilesSync,\n} from './ignore.js';\nimport {FilterStream, toPath, isNegativePattern} from './utilities.js';\n\nconst assertPatternsInput = patterns => {\n\tif (patterns.some(pattern => typeof pattern !== 'string')) {\n\t\tthrow new TypeError('Patterns must be a string or an array of strings');\n\t}\n};\n\nconst toPatternsArray = patterns => {\n\tpatterns = [...new Set([patterns].flat())];\n\tassertPatternsInput(patterns);\n\treturn patterns;\n};\n\nconst checkCwdOption = options => {\n\tif (!options.cwd) {\n\t\treturn;\n\t}\n\n\tlet stat;\n\ttry {\n\t\tstat = fs.statSync(options.cwd);\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (!stat.isDirectory()) {\n\t\tthrow new Error('The `cwd` option must be a path to a directory');\n\t}\n};\n\nconst normalizeOptions = (options = {}) => {\n\toptions = {\n\t\tignore: [],\n\t\texpandDirectories: true,\n\t\t...options,\n\t\tcwd: toPath(options.cwd),\n\t};\n\n\tcheckCwdOption(options);\n\n\treturn options;\n};\n\nconst normalizeArguments = fn => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\nconst normalizeArgumentsSync = fn => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\n\nconst getIgnoreFilesPatterns = options => {\n\tconst {ignoreFiles, gitignore} = options;\n\n\tconst patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];\n\tif (gitignore) {\n\t\tpatterns.push(GITIGNORE_FILES_PATTERN);\n\t}\n\n\treturn patterns;\n};\n\nconst getFilter = async options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, {cwd: options.cwd}),\n\t);\n};\n\nconst getFilterSync = options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, {cwd: options.cwd}),\n\t);\n};\n\nconst createFilterFunction = isIgnored => {\n\tconst seen = new Set();\n\n\treturn fastGlobResult => {\n\t\tconst path = fastGlobResult.path || fastGlobResult;\n\t\tconst pathKey = nodePath.normalize(path);\n\t\tconst seenOrIgnored = seen.has(pathKey) || (isIgnored && isIgnored(path));\n\t\tseen.add(pathKey);\n\t\treturn !seenOrIgnored;\n\t};\n};\n\nconst unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));\nconst unionFastGlobStreams = (streams, filter) => merge2(streams).pipe(new FilterStream(fastGlobResult => filter(fastGlobResult)));\n\nconst convertNegativePatterns = (patterns, options) => {\n\tconst tasks = [];\n\n\twhile (patterns.length > 0) {\n\t\tconst index = patterns.findIndex(pattern => isNegativePattern(pattern));\n\n\t\tif (index === -1) {\n\t\t\ttasks.push({patterns, options});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst ignorePattern = patterns[index].slice(1);\n\n\t\tfor (const task of tasks) {\n\t\t\ttask.options.ignore.push(ignorePattern);\n\t\t}\n\n\t\tif (index !== 0) {\n\t\t\ttasks.push({\n\t\t\t\tpatterns: patterns.slice(0, index),\n\t\t\t\toptions: {\n\t\t\t\t\t...options,\n\t\t\t\t\tignore: [\n\t\t\t\t\t\t...options.ignore,\n\t\t\t\t\t\tignorePattern,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpatterns = patterns.slice(index + 1);\n\t}\n\n\treturn tasks;\n};\n\nconst getDirGlobOptions = (options, cwd) => ({\n\t...(cwd ? {cwd} : {}),\n\t...(Array.isArray(options) ? {files: options} : options),\n});\n\nconst generateTasks = async (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn Promise.all(\n\t\tglobTasks.map(async task => {\n\t\t\tlet {patterns, options} = task;\n\n\t\t\t[\n\t\t\t\tpatterns,\n\t\t\t\toptions.ignore,\n\t\t\t] = await Promise.all([\n\t\t\t\tdirGlob(patterns, patternExpandOptions),\n\t\t\t\tdirGlob(options.ignore, ignoreExpandOptions),\n\t\t\t]);\n\n\t\t\treturn {patterns, options};\n\t\t}),\n\t);\n};\n\nconst generateTasksSync = (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn globTasks.map(task => {\n\t\tlet {patterns, options} = task;\n\t\tpatterns = dirGlob.sync(patterns, patternExpandOptions);\n\t\toptions.ignore = dirGlob.sync(options.ignore, ignoreExpandOptions);\n\t\treturn {patterns, options};\n\t});\n};\n\nexport const globby = normalizeArguments(async (patterns, options) => {\n\tconst [\n\t\ttasks,\n\t\tfilter,\n\t] = await Promise.all([\n\t\tgenerateTasks(patterns, options),\n\t\tgetFilter(options),\n\t]);\n\tconst results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbySync = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst results = tasks.map(task => fastGlob.sync(task.patterns, task.options));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbyStream = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));\n\n\treturn unionFastGlobStreams(streams, filter);\n});\n\nexport const isDynamicPattern = normalizeArgumentsSync(\n\t(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),\n);\n\nexport const generateGlobTasks = normalizeArguments(generateTasks);\nexport const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);\n\nexport {\n\tisGitIgnored,\n\tisGitIgnoredSync,\n} from './ignore.js';\n"],"names":["nodePath","patterns","options","dirGlob","fastGlob"],"mappings":";;;;;;;;AAYA,MAAM,sBAAsB,cAAY;AACvC,MAAI,SAAS,KAAK,aAAW,OAAO,YAAY,QAAQ,GAAG;AAC1D,UAAM,IAAI,UAAU,kDAAkD;AAAA,EACtE;AACF;AAEA,MAAM,kBAAkB,cAAY;AACnC,aAAW,CAAC,GAAG,IAA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AAC,WAAU,SAAAC,SAAO,IAAI;AAE1B;AAAA,QACCD;AAAA,QACAC,SAAQ;AAAA,MACZ,IAAO,MAAM,QAAQ,IAAI;AAAA,QACrBC,eAAQF,WAAU,oBAAoB;AAAA,QACtCE,eAAQD,SAAQ,QAAQ,mBAAmB;AAAA,MAC/C,CAAI;AAED,aAAO,EAAC,UAAAD,WAAU,SAAAC,SAAO;AAAA,IAC5B,CAAG;AAAA,EACH;AACA;AAsBY,MAAC,SAAS,mBAAmB,OAAO,UAAU,YAAY;AACrE,QAAM;AAAA,IACL;AAAA,IACA;AAAA,EACF,IAAK,MAAM,QAAQ,IAAI;AAAA,IACrB,cAAc,UAAU,OAAO;AAAA,IAC/B,UAAU,OAAO;AAAA,EACnB,CAAE;AACD,QAAM,UAAU,MAAM,QAAQ,IAAI,MAAM,IAAI,UAAQE,IAAS,KAAK,UAAU,KAAK,OAAO,CAAC,CAAC;AAE1F,SAAO,qBAAqB,SAAS,MAAM;AAC5C,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../node_modules/is-plain-obj/index.js"],"sourcesContent":["'use strict';\nvar toString = Object.prototype.toString;\n\nmodule.exports = function (x) {\n\tvar prototype;\n\treturn toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));\n};\n"],"names":[],"mappings":";AACA,IAAI,WAAW,OAAO,UAAU;IAEhC,aAAiB,SAAU,GAAG;AAC7B,MAAI;AACJ,SAAO,SAAS,KAAK,CAAC,MAAM,sBAAsB,YAAY,OAAO,eAAe,CAAC,GAAG,cAAc,QAAQ,cAAc,OAAO,eAAe,CAAE,CAAA;AACrJ;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/is-plain-obj/index.js"],"sourcesContent":["'use strict';\nvar toString = Object.prototype.toString;\n\nmodule.exports = function (x) {\n\tvar prototype;\n\treturn toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));\n};\n"],"names":[],"mappings":"AACA,IAAI,WAAW,OAAO,UAAU;IAEhC,aAAiB,SAAU,GAAG;AAC7B,MAAI;AACJ,SAAO,SAAS,KAAK,CAAC,MAAM,sBAAsB,YAAY,OAAO,eAAe,CAAC,GAAG,cAAc,QAAQ,cAAc,OAAO,eAAe,CAAE,CAAA;AACrJ;","x_google_ignoreList":[0]}
|
/package/dist/_node_modules/{is-plain-obj → minimist-options/_node_modules/is-plain-obj}/index.cjs
RENAMED
|
File without changes
|
/package/dist/_node_modules/{is-plain-obj → minimist-options/_node_modules/is-plain-obj}/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|