gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: fix support with webpack{4,5}


From: gnunet
Subject: [taler-wallet-core] branch master updated: fix support with webpack{4,5} in browser environment
Date: Thu, 17 Jun 2021 17:49:56 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 1c7423db fix support with webpack{4,5} in browser environment
1c7423db is described below

commit 1c7423dbad6c7a7d8efffadb3c854d961da17336
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Jun 17 12:40:42 2021 -0300

    fix support with webpack{4,5} in browser environment
    
    added missing .js extension to the imports
    split index
    use browser field in package json
---
 packages/taler-wallet-core/package.json            |  8 ++-
 packages/taler-wallet-core/rollup.config.js        | 35 ++++++++++-
 .../src/crypto/primitives/nacl-fast.ts             | 46 --------------
 .../src/crypto/workers/cryptoImplementation.ts     |  8 +--
 .../src/crypto/workers/nodeThreadWorker.ts         |  6 +-
 .../src/crypto/workers/synchronousWorker.ts        |  6 +-
 .../taler-wallet-core/src/headless/NodeHttpLib.ts  | 10 +--
 packages/taler-wallet-core/src/headless/helpers.ts | 10 +--
 packages/taler-wallet-core/src/index.browser.ts    | 72 ++++++++++++++++++++++
 .../src/{index.ts => index.node.ts}                | 42 +++++--------
 packages/taler-wallet-core/src/index.ts            |  9 +--
 .../src/operations/backup/export.ts                |  4 +-
 .../src/operations/backup/import.ts                |  4 +-
 packages/taler-wallet-core/src/operations/pay.ts   |  2 +-
 .../taler-wallet-core/src/util/RequestThrottler.ts |  2 +-
 packages/taler-wallet-core/src/wallet-api-types.ts |  2 +-
 packages/taler-wallet-core/src/wallet.ts           | 36 +++++------
 17 files changed, 173 insertions(+), 129 deletions(-)

diff --git a/packages/taler-wallet-core/package.json 
b/packages/taler-wallet-core/package.json
index e14ae0dd..0d726a6d 100644
--- a/packages/taler-wallet-core/package.json
+++ b/packages/taler-wallet-core/package.json
@@ -29,9 +29,13 @@
     "lib/"
   ],
   "main": "./dist/taler-wallet-core.js",
-  "module": "./lib/index.js",
+  "browser": {
+    "./dist/taler-wallet-core.js": "./dist/taler-wallet-core.browser.js",
+    "./lib/index.node.js": "./lib/index.browser.js"
+  },
+  "module": "./lib/index.node.js",
   "type": "module",
