@kubb/core 5.19.0 → 5.19.2
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/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ let node_readline = require("node:readline");
|
|
|
45
45
|
let node_url = require("node:url");
|
|
46
46
|
let node_module = require("node:module");
|
|
47
47
|
// package.json
|
|
48
|
-
var version = "5.19.
|
|
48
|
+
var version = "5.19.2";
|
|
49
49
|
// ../../internals/utils/src/promise.ts
|
|
50
50
|
/**
|
|
51
51
|
* Returns the value cached under `key` in `store`, computing and storing it on the first call.
|
|
@@ -1634,7 +1634,7 @@ function gitAuthEnv(env, { repo, authorization }) {
|
|
|
1634
1634
|
/**
|
|
1635
1635
|
* Fetches one commit of a git repository into a temporary directory with a shallow `git fetch`,
|
|
1636
1636
|
* so any host and the user's own git credentials work, and relative `$ref` files resolve.
|
|
1637
|
-
* Resolves to the spec path on disk and a `dispose` that deletes the checkout.
|
|
1637
|
+
* Resolves to the spec path on disk, the checkout `dir`, and a `dispose` that deletes the checkout.
|
|
1638
1638
|
*
|
|
1639
1639
|
* With `publicOnly`, the repository must be an https URL on public addresses, the fetch connects to
|
|
1640
1640
|
* the addresses checked, and it does not follow a redirect. `authorization` adds that header to this
|
|
@@ -1709,6 +1709,7 @@ async function checkoutGitInput(input, signal, { publicOnly = false, authorizati
|
|
|
1709
1709
|
}
|
|
1710
1710
|
return {
|
|
1711
1711
|
path: specPath,
|
|
1712
|
+
dir,
|
|
1712
1713
|
dispose
|
|
1713
1714
|
};
|
|
1714
1715
|
}
|
|
@@ -2840,7 +2841,10 @@ var KubbDriver = class {
|
|
|
2840
2841
|
this.inputNode = await this.adapter.parse(checkout ? {
|
|
2841
2842
|
type: "path",
|
|
2842
2843
|
path: checkout.path
|
|
2843
|
-
} : source, {
|
|
2844
|
+
} : source, {
|
|
2845
|
+
signal: this.options.signal,
|
|
2846
|
+
fileRefs: checkout && this.options.fileRefs ? [...this.options.fileRefs, checkout.dir] : this.options.fileRefs
|
|
2847
|
+
});
|
|
2844
2848
|
} catch (caughtError) {
|
|
2845
2849
|
throw new Diagnostics.Error(Diagnostics.fromExtension(caughtError, {
|
|
2846
2850
|
kind: "adapter",
|
|
@@ -3909,10 +3913,12 @@ var Kubb = class Kubb {
|
|
|
3909
3913
|
#driver = null;
|
|
3910
3914
|
#manifest = null;
|
|
3911
3915
|
#signal;
|
|
3916
|
+
#fileRefs;
|
|
3912
3917
|
constructor(userConfig, options = {}) {
|
|
3913
3918
|
this.config = resolveConfig(userConfig);
|
|
3914
3919
|
this.hooks = options.hooks ?? new Hookable();
|
|
3915
3920
|
this.#signal = options.signal;
|
|
3921
|
+
this.#fileRefs = options.fileRefs;
|
|
3916
3922
|
}
|
|
3917
3923
|
/**
|
|
3918
3924
|
* Generates every config of a `defineConfig([...])` array in order and yields each result as its config finishes, so
|
|
@@ -3976,7 +3982,8 @@ var Kubb = class Kubb {
|
|
|
3976
3982
|
hooks: this.hooks,
|
|
3977
3983
|
manifest,
|
|
3978
3984
|
signal,
|
|
3979
|
-
cleanPath
|
|
3985
|
+
cleanPath,
|
|
3986
|
+
fileRefs: this.#fileRefs
|
|
3980
3987
|
});
|
|
3981
3988
|
await driver.setup();
|
|
3982
3989
|
this.#driver = driver;
|