@@ -3749,25 +3749,40 @@ var __copyProps = (to, from, except, desc) => {
3749
3749
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3750
3750
3751
3751
// pkg/dist-src/index.js
3752
- var dist_src_exports = {};
3753
- __export(dist_src_exports , {
3752
+ var index_exports = {};
3753
+ __export(index_exports , {
3754
3754
Octokit: () => Octokit
3755
3755
});
3756
- module.exports = __toCommonJS(dist_src_exports );
3756
+ module.exports = __toCommonJS(index_exports );
3757
3757
var import_universal_user_agent = __nccwpck_require__(3843);
3758
3758
var import_before_after_hook = __nccwpck_require__(2732);
3759
3759
var import_request = __nccwpck_require__(8636);
3760
3760
var import_graphql = __nccwpck_require__(7);
3761
3761
var import_auth_token = __nccwpck_require__(7864);
3762
3762
3763
3763
// pkg/dist-src/version.js
3764
- var VERSION = "5.2.0 ";
3764
+ var VERSION = "5.2.2 ";
3765
3765
3766
3766
// pkg/dist-src/index.js
3767
3767
var noop = () => {
3768
3768
};
3769
3769
var consoleWarn = console.warn.bind(console);
3770
3770
var consoleError = console.error.bind(console);
3771
+ function createLogger(logger = {}) {
3772
+ if (typeof logger.debug !== "function") {
3773
+ logger.debug = noop;
3774
+ }
3775
+ if (typeof logger.info !== "function") {
3776
+ logger.info = noop;
3777
+ }
3778
+ if (typeof logger.warn !== "function") {
3779
+ logger.warn = consoleWarn;
3780
+ }
3781
+ if (typeof logger.error !== "function") {
3782
+ logger.error = consoleError;
3783
+ }
3784
+ return logger;
3785
+ }
3771
3786
var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
3772
3787
var Octokit = class {
3773
3788
static {
@@ -3841,15 +3856,7 @@ var Octokit = class {
3841
3856
}
3842
3857
this.request = import_request.request.defaults(requestDefaults);
3843
3858
this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);
3844
- this.log = Object.assign(
3845
- {
3846
- debug: noop,
3847
- info: noop,
3848
- warn: consoleWarn,
3849
- error: consoleError
3850
- },
3851
- options.log
3852
- );
3859
+ this.log = createLogger(options.log);
3853
3860
this.hook = hook;
3854
3861
if (!options.authStrategy) {
3855
3862
if (!options.auth) {
@@ -4302,18 +4309,18 @@ var __copyProps = (to, from, except, desc) => {
4302
4309
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4303
4310
4304
4311
// pkg/dist-src/index.js
4305
- var dist_src_exports = {};
4306
- __export(dist_src_exports , {
4312
+ var index_exports = {};
4313
+ __export(index_exports , {
4307
4314
GraphqlResponseError: () => GraphqlResponseError,
4308
4315
graphql: () => graphql2,
4309
4316
withCustomRequest: () => withCustomRequest
4310
4317
});
4311
- module.exports = __toCommonJS(dist_src_exports );
4318
+ module.exports = __toCommonJS(index_exports );
4312
4319
var import_request3 = __nccwpck_require__(8636);
4313
4320
var import_universal_user_agent = __nccwpck_require__(3843);
4314
4321
4315
4322
// pkg/dist-src/version.js
4316
- var VERSION = "7.1.0 ";
4323
+ var VERSION = "7.1.1 ";
4317
4324
4318
4325
// pkg/dist-src/with-defaults.js
4319
4326
var import_request2 = __nccwpck_require__(8636);
@@ -4361,8 +4368,7 @@ function graphql(request2, query, options) {
4361
4368
);
4362
4369
}
4363
4370
for (const key in options) {
4364
- if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
4365
- continue;
4371
+ if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
4366
4372
return Promise.reject(
4367
4373
new Error(
4368
4374
`[@octokit/graphql] "${key}" cannot be used as variable name`
0 commit comments