gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-wallet-webex] branch master updated (67cac128 -> 943


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] branch master updated (67cac128 -> 94357e22)
Date: Wed, 14 Aug 2019 18:50:04 +0200

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

dold pushed a change to branch master
in repository wallet-webex.

    from 67cac128 copyright date
     new 949aa321 prepare for npm publish
     new bc5076b4 npmignore
     new 11acb0c4 logic error
     new 94357e22 index for node package

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .npmignore                            | 15 +++++++++++++++
 gulpfile.js                           |  2 +-
 package.json                          | 20 +++++---------------
 src/headless/taler-wallet-cli.ts      | 15 +++++++++------
 src/{webex/background.ts => index.ts} | 15 ++++-----------
 tsconfig.json                         |  3 ++-
 yarn.lock                             | 29 +++++++++++++++++++++++++++++
 7 files changed, 65 insertions(+), 34 deletions(-)
 create mode 100644 .npmignore
 copy src/{webex/background.ts => index.ts} (76%)

diff --git a/.npmignore b/.npmignore
new file mode 100644
index 00000000..13bc685b
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,15 @@
+/articles
+/packages
+/npm-packages-offline-cache
+/.vscode
+/*.log
+/contrib
+/.*
+/configure
+/selenium
+/*.json
+*.tsbuildinfo
+
+/dist/*
+!/dist/node
+
diff --git a/gulpfile.js b/gulpfile.js
index 22bcfe13..0a2b2c26 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -105,7 +105,7 @@ const tsBaseArgs = {
   noFallthroughCasesInSwitch: true,
   strict: true,
   strictPropertyInitialization: false,
-  outDir: "build/src/",
+  outDir: "dist/node",
   noImplicitAny: true,
   allowJs: true,
   checkJs: true,
diff --git a/package.json b/package.json
index ae5e9452..28711f70 100644
--- a/package.json
+++ b/package.json
@@ -1,26 +1,14 @@
 {
   "name": "taler-wallet",
-  "version": "0.0.0",
+  "version": "0.0.1",
   "description": "",
-  "main": "wxwallet.js",
-  "scripts": {
-    "test": "mocha --delay",
-    "test-cover": "istanbul cover -x libwrapper.js _mocha -- --delay"
-  },
+  "main": "dist/node/index.js",
   "repository": {
     "type": "git",
     "url": "git://git.taler.net/wallet.git"
   },
-  "author": "",
+  "author": "Florian Dold",
   "license": "GPL-3.0",
-  "nyc": {
-    "exclude": [
-      "emscripten"
-    ],
-    "include": [
-      "build/src/**/*.js"
-    ]
-  },
   "devDependencies": {
     "@types/moment": "^2.13.0",
     "@types/react": "^16.4.0",
@@ -42,6 +30,7 @@
     "pogen": "^0.0.5",
     "react": "^16.8.5",
     "react-dom": "^16.8.5",
+    "rollup": "^1.19.4",
     "structured-clone": "^0.2.2",
     "terser-webpack-plugin": "^1.2.3",
     "through2": "2.0.1",
@@ -60,6 +49,7 @@
   "dependencies": {
     "axios": "^0.19.0",
     "commander": "^2.20.0",
+    "idb-bridge": "^0.0.1",
     "source-map-support": "^0.5.12"
   }
 }
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts
index ff0351d0..0c6c2ba9 100644
--- a/src/headless/taler-wallet-cli.ts
+++ b/src/headless/taler-wallet-cli.ts
@@ -231,7 +231,7 @@ class MerchantBackendConnection {
   }
 }
 
