diff --git a/.changeset/modern-kiwis-battle.md b/.changeset/modern-kiwis-battle.md new file mode 100644 index 0000000..62b6999 --- /dev/null +++ b/.changeset/modern-kiwis-battle.md @@ -0,0 +1,5 @@ +--- +"@ssecd/ihs": patch +--- + +Clarify staging implementation diff --git a/README.md b/README.md index 80c247b..e2b9946 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,7 @@ interface IHSConfig { secretKey: string; /** - * Mode environment API antara `development` ata `production` + * Mode environment API antara `development`, `staging`, atau `production` * * @default process.env.NODE_ENV || 'development' */ diff --git a/src/ihs.ts b/src/ihs.ts index 8113492..59dec28 100644 --- a/src/ihs.ts +++ b/src/ihs.ts @@ -22,7 +22,7 @@ export interface IHSConfig { secretKey: string; /** - * Mode environment API antara `development` ata `production` + * Mode environment API antara `development`, `staging`, atau `production` * * @default process.env.NODE_ENV || 'development' */ @@ -87,7 +87,7 @@ export default class IHS { private async applyUserConfig(): Promise { const defaultConfig: Readonly = { - mode: process.env['NODE_ENV'] === 'production' ? 'production' : 'development', + mode: (process.env['NODE_ENV'] as Mode) || 'development', clientSecret: process.env['IHS_CLIENT_SECRET'] || '', secretKey: process.env['IHS_SECRET_KEY'] || '', kycPemFile: process.env['IHS_KYC_PEM_FILE'] || ''