@forsakringskassan/docs-generator 2.22.0 → 2.23.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/dist/compile-example.js +14 -5
- package/dist/compile-example.js.map +1 -1
- package/dist/{create-markdown-renderer-CgqU8rql.js → create-markdown-renderer-BSbHc8U0.js} +11 -3
- package/dist/create-markdown-renderer-BSbHc8U0.js.map +1 -0
- package/dist/index.js +11 -57
- package/dist/index.js.map +1 -1
- package/dist/markdown.js +4 -3
- package/dist/markdown.js.map +1 -1
- package/dist/runtime.js +2484 -1975
- package/dist/style/core.css +21 -5
- package/dist/style/index.css +27 -10
- package/dist/style/site.css +6 -5
- package/dist/{vendor-BUiT5f0C.js → vendor-BxO3IPg6.js} +661 -11
- package/dist/vendor-BxO3IPg6.js.map +1 -0
- package/dist/{vue3-CLY8kH6A.js → vue3-CZnjnYGV.js} +15 -8
- package/dist/vue3-CZnjnYGV.js.map +1 -0
- package/package.json +3 -1
- package/templates/macro/menu.html +3 -0
- package/templates/partials/footer.html +9 -3
- package/dist/create-markdown-renderer-CgqU8rql.js.map +0 -1
- package/dist/vendor-BUiT5f0C.js.map +0 -1
- package/dist/vue3-CLY8kH6A.js.map +0 -1
|
@@ -15,6 +15,7 @@ var require$$0$3 = require('stream');
|
|
|
15
15
|
var require$$1$1 = require('util');
|
|
16
16
|
var require$$5 = require('assert');
|
|
17
17
|
var sysPath = require('path');
|
|
18
|
+
var node_module = require('node:module');
|
|
18
19
|
var require$$0$4 = require('readline');
|
|
19
20
|
var require$$3 = require('events');
|
|
20
21
|
var process$1 = require('node:process');
|
|
@@ -33,6 +34,7 @@ var require$$2$1 = require('tls');
|
|
|
33
34
|
var require$$1$4 = require('tty');
|
|
34
35
|
var require$$0$7 = require('querystring');
|
|
35
36
|
|
|
37
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
36
38
|
function _interopNamespaceDefault(e) {
|
|
37
39
|
var n = Object.create(null);
|
|
38
40
|
if (e) {
|
|
@@ -1430,7 +1432,7 @@ function normalizeReference (str) {
|
|
|
1430
1432
|
// so plugins won't have to depend on them explicitly, which reduces their
|
|
1431
1433
|
// bundled size (e.g. a browser build).
|
|
1432
1434
|
//
|
|
1433
|
-
const lib$
|
|
1435
|
+
const lib$3 = { mdurl, ucmicro };
|
|
1434
1436
|
|
|
1435
1437
|
var utils$3 = /*#__PURE__*/Object.freeze({
|
|
1436
1438
|
__proto__: null,
|
|
@@ -1446,7 +1448,7 @@ var utils$3 = /*#__PURE__*/Object.freeze({
|
|
|
1446
1448
|
isString: isString$1,
|
|
1447
1449
|
isValidEntityCode: isValidEntityCode,
|
|
1448
1450
|
isWhiteSpace: isWhiteSpace,
|
|
1449
|
-
lib: lib$
|
|
1451
|
+
lib: lib$3,
|
|
1450
1452
|
normalizeReference: normalizeReference,
|
|
1451
1453
|
unescapeAll: unescapeAll,
|
|
1452
1454
|
unescapeMd: unescapeMd
|
|
@@ -23500,14 +23502,14 @@ function requireMove () {
|
|
|
23500
23502
|
return move;
|
|
23501
23503
|
}
|
|
23502
23504
|
|
|
23503
|
-
var lib$
|
|
23504
|
-
var hasRequiredLib$
|
|
23505
|
+
var lib$2;
|
|
23506
|
+
var hasRequiredLib$2;
|
|
23505
23507
|
|
|
23506
|
-
function requireLib$
|
|
23507
|
-
if (hasRequiredLib$
|
|
23508
|
-
hasRequiredLib$
|
|
23508
|
+
function requireLib$2 () {
|
|
23509
|
+
if (hasRequiredLib$2) return lib$2;
|
|
23510
|
+
hasRequiredLib$2 = 1;
|
|
23509
23511
|
|
|
23510
|
-
lib$
|
|
23512
|
+
lib$2 = {
|
|
23511
23513
|
// Export promiseified graceful-fs:
|
|
23512
23514
|
...requireFs(),
|
|
23513
23515
|
// Export extra methods:
|
|
@@ -23521,11 +23523,658 @@ function requireLib$1 () {
|
|
|
23521
23523
|
...requirePathExists(),
|
|
23522
23524
|
...requireRemove()
|
|
23523
23525
|
};
|
|
23526
|
+
return lib$2;
|
|
23527
|
+
}
|
|
23528
|
+
|
|
23529
|
+
var libExports$1 = /*@__PURE__*/ requireLib$2();
|
|
23530
|
+
var fse = /*@__PURE__*/getDefaultExportFromCjs(libExports$1);
|
|
23531
|
+
|
|
23532
|
+
/*!
|
|
23533
|
+
* path-root-regex <https://github.com/jonschlinkert/path-root-regex>
|
|
23534
|
+
*
|
|
23535
|
+
* Copyright (c) 2016, Jon Schlinkert.
|
|
23536
|
+
* Licensed under the MIT License.
|
|
23537
|
+
*/
|
|
23538
|
+
|
|
23539
|
+
var pathRootRegex;
|
|
23540
|
+
var hasRequiredPathRootRegex;
|
|
23541
|
+
|
|
23542
|
+
function requirePathRootRegex () {
|
|
23543
|
+
if (hasRequiredPathRootRegex) return pathRootRegex;
|
|
23544
|
+
hasRequiredPathRootRegex = 1;
|
|
23545
|
+
|
|
23546
|
+
pathRootRegex = function() {
|
|
23547
|
+
// Regex is modified from the split device regex in the node.js path module.
|
|
23548
|
+
return /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?/;
|
|
23549
|
+
};
|
|
23550
|
+
return pathRootRegex;
|
|
23551
|
+
}
|
|
23552
|
+
|
|
23553
|
+
/*!
|
|
23554
|
+
* path-root <https://github.com/jonschlinkert/path-root>
|
|
23555
|
+
*
|
|
23556
|
+
* Copyright (c) 2016, Jon Schlinkert.
|
|
23557
|
+
* Licensed under the MIT License.
|
|
23558
|
+
*/
|
|
23559
|
+
|
|
23560
|
+
var pathRoot;
|
|
23561
|
+
var hasRequiredPathRoot;
|
|
23562
|
+
|
|
23563
|
+
function requirePathRoot () {
|
|
23564
|
+
if (hasRequiredPathRoot) return pathRoot;
|
|
23565
|
+
hasRequiredPathRoot = 1;
|
|
23566
|
+
|
|
23567
|
+
var pathRootRegex = requirePathRootRegex();
|
|
23568
|
+
|
|
23569
|
+
pathRoot = function(filepath) {
|
|
23570
|
+
if (typeof filepath !== 'string') {
|
|
23571
|
+
throw new TypeError('expected a string');
|
|
23572
|
+
}
|
|
23573
|
+
|
|
23574
|
+
var match = pathRootRegex().exec(filepath);
|
|
23575
|
+
if (match) {
|
|
23576
|
+
return match[0];
|
|
23577
|
+
}
|
|
23578
|
+
};
|
|
23579
|
+
return pathRoot;
|
|
23580
|
+
}
|
|
23581
|
+
|
|
23582
|
+
var rethrowUnlessCode = {};
|
|
23583
|
+
|
|
23584
|
+
var hasRequiredRethrowUnlessCode;
|
|
23585
|
+
|
|
23586
|
+
function requireRethrowUnlessCode () {
|
|
23587
|
+
if (hasRequiredRethrowUnlessCode) return rethrowUnlessCode;
|
|
23588
|
+
hasRequiredRethrowUnlessCode = 1;
|
|
23589
|
+
Object.defineProperty(rethrowUnlessCode, "__esModule", { value: true });
|
|
23590
|
+
function rethrowUnlessCode$1(maybeError, ...codes) {
|
|
23591
|
+
if (maybeError !== null && typeof maybeError === 'object') {
|
|
23592
|
+
const code = maybeError.code;
|
|
23593
|
+
for (const allowed of codes) {
|
|
23594
|
+
if (code === allowed) {
|
|
23595
|
+
return;
|
|
23596
|
+
}
|
|
23597
|
+
}
|
|
23598
|
+
}
|
|
23599
|
+
throw maybeError;
|
|
23600
|
+
}
|
|
23601
|
+
rethrowUnlessCode.default = rethrowUnlessCode$1;
|
|
23602
|
+
|
|
23603
|
+
return rethrowUnlessCode;
|
|
23604
|
+
}
|
|
23605
|
+
|
|
23606
|
+
var shouldPreserveSymlinks;
|
|
23607
|
+
var hasRequiredShouldPreserveSymlinks;
|
|
23608
|
+
|
|
23609
|
+
function requireShouldPreserveSymlinks () {
|
|
23610
|
+
if (hasRequiredShouldPreserveSymlinks) return shouldPreserveSymlinks;
|
|
23611
|
+
hasRequiredShouldPreserveSymlinks = 1;
|
|
23612
|
+
function includes(array, entry) {
|
|
23613
|
+
for (let i = 0; i < array.length; i++) {
|
|
23614
|
+
if (array[i] === entry) {
|
|
23615
|
+
return true;
|
|
23616
|
+
}
|
|
23617
|
+
}
|
|
23618
|
+
return false;
|
|
23619
|
+
}
|
|
23620
|
+
shouldPreserveSymlinks = function (process) {
|
|
23621
|
+
return !!process.env.NODE_PRESERVE_SYMLINKS || includes(process.execArgv, '--preserve-symlinks');
|
|
23622
|
+
};
|
|
23623
|
+
|
|
23624
|
+
return shouldPreserveSymlinks;
|
|
23625
|
+
}
|
|
23626
|
+
|
|
23627
|
+
var resolvePackagePath_1;
|
|
23628
|
+
var hasRequiredResolvePackagePath;
|
|
23629
|
+
|
|
23630
|
+
function requireResolvePackagePath () {
|
|
23631
|
+
if (hasRequiredResolvePackagePath) return resolvePackagePath_1;
|
|
23632
|
+
hasRequiredResolvePackagePath = 1;
|
|
23633
|
+
var __importDefault = (resolvePackagePath_1 && resolvePackagePath_1.__importDefault) || function (mod) {
|
|
23634
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23635
|
+
};
|
|
23636
|
+
// credit goes to https://github.com/davecombs
|
|
23637
|
+
// extracted in part from: https://github.com/stefanpenner/hash-for-dep/blob/15b2ebcf22024ceb2eb7907f8c412ae40f87b15e/lib/resolve-package-path.js#L1
|
|
23638
|
+
//
|
|
23639
|
+
const fs = require$$0;
|
|
23640
|
+
const path = sysPath;
|
|
23641
|
+
const pathRoot = requirePathRoot();
|
|
23642
|
+
const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
|
|
23643
|
+
/*
|
|
23644
|
+
* Define a regex that will match against the 'name' value passed into
|
|
23645
|
+
* resolvePackagePath. The regex corresponds to the following test:
|
|
23646
|
+
* Match any of the following 3 alternatives:
|
|
23647
|
+
*
|
|
23648
|
+
* 1) dot, then optional second dot, then / or nothing i.e. . ./ .. ../ OR
|
|
23649
|
+
* 2) / i.e. / OR
|
|
23650
|
+
* 3) (A-Za-z colon - [optional]), then / or \ i.e. optional drive letter + colon, then / or \
|
|
23651
|
+
*
|
|
23652
|
+
* Basically, the three choices mean "explicitly relative or absolute path, on either
|
|
23653
|
+
* Unix/Linux or Windows"
|
|
23654
|
+
*/
|
|
23655
|
+
const ABSOLUTE_OR_RELATIVE_PATH_REGEX = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
|
|
23656
|
+
const shouldPreserveSymlinks = requireShouldPreserveSymlinks();
|
|
23657
|
+
const PRESERVE_SYMLINKS = shouldPreserveSymlinks(process);
|
|
23658
|
+
/*
|
|
23659
|
+
* Resolve the real path for a file. Return null if does not
|
|
23660
|
+
* exist or is not a file or FIFO, return the real path otherwise.
|
|
23661
|
+
*
|
|
23662
|
+
* Cache the result in the passed-in cache for performance,
|
|
23663
|
+
* keyed on the filePath passed in.
|
|
23664
|
+
*
|
|
23665
|
+
* NOTE: Because this is a private method, it does not attempt to normalize
|
|
23666
|
+
* the path passed in - it assumes the caller has done that.
|
|
23667
|
+
*
|
|
23668
|
+
* @private
|
|
23669
|
+
* @method _getRealFilePath
|
|
23670
|
+
* @param {Cache} realFilePathCache the Cache object to cache the real (resolved)
|
|
23671
|
+
* path in, keyed by filePath. See lib/cache.js and lib/cache-group.js
|
|
23672
|
+
* @param {String} filePath the path to the file of interest (which must have
|
|
23673
|
+
* been normalized, but not necessarily resolved to a real path).
|
|
23674
|
+
* @return {String} real path or null
|
|
23675
|
+
*/
|
|
23676
|
+
function _getRealFilePath(realFilePathCache, filePath) {
|
|
23677
|
+
if (realFilePathCache.has(filePath)) {
|
|
23678
|
+
return realFilePathCache.get(filePath); // could be null
|
|
23679
|
+
}
|
|
23680
|
+
let realPath = null; // null = 'FILE NOT FOUND'
|
|
23681
|
+
try {
|
|
23682
|
+
const stat = fs.statSync(filePath);
|
|
23683
|
+
// I don't know if Node would handle having the filePath actually
|
|
23684
|
+
// be a FIFO, but as the following is also part of the node-resolution
|
|
23685
|
+
// algorithm in resolve.sync(), we'll do the same check here.
|
|
23686
|
+
if (stat.isFile() || stat.isFIFO()) {
|
|
23687
|
+
if (PRESERVE_SYMLINKS) {
|
|
23688
|
+
realPath = filePath;
|
|
23689
|
+
}
|
|
23690
|
+
else {
|
|
23691
|
+
realPath = fs.realpathSync(filePath);
|
|
23692
|
+
}
|
|
23693
|
+
}
|
|
23694
|
+
}
|
|
23695
|
+
catch (e) {
|
|
23696
|
+
(0, rethrow_unless_code_1.default)(e, 'ENOENT');
|
|
23697
|
+
}
|
|
23698
|
+
realFilePathCache.set(filePath, realPath);
|
|
23699
|
+
return realPath;
|
|
23700
|
+
}
|
|
23701
|
+
/*
|
|
23702
|
+
* Resolve the real path for a directory, return null if does not
|
|
23703
|
+
* exist or is not a directory, return the real path otherwise.
|
|
23704
|
+
*
|
|
23705
|
+
* @param {Cache} realDirectoryPathCache the Cache object to cache the real (resolved)
|
|
23706
|
+
* path in, keyed by directoryPath. See lib/cache.js and lib/cache-group.js
|
|
23707
|
+
* @param {String} directoryPath the path to the directory of interest (which must have
|
|
23708
|
+
* been normalized, but not necessarily resolved to a real path).
|
|
23709
|
+
* @return {String} real path or null
|
|
23710
|
+
*/
|
|
23711
|
+
function _getRealDirectoryPath(realDirectoryPathCache, directoryPath) {
|
|
23712
|
+
if (realDirectoryPathCache.has(directoryPath)) {
|
|
23713
|
+
return realDirectoryPathCache.get(directoryPath); // could be null
|
|
23714
|
+
}
|
|
23715
|
+
let realPath = null;
|
|
23716
|
+
try {
|
|
23717
|
+
const stat = fs.statSync(directoryPath);
|
|
23718
|
+
if (stat.isDirectory()) {
|
|
23719
|
+
if (PRESERVE_SYMLINKS) {
|
|
23720
|
+
realPath = directoryPath;
|
|
23721
|
+
}
|
|
23722
|
+
else {
|
|
23723
|
+
realPath = fs.realpathSync(directoryPath);
|
|
23724
|
+
}
|
|
23725
|
+
}
|
|
23726
|
+
}
|
|
23727
|
+
catch (e) {
|
|
23728
|
+
(0, rethrow_unless_code_1.default)(e, 'ENOENT', 'ENOTDIR');
|
|
23729
|
+
}
|
|
23730
|
+
realDirectoryPathCache.set(directoryPath, realPath);
|
|
23731
|
+
return realPath;
|
|
23732
|
+
}
|
|
23733
|
+
/*
|
|
23734
|
+
* Given a package 'name' and starting directory, resolve to a real (existing) file path.
|
|
23735
|
+
*
|
|
23736
|
+
* Do it similar to how it is done in resolve.sync() - travel up the directory hierarchy,
|
|
23737
|
+
* attaching 'node-modules' to each directory and seeing if the directory exists and
|
|
23738
|
+
* has the relevant 'package.json' file we're searching for. It is *much* faster than
|
|
23739
|
+
* resolve.sync(), because we don't test that the requested name is a directory.
|
|
23740
|
+
* This routine assumes that it is only called when we don't already have
|
|
23741
|
+
* the cached entry.
|
|
23742
|
+
*
|
|
23743
|
+
* NOTE: it is valid for 'name' to be an absolute or relative path.
|
|
23744
|
+
* Because this is an internal routine, we'll require that 'dir' be non-empty
|
|
23745
|
+
* if this is called, to make things simpler (see resolvePackagePath).
|
|
23746
|
+
*
|
|
23747
|
+
* @param realFilePathCache the cache containing the real paths corresponding to
|
|
23748
|
+
* various file and directory paths (which may or may not be already resolved).
|
|
23749
|
+
*
|
|
23750
|
+
* @param name the 'name' of the module, i.e. x in require(x), but with
|
|
23751
|
+
* '/package.json' on the end. It is NOT referring to a directory (so we don't
|
|
23752
|
+
* have to do the directory checks that resolve.sync does).
|
|
23753
|
+
* NOTE: because this is an internal routine, for speed it does not check
|
|
23754
|
+
* that '/package.json' is actually the end of the name.
|
|
23755
|
+
*
|
|
23756
|
+
* @param dir the directory (MUST BE non-empty, and valid) to start from, appending the name to the
|
|
23757
|
+
* directory and checking that the file exists. Go up the directory hierarchy from there.
|
|
23758
|
+
* if name is itself an absolute path,
|
|
23759
|
+
*
|
|
23760
|
+
* @result the path to the actual package.json file that's found, or null if not.
|
|
23761
|
+
*/
|
|
23762
|
+
function _findPackagePath(realFilePathCache, name, dir) {
|
|
23763
|
+
const fsRoot = pathRoot(dir);
|
|
23764
|
+
let currPath = dir;
|
|
23765
|
+
while (currPath !== fsRoot) {
|
|
23766
|
+
// when testing for 'node_modules', need to allow names like NODE_MODULES,
|
|
23767
|
+
// which can occur with case-insensitive OSes.
|
|
23768
|
+
let endsWithNodeModules = path.basename(currPath).toLowerCase() === 'node_modules';
|
|
23769
|
+
let filePath = path.join(currPath, endsWithNodeModules ? '' : 'node_modules', name);
|
|
23770
|
+
let realPath = _getRealFilePath(realFilePathCache, filePath);
|
|
23771
|
+
if (realPath) {
|
|
23772
|
+
return realPath;
|
|
23773
|
+
}
|
|
23774
|
+
if (endsWithNodeModules) {
|
|
23775
|
+
// go up past the ending node_modules directory so the next dirname
|
|
23776
|
+
// goes up past that (if ending in node_modules, going up just one
|
|
23777
|
+
// directory below will then add 'node_modules' on the next loop and
|
|
23778
|
+
// re-process this same node_modules directory.
|
|
23779
|
+
currPath = path.dirname(currPath);
|
|
23780
|
+
}
|
|
23781
|
+
currPath = path.dirname(currPath);
|
|
23782
|
+
}
|
|
23783
|
+
return null;
|
|
23784
|
+
}
|
|
23785
|
+
/*
|
|
23786
|
+
* Resolve the path to the nearest `package.json` from the given initial search
|
|
23787
|
+
* directory.
|
|
23788
|
+
*
|
|
23789
|
+
* @param {Cache} findUpCache - a cache of memoized results that is
|
|
23790
|
+
* prioritized to avoid I/O.
|
|
23791
|
+
*
|
|
23792
|
+
* @param {string} initialSearchDir - the normalized path to start searching
|
|
23793
|
+
* from.
|
|
23794
|
+
*
|
|
23795
|
+
* @return {string | null} - the deepest directory on the path to root from
|
|
23796
|
+
* `initialSearchDir` that contains a {{package.json}}, or `null` if no such
|
|
23797
|
+
* directory exists.
|
|
23798
|
+
*/
|
|
23799
|
+
function _findUpPackagePath(findUpCache, initialSearchDir) {
|
|
23800
|
+
let previous;
|
|
23801
|
+
let dir = initialSearchDir;
|
|
23802
|
+
let maybePackageJsonPath;
|
|
23803
|
+
let result = null;
|
|
23804
|
+
do {
|
|
23805
|
+
if (findUpCache.has(dir)) {
|
|
23806
|
+
result = findUpCache.get(dir);
|
|
23807
|
+
break;
|
|
23808
|
+
}
|
|
23809
|
+
maybePackageJsonPath = path.join(dir, 'package.json');
|
|
23810
|
+
if (fs.existsSync(maybePackageJsonPath)) {
|
|
23811
|
+
result = maybePackageJsonPath;
|
|
23812
|
+
break;
|
|
23813
|
+
}
|
|
23814
|
+
previous = dir;
|
|
23815
|
+
dir = path.dirname(dir);
|
|
23816
|
+
} while (dir !== previous);
|
|
23817
|
+
findUpCache.set(initialSearchDir, result);
|
|
23818
|
+
return result;
|
|
23819
|
+
}
|
|
23820
|
+
/*
|
|
23821
|
+
* Resolve the path to a module's package.json file, if it exists. The
|
|
23822
|
+
* name and dir are as in hashForDep and ModuleEntry.locate.
|
|
23823
|
+
*
|
|
23824
|
+
* @param caches an instance of CacheGroup where information will be cached
|
|
23825
|
+
* during processing.
|
|
23826
|
+
*
|
|
23827
|
+
* @param name the 'name' of the module. The name may also be a path,
|
|
23828
|
+
* either relative or absolute. The path must be to a module DIRECTORY, NOT to the
|
|
23829
|
+
* package.json file in the directory, as we attach 'package.json' here.
|
|
23830
|
+
*
|
|
23831
|
+
* @param dir (optional) the root directory to run the path resolution from.
|
|
23832
|
+
* if dir is not provided, __dirname for this module is used instead.
|
|
23833
|
+
*
|
|
23834
|
+
* @return the realPath corresponding to the module's package.json file, or null
|
|
23835
|
+
* if that file is not found or is not a file.
|
|
23836
|
+
*
|
|
23837
|
+
* Note: 'name' is expected in the format expected for require(x), i.e., it is
|
|
23838
|
+
* resolved using the Node path-normalization rules.
|
|
23839
|
+
*/
|
|
23840
|
+
function resolvePackagePath(caches, name, dir) {
|
|
23841
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
23842
|
+
throw new TypeError("resolvePackagePath: 'name' must be a non-zero-length string.");
|
|
23843
|
+
}
|
|
23844
|
+
// Perform tests similar to those in resolve.sync().
|
|
23845
|
+
let basedir = dir || __dirname;
|
|
23846
|
+
// Ensure that basedir is an absolute path at this point. If it does not refer to
|
|
23847
|
+
// a real directory, go up the path until a real directory is found, or return an error.
|
|
23848
|
+
// BUG!: this will never throw an exception, at least on Unix/Linux. If the path is
|
|
23849
|
+
// relative, path.resolve() will make it absolute by putting the current directory
|
|
23850
|
+
// before it, so it won't fail. If the path is already absolute, / will always be
|
|
23851
|
+
// valid, so again it won't fail.
|
|
23852
|
+
let absoluteStart = path.resolve(basedir);
|
|
23853
|
+
while (_getRealDirectoryPath(caches.REAL_DIRECTORY_PATH, absoluteStart) === null) {
|
|
23854
|
+
absoluteStart = path.dirname(absoluteStart);
|
|
23855
|
+
}
|
|
23856
|
+
if (!absoluteStart) {
|
|
23857
|
+
let error = new TypeError("resolvePackagePath: 'dir' or one of the parent directories in its path must refer to a valid directory.");
|
|
23858
|
+
error.code = 'MODULE_NOT_FOUND';
|
|
23859
|
+
throw error;
|
|
23860
|
+
}
|
|
23861
|
+
if (ABSOLUTE_OR_RELATIVE_PATH_REGEX.test(name)) {
|
|
23862
|
+
let res = path.resolve(absoluteStart, name);
|
|
23863
|
+
return _getRealFilePath(caches.REAL_FILE_PATH, path.join(res, 'package.json'));
|
|
23864
|
+
// XXX Do we need to handle the core(x) case too? Not sure.
|
|
23865
|
+
}
|
|
23866
|
+
else {
|
|
23867
|
+
return _findPackagePath(caches.REAL_FILE_PATH, path.join(name, 'package.json'), absoluteStart);
|
|
23868
|
+
}
|
|
23869
|
+
}
|
|
23870
|
+
resolvePackagePath._findPackagePath = _findPackagePath;
|
|
23871
|
+
resolvePackagePath._findUpPackagePath = _findUpPackagePath;
|
|
23872
|
+
resolvePackagePath._getRealFilePath = _getRealFilePath;
|
|
23873
|
+
resolvePackagePath._getRealDirectoryPath = _getRealDirectoryPath;
|
|
23874
|
+
resolvePackagePath_1 = resolvePackagePath;
|
|
23875
|
+
|
|
23876
|
+
return resolvePackagePath_1;
|
|
23877
|
+
}
|
|
23878
|
+
|
|
23879
|
+
var cache;
|
|
23880
|
+
var hasRequiredCache;
|
|
23881
|
+
|
|
23882
|
+
function requireCache () {
|
|
23883
|
+
if (hasRequiredCache) return cache;
|
|
23884
|
+
hasRequiredCache = 1;
|
|
23885
|
+
function makeCache() {
|
|
23886
|
+
// object with no prototype
|
|
23887
|
+
const cache = Object.create(null);
|
|
23888
|
+
// force the jit to immediately realize this object is a dictionary. This
|
|
23889
|
+
// should prevent the JIT from going wastefully one direction (fast mode)
|
|
23890
|
+
// then going another (dict mode) after
|
|
23891
|
+
cache['_cache'] = 1;
|
|
23892
|
+
delete cache['_cache'];
|
|
23893
|
+
return cache;
|
|
23894
|
+
}
|
|
23895
|
+
cache = class Cache {
|
|
23896
|
+
constructor() {
|
|
23897
|
+
this._store = makeCache();
|
|
23898
|
+
}
|
|
23899
|
+
set(key, value) {
|
|
23900
|
+
return (this._store[key] = value);
|
|
23901
|
+
}
|
|
23902
|
+
get(key) {
|
|
23903
|
+
return this._store[key];
|
|
23904
|
+
}
|
|
23905
|
+
has(key) {
|
|
23906
|
+
return key in this._store;
|
|
23907
|
+
}
|
|
23908
|
+
delete(key) {
|
|
23909
|
+
delete this._store[key];
|
|
23910
|
+
}
|
|
23911
|
+
get size() {
|
|
23912
|
+
return Object.keys(this._store).length;
|
|
23913
|
+
}
|
|
23914
|
+
};
|
|
23915
|
+
|
|
23916
|
+
return cache;
|
|
23917
|
+
}
|
|
23918
|
+
|
|
23919
|
+
var cacheGroup;
|
|
23920
|
+
var hasRequiredCacheGroup;
|
|
23921
|
+
|
|
23922
|
+
function requireCacheGroup () {
|
|
23923
|
+
if (hasRequiredCacheGroup) return cacheGroup;
|
|
23924
|
+
hasRequiredCacheGroup = 1;
|
|
23925
|
+
const Cache = requireCache();
|
|
23926
|
+
cacheGroup = class CacheGroup {
|
|
23927
|
+
constructor() {
|
|
23928
|
+
this.MODULE_ENTRY = new Cache();
|
|
23929
|
+
this.PATH = new Cache();
|
|
23930
|
+
this.REAL_FILE_PATH = new Cache();
|
|
23931
|
+
this.REAL_DIRECTORY_PATH = new Cache();
|
|
23932
|
+
Object.freeze(this);
|
|
23933
|
+
}
|
|
23934
|
+
};
|
|
23935
|
+
|
|
23936
|
+
return cacheGroup;
|
|
23937
|
+
}
|
|
23938
|
+
|
|
23939
|
+
var lib$1;
|
|
23940
|
+
var hasRequiredLib$1;
|
|
23941
|
+
|
|
23942
|
+
function requireLib$1 () {
|
|
23943
|
+
if (hasRequiredLib$1) return lib$1;
|
|
23944
|
+
hasRequiredLib$1 = 1;
|
|
23945
|
+
var __importDefault = (lib$1 && lib$1.__importDefault) || function (mod) {
|
|
23946
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23947
|
+
};
|
|
23948
|
+
const path_1 = __importDefault(sysPath);
|
|
23949
|
+
const resolve_package_path_1 = __importDefault(requireResolvePackagePath());
|
|
23950
|
+
const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
|
|
23951
|
+
const ALLOWED_ERROR_CODES = [
|
|
23952
|
+
// resolve package error codes
|
|
23953
|
+
'MODULE_NOT_FOUND',
|
|
23954
|
+
// Yarn PnP Error Codes
|
|
23955
|
+
'UNDECLARED_DEPENDENCY',
|
|
23956
|
+
'MISSING_PEER_DEPENDENCY',
|
|
23957
|
+
'MISSING_DEPENDENCY'
|
|
23958
|
+
];
|
|
23959
|
+
const CacheGroup = requireCacheGroup();
|
|
23960
|
+
const Cache = requireCache();
|
|
23961
|
+
const getRealFilePath = resolve_package_path_1.default._getRealFilePath;
|
|
23962
|
+
const getRealDirectoryPath = resolve_package_path_1.default._getRealDirectoryPath;
|
|
23963
|
+
const __findUpPackagePath = resolve_package_path_1.default._findUpPackagePath;
|
|
23964
|
+
let CACHE = new CacheGroup();
|
|
23965
|
+
let FIND_UP_CACHE = new Cache();
|
|
23966
|
+
let pnp;
|
|
23967
|
+
try {
|
|
23968
|
+
// eslint-disable-next-line node/no-missing-require
|
|
23969
|
+
pnp = require('pnpapi');
|
|
23970
|
+
}
|
|
23971
|
+
catch (error) {
|
|
23972
|
+
// not in Yarn PnP; not a problem
|
|
23973
|
+
}
|
|
23974
|
+
/**
|
|
23975
|
+
* Search each directory in the absolute path `baseDir`, from leaf to root, for
|
|
23976
|
+
* a `package.json`, and return the first match, or `null` if no `package.json`
|
|
23977
|
+
* was found.
|
|
23978
|
+
*
|
|
23979
|
+
* @public
|
|
23980
|
+
* @param {string} baseDir - an absolute path in which to search for a `package.json`
|
|
23981
|
+
* @param {CacheGroup|boolean} [_cache] (optional)
|
|
23982
|
+
* * if true: will choose the default global cache
|
|
23983
|
+
* * if false: will not cache
|
|
23984
|
+
* * if undefined or omitted, will choose the default global cache
|
|
23985
|
+
* * otherwise we assume the argument is an external cache of the form provided by resolve-package-path/lib/cache-group.js
|
|
23986
|
+
*
|
|
23987
|
+
* @return {string|null} a full path to the resolved package.json if found or null if not
|
|
23988
|
+
*/
|
|
23989
|
+
function _findUpPackagePath(baseDir, _cache) {
|
|
23990
|
+
let cache;
|
|
23991
|
+
if (_cache === undefined || _cache === null || _cache === true) {
|
|
23992
|
+
// if no cache specified, or if cache is true then use the global cache
|
|
23993
|
+
cache = FIND_UP_CACHE;
|
|
23994
|
+
}
|
|
23995
|
+
else if (_cache === false) {
|
|
23996
|
+
// if cache is explicity false, create a throw-away cache;
|
|
23997
|
+
cache = new Cache();
|
|
23998
|
+
}
|
|
23999
|
+
else {
|
|
24000
|
+
// otherwise, assume the user has provided an alternative cache for the following form:
|
|
24001
|
+
// provided by resolve-package-path/lib/cache-group.js
|
|
24002
|
+
cache = _cache;
|
|
24003
|
+
}
|
|
24004
|
+
let absoluteStart = path_1.default.resolve(baseDir);
|
|
24005
|
+
return __findUpPackagePath(cache, absoluteStart);
|
|
24006
|
+
}
|
|
24007
|
+
function resolvePackagePath(target, baseDir, _cache) {
|
|
24008
|
+
let cache;
|
|
24009
|
+
if (_cache === undefined || _cache === null || _cache === true) {
|
|
24010
|
+
// if no cache specified, or if cache is true then use the global cache
|
|
24011
|
+
cache = CACHE;
|
|
24012
|
+
}
|
|
24013
|
+
else if (_cache === false) {
|
|
24014
|
+
// if cache is explicity false, create a throw-away cache;
|
|
24015
|
+
cache = new CacheGroup();
|
|
24016
|
+
}
|
|
24017
|
+
else {
|
|
24018
|
+
// otherwise, assume the user has provided an alternative cache for the following form:
|
|
24019
|
+
// provided by resolve-package-path/lib/cache-group.js
|
|
24020
|
+
cache = _cache;
|
|
24021
|
+
}
|
|
24022
|
+
if (baseDir.charAt(baseDir.length - 1) !== path_1.default.sep) {
|
|
24023
|
+
baseDir = `${baseDir}${path_1.default.sep}`;
|
|
24024
|
+
}
|
|
24025
|
+
const key = target + '\x00' + baseDir;
|
|
24026
|
+
let pkgPath;
|
|
24027
|
+
if (cache.PATH.has(key)) {
|
|
24028
|
+
pkgPath = cache.PATH.get(key);
|
|
24029
|
+
}
|
|
24030
|
+
else {
|
|
24031
|
+
try {
|
|
24032
|
+
// the custom `pnp` code here can be removed when yarn 1.13 is the
|
|
24033
|
+
// current release. This is due to Yarn 1.13 and resolve interoperating
|
|
24034
|
+
// together seamlessly.
|
|
24035
|
+
pkgPath = pnp
|
|
24036
|
+
? pnp.resolveToUnqualified(target + '/package.json', baseDir)
|
|
24037
|
+
: (0, resolve_package_path_1.default)(cache, target, baseDir);
|
|
24038
|
+
}
|
|
24039
|
+
catch (e) {
|
|
24040
|
+
(0, rethrow_unless_code_1.default)(e, ...ALLOWED_ERROR_CODES);
|
|
24041
|
+
pkgPath = null;
|
|
24042
|
+
}
|
|
24043
|
+
cache.PATH.set(key, pkgPath);
|
|
24044
|
+
}
|
|
24045
|
+
return pkgPath;
|
|
24046
|
+
}
|
|
24047
|
+
resolvePackagePath._resetCache = function () {
|
|
24048
|
+
CACHE = new CacheGroup();
|
|
24049
|
+
FIND_UP_CACHE = new Cache();
|
|
24050
|
+
};
|
|
24051
|
+
// eslint-disable-next-line no-redeclare
|
|
24052
|
+
(function (resolvePackagePath) {
|
|
24053
|
+
resolvePackagePath._FIND_UP_CACHE = FIND_UP_CACHE;
|
|
24054
|
+
resolvePackagePath.findUpPackagePath = _findUpPackagePath;
|
|
24055
|
+
})(resolvePackagePath || (resolvePackagePath = {}));
|
|
24056
|
+
Object.defineProperty(resolvePackagePath, '_CACHE', {
|
|
24057
|
+
get: function () {
|
|
24058
|
+
return CACHE;
|
|
24059
|
+
},
|
|
24060
|
+
});
|
|
24061
|
+
Object.defineProperty(resolvePackagePath, '_FIND_UP_CACHE', {
|
|
24062
|
+
get: function () {
|
|
24063
|
+
return FIND_UP_CACHE;
|
|
24064
|
+
},
|
|
24065
|
+
});
|
|
24066
|
+
resolvePackagePath.getRealFilePath = function (filePath) {
|
|
24067
|
+
return getRealFilePath(CACHE.REAL_FILE_PATH, filePath);
|
|
24068
|
+
};
|
|
24069
|
+
resolvePackagePath.getRealDirectoryPath = function (directoryPath) {
|
|
24070
|
+
return getRealDirectoryPath(CACHE.REAL_DIRECTORY_PATH, directoryPath);
|
|
24071
|
+
};
|
|
24072
|
+
lib$1 = resolvePackagePath;
|
|
24073
|
+
|
|
23524
24074
|
return lib$1;
|
|
23525
24075
|
}
|
|
23526
24076
|
|
|
23527
|
-
var libExports =
|
|
23528
|
-
var
|
|
24077
|
+
var libExports = requireLib$1();
|
|
24078
|
+
var resolvePackagePath = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
24079
|
+
|
|
24080
|
+
function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length<n.length||("/"===t[t.length-1]&&l.startsWith(t)?(u=l.substring(t.length),n=t):t.length>1&&(r=t.indexOf("*",1),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)+"$").exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t<i;t++)e[t]=o.test(r=e[t])?r.replace(o,n):f.test(r)?r+n:r;}(s,u),s}function r(e,n,r){if(e===n||"."===n)return ".";let t=e+"/",i=t.length,o=n.slice(0,i)===t,f=o?n.slice(i):n;return "#"===f[0]?f:o||!r?"./"===f.slice(0,2)?f:"./"+f:f}function t(e,n,r){if(e){if("string"==typeof e)return r&&r.add(e),[e];let i,o;if(Array.isArray(e)){for(o=r||new Set,i=0;i<e.length;i++)t(e[i],n,o);if(!r&&o.size)return [...o]}else for(i in e)if(n.has(i))return t(e[i],n,r)}}function i(e,n={}){let t,i=0,o=n.browser,f=n.fields||["module","main"],s="string"==typeof o;for(o&&!f.includes("browser")&&(f.unshift("browser"),s&&(o=r(e.name,o,true)));i<f.length;i++)if(t=e[f[i]]){if("string"==typeof t);else {if("object"!=typeof t||"browser"!=f[i])continue;if(s&&(t=t[o],null==t))return o}return "string"==typeof t?"./"+t.replace(/^\.?\//,""):t}}function o(e,r,t){let i,o=e.exports;if(o){if("string"==typeof o)o={".":o};else for(i in o){"."!==i[0]&&(o={".":o});break}return n(e.name,o,r||".",t)}}
|
|
24081
|
+
|
|
24082
|
+
// src/importer.js
|
|
24083
|
+
|
|
24084
|
+
// src/parsePackageName.js
|
|
24085
|
+
var SCOPED_PACKAGE = /^(@[^/]+\/[^@/]+).*?$/;
|
|
24086
|
+
var NON_SCOPED_PACKAGE = /^([^@/]+).*?$/;
|
|
24087
|
+
function getPackageNameFromPath(input) {
|
|
24088
|
+
const match = SCOPED_PACKAGE.exec(input) || NON_SCOPED_PACKAGE.exec(input);
|
|
24089
|
+
if (!input || !match) {
|
|
24090
|
+
return null;
|
|
24091
|
+
}
|
|
24092
|
+
return match[1];
|
|
24093
|
+
}
|
|
24094
|
+
|
|
24095
|
+
// src/importer.js
|
|
24096
|
+
var { findUpPackagePath } = resolvePackagePath;
|
|
24097
|
+
var require2 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vendor-BxO3IPg6.js', document.baseURI).href)));
|
|
24098
|
+
var WEBPACK_NODE_MODULE_PREFIX = "~";
|
|
24099
|
+
var selfPackageJson = null;
|
|
24100
|
+
var selfPackageJsonPath = null;
|
|
24101
|
+
var moduleImporter = {
|
|
24102
|
+
findFileUrl(url) {
|
|
24103
|
+
setSelfPackage();
|
|
24104
|
+
let findUrl = url;
|
|
24105
|
+
if (url.startsWith(WEBPACK_NODE_MODULE_PREFIX)) {
|
|
24106
|
+
findUrl = url.substring(1);
|
|
24107
|
+
}
|
|
24108
|
+
const packageName = getPackageNameFromPath(findUrl);
|
|
24109
|
+
const filePath = findUrl.split(packageName)[1];
|
|
24110
|
+
if (!packageName) {
|
|
24111
|
+
return null;
|
|
24112
|
+
}
|
|
24113
|
+
let packageJson = selfPackageJson;
|
|
24114
|
+
let packagePath = selfPackageJsonPath;
|
|
24115
|
+
if (selfPackageJson.name !== packageName) {
|
|
24116
|
+
packagePath = resolvePackagePath(packageName, process.cwd());
|
|
24117
|
+
if (!packagePath) {
|
|
24118
|
+
return null;
|
|
24119
|
+
}
|
|
24120
|
+
packageJson = JSON.parse(
|
|
24121
|
+
fs$2.readFileSync(packagePath, { encoding: "utf-8" })
|
|
24122
|
+
);
|
|
24123
|
+
}
|
|
24124
|
+
const moduleDirectory = path$1.dirname(packagePath);
|
|
24125
|
+
try {
|
|
24126
|
+
const match = o(packageJson, filePath.substring(1), {
|
|
24127
|
+
conditions: ["sass"]
|
|
24128
|
+
});
|
|
24129
|
+
if (match && match.length === 1) {
|
|
24130
|
+
return new URL(
|
|
24131
|
+
node_url.pathToFileURL(path$1.join(moduleDirectory, match[0]))
|
|
24132
|
+
);
|
|
24133
|
+
}
|
|
24134
|
+
} catch {
|
|
24135
|
+
}
|
|
24136
|
+
if (!filePath) {
|
|
24137
|
+
const match = i(packageJson, { fields: ["sass", "main"] });
|
|
24138
|
+
if (match) {
|
|
24139
|
+
return new URL(
|
|
24140
|
+
node_url.pathToFileURL(path$1.join(moduleDirectory, match))
|
|
24141
|
+
);
|
|
24142
|
+
}
|
|
24143
|
+
}
|
|
24144
|
+
const directory = path$1.dirname(filePath);
|
|
24145
|
+
const fileName = path$1.basename(filePath);
|
|
24146
|
+
const search = [
|
|
24147
|
+
`${fileName}.css`,
|
|
24148
|
+
`${fileName}.scss`,
|
|
24149
|
+
`_${fileName}.scss`,
|
|
24150
|
+
`${fileName}`
|
|
24151
|
+
];
|
|
24152
|
+
for (const variant of search) {
|
|
24153
|
+
try {
|
|
24154
|
+
const moduleName = path$1.posix.join(
|
|
24155
|
+
moduleDirectory,
|
|
24156
|
+
directory,
|
|
24157
|
+
variant
|
|
24158
|
+
);
|
|
24159
|
+
const resolved = require2.resolve(moduleName);
|
|
24160
|
+
return new URL(node_url.pathToFileURL(resolved));
|
|
24161
|
+
} catch (err) {
|
|
24162
|
+
if (err.code !== "MODULE_NOT_FOUND") {
|
|
24163
|
+
throw err;
|
|
24164
|
+
}
|
|
24165
|
+
}
|
|
24166
|
+
}
|
|
24167
|
+
return null;
|
|
24168
|
+
}
|
|
24169
|
+
};
|
|
24170
|
+
function setSelfPackage() {
|
|
24171
|
+
if (!selfPackageJson) {
|
|
24172
|
+
selfPackageJsonPath = findUpPackagePath(process.cwd());
|
|
24173
|
+
selfPackageJson = JSON.parse(
|
|
24174
|
+
fs$2.readFileSync(selfPackageJsonPath, { encoding: "utf-8" })
|
|
24175
|
+
);
|
|
24176
|
+
}
|
|
24177
|
+
}
|
|
23529
24178
|
|
|
23530
24179
|
var eta;
|
|
23531
24180
|
var hasRequiredEta;
|
|
@@ -53720,7 +54369,8 @@ exports.fse = fse;
|
|
|
53720
54369
|
exports.glob = glob;
|
|
53721
54370
|
exports.globSync = globSync;
|
|
53722
54371
|
exports.minimatch = minimatch;
|
|
54372
|
+
exports.moduleImporter = moduleImporter;
|
|
53723
54373
|
exports.spawn = spawn;
|
|
53724
54374
|
exports.tinylr = tinylr;
|
|
53725
54375
|
exports.watch = watch$1;
|
|
53726
|
-
//# sourceMappingURL=vendor-
|
|
54376
|
+
//# sourceMappingURL=vendor-BxO3IPg6.js.map
|