-async function main() {
+export async function main() {
   const myNotifier = new ConsoleNotifier();
 
   const myBadge = new ConsoleBadge();
@@ -342,14 +342,17 @@ async function main() {
 
   console.log("payment status after wallet payment:", paymentStatus2);
 
-  if (!paymentStatus.paid) {
+  if (!paymentStatus2.paid) {
     throw Error("payment did not succeed");
   }
 
   myWallet.stop();
 }
 
-main().catch(err => {
-  console.error("Failed with exception:");
-  console.error(err);
-});
+
+if (require.main === module) {
+  main().catch(err => {
+    console.error("Failed with exception:");
+    console.error(err);
+  });
+}
diff --git a/src/webex/background.ts b/src/index.ts
similarity index 76%
copy from src/webex/background.ts
copy to src/index.ts
index 3c63f323..bfd25c6a 100644
--- a/src/webex/background.ts
+++ b/src/index.ts
@@ -1,6 +1,6 @@
 /*
  This file is part of TALER
- (C) 2016 GNUnet e.V.
+ (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
@@ -15,16 +15,9 @@
  */
 
 /**
- * Entry point for the background page.
- *
- * @author Florian Dold
+ * Module entry point for the wallet when used as a node module.
  */
 
-/**
- * Imports.
- */
-import {wxMain} from "./wxBackend";
+export { Wallet } from "./wallet";
 
-window.addEventListener("load", () => {
-  wxMain();
-});
+export { main as runIntegrationTest } from "./headless/taler-wallet-cli";
diff --git a/tsconfig.json b/tsconfig.json
index 4a2f09e8..3f29f420 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,7 +15,7 @@
     "noFallthroughCasesInSwitch": true,
     "strict": true,
     "strictPropertyInitialization": false,
-    "outDir": "build/src/",
+    "outDir": "dist/node",
     "noImplicitAny": true,
     "allowJs": true,
     "checkJs": true,
@@ -45,6 +45,7 @@
     "src/http.ts",
     "src/i18n.tsx",
     "src/i18n/strings.ts",
+    "src/index.ts",
     "src/libtoolVersion-test.ts",
     "src/libtoolVersion.ts",
     "src/logging.ts",
diff --git a/yarn.lock b/yarn.lock
index 79c46857..f779b403 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -325,6 +325,11 @@
   dependencies:
     arrify "^1.0.1"
 
+"@types/estree@0.0.39":
+  version "0.0.39"
+  resolved 
"https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f";
+  integrity 
sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
+
 "@types/events@*":
   version "3.0.0"
   resolved 
"https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7";
@@ -385,6 +390,11 @@
   resolved 
"https://registry.yarnpkg.com/@types/node/-/node-11.12.0.tgz#ec5594728811dc2797e42396cfcdf786f2052c12";
   integrity 
sha512-Lg00egj78gM+4aE0Erw05cuDbvX9sLJbaaPwwRtdCdAMnIudqrQZ0oZX98Ek0yiSK/A2nubHgJfvII/rTT2Dwg==
 
+"@types/node@^12.6.9":
+  version "12.7.1"
+  resolved 
"https://registry.yarnpkg.com/@types/node/-/node-12.7.1.tgz#3b5c3a26393c19b400844ac422bd0f631a94d69d";
+  integrity 
sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw==
+
 "@types/prop-types@*":
   version "15.7.0"
   resolved 
"https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.0.tgz#4c48fed958d6dcf9487195a0ef6456d5f6e0163a";
@@ -597,6 +607,11 @@ acorn@^6.0.5, acorn@^6.0.7:
   resolved 
"https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f";
   integrity 
sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==
 
+acorn@^6.2.1:
+  version "6.3.0"
+  resolved 
"https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e";
+  integrity 
sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==
+
 ajv-errors@^1.0.0:
   version "1.0.1"
   resolved 
"https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d";
@@ -3201,6 +3216,11 @@ iconv-lite@^0.4.4, iconv-lite@~0.4.13:
   dependencies:
     safer-buffer ">= 2.1.2 < 3"
 
+idb-bridge@^0.0.1:
+  version "0.0.1"
+  resolved 
"https://registry.yarnpkg.com/idb-bridge/-/idb-bridge-0.0.1.tgz#4498704b79f354dcd3a628825656967939003614";
+  integrity 
sha512-GTFqRkjFk4C98zvPA65cKpB1JnBt+bFftn+Kkwucoy+hLmxVfdmbwZ6hj2ZieBHOppMtRs0il3zbzSzLofWrDg==
+
 ieee754@^1.1.4:
   version "1.1.13"
   resolved 
"https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84";
@@ -5516,6 +5536,15 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
     hash-base "^3.0.0"
     inherits "^2.0.1"
 
+rollup@^1.19.4:
+  version "1.19.4"
+  resolved 
"https://registry.yarnpkg.com/rollup/-/rollup-1.19.4.tgz#0cb4e4d6fa127adab59b11d0be50e8dd1c78123a";
+  integrity 
sha512-G24w409GNj7i/Yam2cQla6qV2k6Nug8bD2DZg9v63QX/cH/dEdbNJg8H4lUm5M1bRpPKRUC465Rm9H51JTKOfQ==
+  dependencies:
+    "@types/estree" "0.0.39"
+    "@types/node" "^12.6.9"
+    acorn "^6.2.1"
+
 run-queue@^1.0.0, run-queue@^1.0.3:
   version "1.0.3"
   resolved 
"https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47";

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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