-  "types": "./lib/index.d.ts",
+  "types": "./lib/index.node.d.ts",
   "devDependencies": {
     "@ava/typescript": "^1.1.1",
     "@gnu-taler/pogen": "workspace:*",
diff --git a/packages/taler-wallet-core/rollup.config.js 
b/packages/taler-wallet-core/rollup.config.js
index bcc8e5b2..fa5e1905 100644
--- a/packages/taler-wallet-core/rollup.config.js
+++ b/packages/taler-wallet-core/rollup.config.js
@@ -6,8 +6,8 @@ import builtins from "builtin-modules";
 import pkg from "./package.json";
 import sourcemaps from 'rollup-plugin-sourcemaps';
 
-export default {
-  input: "lib/index.js",
+const nodeEntryPoint = {
+  input: "lib/index.node.js",
   output: {
     file: pkg.main,
     format: "cjs",
@@ -32,3 +32,34 @@ export default {
   ],
 }
 
+const browserEntryPoint = {
+  input: "lib/index.browser.js",
+  output: {
+    file: pkg.browser[pkg.main],
+    format: "cjs",
+    sourcemap: true,
+  },
+  external: builtins,
+  plugins: [
+    nodeResolve({
+      preferBuiltins: true,
+    }),
+
+    sourcemaps(),
+
+    commonjs({
+      include: [/node_modules/, /dist/],
+      extensions: [".js"],
+      ignoreGlobal: false,
+      sourceMap: true,
+    }),
+
+    json(),
+  ],
+}
+
+export default [
+  nodeEntryPoint,
+  browserEntryPoint
+]
+
diff --git a/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts 
b/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts
index eab4a2e5..909c6a60 100644
--- a/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts
+++ b/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts
@@ -5,16 +5,6 @@
 // Implementation derived from TweetNaCl version 20140427.
 // See for details: http://tweetnacl.cr.yp.to/
 
-import * as mod from "module";
-
-let require: any;
-
-if (typeof require !== "function" && mod.default && mod.default.createRequire) 
{
-  // We need this require function to synchronously
-  // import the "crypto" module in the CSPRNG initialization.
-  require = mod.default.createRequire(import.meta.url);
-}
-
 const gf = function (init: number[] = []): Float64Array {
   const r = new Float64Array(16);
   if (init) for (let i = 0; i < init.length; i++) r[i] = init[i];
@@ -2806,10 +2796,6 @@ function checkArrayTypes(...args: Uint8Array[]): void {
   }
 }
 
-function cleanup(arr: Uint8Array): void {
-  for (let i = 0; i < arr.length; i++) arr[i] = 0;
-}
-
 export function randomBytes(n: number): Uint8Array {
   const b = new Uint8Array(n);
   randombytes(b, n);
@@ -3031,35 +3017,3 @@ export function secretbox_open(
   return m.subarray(crypto_secretbox_ZEROBYTES);
 }
 
-function initPRNG() {
-  // Initialize PRNG if environment provides CSPRNG.
-  // If not, methods calling randombytes will throw.
-  // @ts-ignore-error
-  const cr = typeof self !== "undefined" ? self.crypto || self.msCrypto : null;
-  if (cr && cr.getRandomValues) {
-    // Browsers.
-    const QUOTA = 65536;
-    setPRNG(function (x: Uint8Array, n: number) {
-      let i;
-      const v = new Uint8Array(n);
-      for (i = 0; i < n; i += QUOTA) {
-        cr.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
-      }
-      for (i = 0; i < n; i++) x[i] = v[i];
-      cleanup(v);
-    });
-  } else if (typeof require !== "undefined") {
-    // Node.js.
-    // eslint-disable-next-line @typescript-eslint/no-var-requires
-    const cr = require("crypto");
-    if (cr && cr.randomBytes) {
-      setPRNG(function (x: Uint8Array, n: number) {
-        const v = cr.randomBytes(n);
-        for (let i = 0; i < n; i++) x[i] = v[i];
-        cleanup(v);
-      });
-    }
-  }
-}
-
-initPRNG();
diff --git 
a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts 
b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
index 1969dee9..9cffef03 100644
--- a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
@@ -45,7 +45,7 @@ import {
   MakeSyncSignatureRequest,
 } from "@gnu-taler/taler-util";
 import { AmountJson, Amounts } from "@gnu-taler/taler-util";
-import * as timer from "../../util/timer";
+import * as timer from "../../util/timer.js";
 import {
   encodeCrock,
   decodeCrock,
@@ -63,9 +63,9 @@ import {
   setupRefreshTransferPub,
   setupTipPlanchet,
   setupWithdrawPlanchet,
-} from "../talerCrypto";
-import { randomBytes } from "../primitives/nacl-fast";
-import { kdf } from "../primitives/kdf";
+} from "../talerCrypto.js";
+import { randomBytes } from "../primitives/nacl-fast.js";
+import { kdf } from "../primitives/kdf.js";
 import { Timestamp, timestampTruncateToSecond } from "@gnu-taler/taler-util";
 
 import { Logger } from "@gnu-taler/taler-util";
diff --git a/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts 
b/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts
index 453a4694..90016ab4 100644
--- a/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts
@@ -17,10 +17,10 @@
 /**
  * Imports
  */
-import { CryptoWorkerFactory } from "./cryptoApi";
-import { CryptoWorker } from "./cryptoWorker";
+import { CryptoWorkerFactory } from "./cryptoApi.js";
+import { CryptoWorker } from "./cryptoWorker.js";
 import os from "os";
-import { CryptoImplementation } from "./cryptoImplementation";
+import { CryptoImplementation } from "./cryptoImplementation.js";
 import { Logger } from "@gnu-taler/taler-util";
 
 const logger = new Logger("nodeThreadWorker.ts");
diff --git a/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts 
b/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
index 5327670b..f6b8ac5d 100644
--- a/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/synchronousWorker.ts
@@ -14,10 +14,10 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-import { CryptoImplementation } from "./cryptoImplementation";
+import { CryptoImplementation } from "./cryptoImplementation.js";
 
-import { CryptoWorkerFactory } from "./cryptoApi";
-import { CryptoWorker } from "./cryptoWorker";
+import { CryptoWorkerFactory } from "./cryptoApi.js";
+import { CryptoWorker } from "./cryptoWorker.js";
 
 /**
  * The synchronous crypto worker produced by this factory doesn't run in the
diff --git a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts 
b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts
index 525ac855..1dd20734 100644
--- a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts
+++ b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts
@@ -24,13 +24,13 @@ import {
   HttpRequestLibrary,
   HttpRequestOptions,
   HttpResponse,
-} from "../util/http";
-import { RequestThrottler } from "../util/RequestThrottler";
+} from "../util/http.js";
+import { RequestThrottler } from "../util/RequestThrottler.js";
 import Axios, { AxiosResponse } from "axios";
-import { OperationFailedError, makeErrorDetails } from "../errors";
-import { URL } from "../util/url";
+import { OperationFailedError, makeErrorDetails } from "../errors.js";
+import { URL } from "../util/url.js";
 import { Logger } from "@gnu-taler/taler-util";
-import { bytesToString } from "../crypto/talerCrypto";
+import { bytesToString } from "../crypto/talerCrypto.js";
 import { TalerErrorCode } from "@gnu-taler/taler-util";
 
 const logger = new Logger("NodeHttpLib.ts");
diff --git a/packages/taler-wallet-core/src/headless/helpers.ts 
b/packages/taler-wallet-core/src/headless/helpers.ts
index c05d6049..a0053fc0 100644
--- a/packages/taler-wallet-core/src/headless/helpers.ts
+++ b/packages/taler-wallet-core/src/headless/helpers.ts
@@ -27,12 +27,12 @@ import {
   BridgeIDBFactory,
   shimIndexedDB,
 } from "@gnu-taler/idb-bridge";
-import { openTalerDatabase } from "../db";
-import { HttpRequestLibrary } from "../util/http";
-import { NodeThreadCryptoWorkerFactory } from 
"../crypto/workers/nodeThreadWorker";
-import { NodeHttpLib } from "./NodeHttpLib";
+import { openTalerDatabase } from "../db.js";
+import { HttpRequestLibrary } from "../util/http.js";
+import { NodeThreadCryptoWorkerFactory } from 
"../crypto/workers/nodeThreadWorker.js";
+import { NodeHttpLib } from "./NodeHttpLib.js";
 import { Logger } from "@gnu-taler/taler-util";
-import { SynchronousCryptoWorkerFactory } from 
"../crypto/workers/synchronousWorker";
+import { SynchronousCryptoWorkerFactory } from 
"../crypto/workers/synchronousWorker.js";
 import type { IDBFactory } from "@gnu-taler/idb-bridge";
 import { WalletNotification } from "@gnu-taler/taler-util";
 import { InternalWalletState } from "../common.js";
diff --git a/packages/taler-wallet-core/src/index.browser.ts 
b/packages/taler-wallet-core/src/index.browser.ts
new file mode 100644
index 00000000..d0b82d3e
--- /dev/null
+++ b/packages/taler-wallet-core/src/index.browser.ts
@@ -0,0 +1,72 @@
+/*
+ This file is part of TALER
+ (C) 2019 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+ */
+
+export * from "./index.js";
+
+import { setPRNG } from './crypto/primitives/nacl-fast.js';
+// export default API;
+
+function cleanup(arr: Uint8Array): void {
+  for (let i = 0; i < arr.length; i++) arr[i] = 0;
+}
+
+// Initialize PRNG if environment provides CSPRNG.
+// If not, methods calling randombytes will throw.
+// @ts-ignore-error
+const cr = typeof self !== "undefined" ? self.crypto || self.msCrypto : null;
+
+const QUOTA = 65536;
+setPRNG(function (x: Uint8Array, n: number) {
+  let i;
+  const v = new Uint8Array(n);
+  for (i = 0; i < n; i += QUOTA) {
+    cr.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
+  }
+  for (i = 0; i < n; i++) x[i] = v[i];
+  cleanup(v);
+});
+// function initPRNG() {
+//   // Initialize PRNG if environment provides CSPRNG.
+//   // If not, methods calling randombytes will throw.
+//   // @ts-ignore-error
+//   const cr = typeof self !== "undefined" ? self.crypto || self.msCrypto : 
null;
+//   if (cr && cr.getRandomValues) {
+//     // Browsers.
+//     const QUOTA = 65536;
+//     setPRNG(function (x: Uint8Array, n: number) {
+//       let i;
+//       const v = new Uint8Array(n);
+//       for (i = 0; i < n; i += QUOTA) {
+//         cr.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
+//       }
+//       for (i = 0; i < n; i++) x[i] = v[i];
+//       cleanup(v);
+//     });
+//   } else if (typeof require !== "undefined") {
+//     // Node.js.
+//     // eslint-disable-next-line @typescript-eslint/no-var-requires
+//     const cr = require("crypto");
+//     if (cr && cr.randomBytes) {
+//       setPRNG(function (x: Uint8Array, n: number) {
+//         const v = cr.randomBytes(n);
+//         for (let i = 0; i < n; i++) x[i] = v[i];
+//         cleanup(v);
+//       });
+//     }
+//   }
+// }
+
+// initPRNG();
\ No newline at end of file
diff --git a/packages/taler-wallet-core/src/index.ts 
b/packages/taler-wallet-core/src/index.node.ts
similarity index 52%
copy from packages/taler-wallet-core/src/index.ts
copy to packages/taler-wallet-core/src/index.node.ts
index 850ee3a1..a3be6b5f 100644
--- a/packages/taler-wallet-core/src/index.ts
+++ b/packages/taler-wallet-core/src/index.node.ts
@@ -14,18 +14,7 @@
  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-/**
- * Module entry point for the wallet when used as a node module.
- */
-
-// Errors
-export * from "./errors.js";
-
-// Util functionality
-export { URL } from "./util/url.js";
-export * from "./util/promiseUtils.js";
-export * from "./util/query.js";
-export * from "./util/http.js";
+export * from "./index.js";
 
 // Utils for using the wallet under node
 export { NodeHttpLib } from "./headless/NodeHttpLib.js";
@@ -34,20 +23,21 @@ export {
   DefaultNodeWalletArgs,
 } from "./headless/helpers.js";
 
-export * from "./versions.js";
+import { setPRNG } from './crypto/primitives/nacl-fast.js';
+import cr from 'crypto';
 
-export * from "./db.js";
+function cleanup(arr: Uint8Array): void {
+  for (let i = 0; i < arr.length; i++) arr[i] = 0;
+}
 
-// Crypto and crypto workers
-export * from "./crypto/workers/nodeThreadWorker.js";
-export { CryptoImplementation } from 
"./crypto/workers/cryptoImplementation.js";
-export type { CryptoWorker } from "./crypto/workers/cryptoWorker.js";
-export { CryptoWorkerFactory, CryptoApi } from "./crypto/workers/cryptoApi.js";
-export * from "./crypto/talerCrypto.js";
-
-export * from "./pending-types.js";
+// Initialize PRNG if environment provides CSPRNG.
+// If not, methods calling randombytes will throw.
+if (cr && cr.randomBytes) {
+  setPRNG(function (x: Uint8Array, n: number) {
+    const v = cr.randomBytes(n);
+    for (let i = 0; i < n; i++) x[i] = v[i];
+    cleanup(v);
+  });
+}
 
-export * from "./util/debugFlags.js";
-export { InternalWalletState } from "./common.js";
-export * from "./wallet-api-types.js";
-export * from "./wallet.js";
+export * from "./crypto/workers/nodeThreadWorker.js";
diff --git a/packages/taler-wallet-core/src/index.ts 
b/packages/taler-wallet-core/src/index.ts
index 850ee3a1..822c1aa2 100644
--- a/packages/taler-wallet-core/src/index.ts
+++ b/packages/taler-wallet-core/src/index.ts
@@ -27,19 +27,12 @@ export * from "./util/promiseUtils.js";
 export * from "./util/query.js";
 export * from "./util/http.js";
 
-// Utils for using the wallet under node
-export { NodeHttpLib } from "./headless/NodeHttpLib.js";
-export {
-  getDefaultNodeWallet,
-  DefaultNodeWalletArgs,
-} from "./headless/helpers.js";
-
 export * from "./versions.js";
 
 export * from "./db.js";
 
 // Crypto and crypto workers
-export * from "./crypto/workers/nodeThreadWorker.js";
+// export * from "./crypto/workers/nodeThreadWorker.js";
 export { CryptoImplementation } from 
"./crypto/workers/cryptoImplementation.js";
 export type { CryptoWorker } from "./crypto/workers/cryptoWorker.js";
 export { CryptoWorkerFactory, CryptoApi } from "./crypto/workers/cryptoApi.js";
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts 
b/packages/taler-wallet-core/src/operations/backup/export.ts
index 42cc9b65..ab226265 100644
--- a/packages/taler-wallet-core/src/operations/backup/export.ts
+++ b/packages/taler-wallet-core/src/operations/backup/export.ts
@@ -50,7 +50,7 @@ import {
   BackupExchangeDetails,
 } from "@gnu-taler/taler-util";
 import { InternalWalletState } from "../../common.js";
-import { provideBackupState, getWalletBackupState } from "./state";
+import { provideBackupState, getWalletBackupState } from "./state.js";
 import { Amounts, getTimestampNow } from "@gnu-taler/taler-util";
 import {
   CoinSourceType,
@@ -60,7 +60,7 @@ import {
   ProposalStatus,
   WALLET_BACKUP_STATE_KEY,
 } from "../../db.js";
-import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js";
+import { encodeCrock, stringToBytes, getRandomBytes } from 
"../../crypto/talerCrypto.js";
 import { canonicalizeBaseUrl, canonicalJson } from "@gnu-taler/taler-util";
 
 export async function exportBackup(
diff --git a/packages/taler-wallet-core/src/operations/backup/import.ts 
b/packages/taler-wallet-core/src/operations/backup/import.ts
index ce4d14f1..b33e050b 100644
--- a/packages/taler-wallet-core/src/operations/backup/import.ts
+++ b/packages/taler-wallet-core/src/operations/backup/import.ts
@@ -46,9 +46,9 @@ import {
   WireInfo,
   WalletStoresV1,
 } from "../../db.js";
-import { PayCoinSelection } from "../../util/coinSelection";
+import { PayCoinSelection } from "../../util/coinSelection.js";
 import { j2s } from "@gnu-taler/taler-util";
-import { checkDbInvariant, checkLogicInvariant } from "../../util/invariants";
+import { checkDbInvariant, checkLogicInvariant } from 
"../../util/invariants.js";
 import { Logger } from "@gnu-taler/taler-util";
 import { initRetryInfo } from "../../util/retries.js";
 import { InternalWalletState } from "../../common.js";
diff --git a/packages/taler-wallet-core/src/operations/pay.ts 
b/packages/taler-wallet-core/src/operations/pay.ts
index 6d185cae..2a9bf154 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -53,7 +53,7 @@ import {
   Logger,
   getDurationRemaining,
 } from "@gnu-taler/taler-util";
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto";
+import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
 import {
   PayCoinSelection,
   CoinCandidateSelection,
diff --git a/packages/taler-wallet-core/src/util/RequestThrottler.ts 
b/packages/taler-wallet-core/src/util/RequestThrottler.ts
index 66a89575..56242a23 100644
--- a/packages/taler-wallet-core/src/util/RequestThrottler.ts
+++ b/packages/taler-wallet-core/src/util/RequestThrottler.ts
@@ -27,7 +27,7 @@ import {
   timestampCmp,
   Logger,
 } from "@gnu-taler/taler-util";
-import { URL } from "./url";
+import { URL } from "./url.js";
 
 const logger = new Logger("RequestThrottler.ts");
 
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts 
b/packages/taler-wallet-core/src/wallet-api-types.ts
index d1c8914d..75121ed3 100644
--- a/packages/taler-wallet-core/src/wallet-api-types.ts
+++ b/packages/taler-wallet-core/src/wallet-api-types.ts
@@ -66,7 +66,7 @@ import {
   WithdrawTestBalanceRequest,
   WithdrawUriInfoResponse,
 } from "@gnu-taler/taler-util";
-import { AddBackupProviderRequest, BackupInfo } from "./operations/backup";
+import { AddBackupProviderRequest, BackupInfo } from 
"./operations/backup/index.js";
 import { PendingOperationsResponse } from "./pending-types.js";
 
 export enum WalletApiOperation {
diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index a392bf4d..a9c4c97e 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -43,65 +43,65 @@ import {
   getBackupRecovery,
   loadBackupRecovery,
   runBackupCycle,
-} from "./operations/backup";
-import { exportBackup } from "./operations/backup/export";
-import { getBalances } from "./operations/balance";
+} from "./operations/backup/index.js";
+import { exportBackup } from "./operations/backup/export.js";
+import { getBalances } from "./operations/balance.js";
 import {
   createDepositGroup,
   processDepositGroup,
   trackDepositGroup,
-} from "./operations/deposits";
+} from "./operations/deposits.js";
 import {
   makeErrorDetails,
   OperationFailedAndReportedError,
   OperationFailedError,
-} from "./errors";
+} from "./errors.js";
 import {
   acceptExchangeTermsOfService,
   getExchangeDetails,
   updateExchangeFromUrl,
-} from "./operations/exchanges";
+} from "./operations/exchanges.js";
 import {
   confirmPay,
   preparePayForUri,
   processDownloadProposal,
   processPurchasePay,
-} from "./operations/pay";
-import { getPendingOperations } from "./operations/pending";
-import { processRecoupGroup } from "./operations/recoup";
+} from "./operations/pay.js";
+import { getPendingOperations } from "./operations/pending.js";
+import { processRecoupGroup } from "./operations/recoup.js";
 import {
   autoRefresh,
   createRefreshGroup,
   processRefreshGroup,
-} from "./operations/refresh";
+} from "./operations/refresh.js";
 import {
   abortFailedPayWithRefund,
   applyRefund,
   processPurchaseQueryRefund,
-} from "./operations/refund";
+} from "./operations/refund.js";
 import {
   createReserve,
   createTalerWithdrawReserve,
   getFundingPaytoUris,
   processReserve,
-} from "./operations/reserves";
-import { InternalWalletState } from "./common";
+} from "./operations/reserves.js";
+import { InternalWalletState } from "./common.js";
 import {
   runIntegrationTest,
   testPay,
   withdrawTestBalance,
-} from "./operations/testing";
-import { acceptTip, prepareTip, processTip } from "./operations/tip";
+} from "./operations/testing.js";
+import { acceptTip, prepareTip, processTip } from "./operations/tip.js";
 import {
   deleteTransaction,
   getTransactions,
   retryTransaction,
-} from "./operations/transactions";
+} from "./operations/transactions.js";
 import {
   getExchangeWithdrawalInfo,
   getWithdrawalDetailsForUri,
   processWithdrawGroup,
-} from "./operations/withdraw";
+} from "./operations/withdraw.js";
 import {
   AuditorTrustRecord,
   CoinSourceType,
@@ -147,7 +147,7 @@ import {
   RefreshReason,
 } from "@gnu-taler/taler-util";
 import { AmountJson, Amounts } from "@gnu-taler/taler-util";
-import { assertUnreachable } from "./util/assertUnreachable";
+import { assertUnreachable } from "./util/assertUnreachable.js";
 import { Logger } from "@gnu-taler/taler-util";
 import { setWalletDeviceId } from "./operations/backup/state.js";
 import { WalletCoreApiClient } from "./wallet-api-types.js";

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]