diff --git a/__tests__/invoke.test.js b/__tests__/invoke.test.js index f8376f49..c5718a85 100644 --- a/__tests__/invoke.test.js +++ b/__tests__/invoke.test.js @@ -1,4 +1,4 @@ -const { default: sdk } = require('../dist/index') +const sdk = require('../dist/index') sdk.init({ region: 'ap-guangzhou' diff --git a/dist/index.d.ts b/dist/index.d.ts index b8bcf74e..bb768d30 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -11,4 +11,4 @@ declare class SDK { invoke: typeof services.invoke; } declare const _default: SDK; -export default _default; +export = _default; diff --git a/dist/index.js b/dist/index.js index 4a752d0f..4532f0aa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,5 +1,4 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); const services = require("./services"); const Capi = require("qcloudapi-sdk"); const util = require("util"); @@ -27,4 +26,4 @@ class SDK { this.requestHelper = util.promisify(capi.request.bind(capi)); } } -exports.default = new SDK(); +module.exports = new SDK(); diff --git a/src/index.ts b/src/index.ts index e6918396..9bedb9db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,4 +40,4 @@ class SDK { invoke = services.invoke } -export default new SDK() +export = new SDK()