Browse Source

web related fixes

Eugene Pankov 4 years ago
parent
commit
de3aab4996

+ 1 - 1
tabby-community-color-schemes/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-community-color-schemes",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Community color schemes for Tabby",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-core/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-core",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Tabby core",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-electron/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-electron",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Electron-specific bindings",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-local/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-local",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Tabby's local shell plugin",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-plugin-manager/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-plugin-manager",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Tabby's plugin manager",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-serial/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-serial",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Serial connections for Tabby",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-settings/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-settings",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Tabby terminal settings page",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-ssh/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-ssh",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "SSH connections for Tabby",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-telnet/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-telnet",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Telnet/socket connections for Tabby",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-terminal/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-terminal",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Tabby's terminal emulation core",
   "keywords": [
     "tabby-builtin-plugin"

+ 1 - 1
tabby-web-demo/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-web-demo",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "main": "dist/index.js",
   "typings": "dist/index.d.ts",
   "scripts": {

+ 1 - 1
tabby-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "tabby-web",
-  "version": "1.0.150",
+  "version": "1.0.156-nightly.2",
   "description": "Web-specific bindings",
   "keywords": [
     "tabby-builtin-plugin"

+ 2 - 0
web/entry.preload.ts

@@ -93,6 +93,8 @@ Object.assign(window, {
         paths: [],
     },
     Tabby,
+    __filename: '',
+    __dirname: '',
     process: {
         env: { },
         argv: ['tabby'],

+ 3 - 2
web/package.json

@@ -11,10 +11,11 @@
         "patch-package": "^6.4.7",
         "path-browserify": "^1.0.1",
         "readline-browserify": "^0.0.4",
-        "stream-browserify": "^3.0.0"
+        "stream-browserify": "^3.0.0",
+        "url": "^0.11.0"
     },
     "resolutions": {
         "**/util": "^0.12.0"
     },
-    "version": "1.0.150"
+    "version": "1.0.156-nightly.2"
 }

+ 4 - 3
web/polyfills.ts

@@ -55,9 +55,6 @@ Tabby.registerMock('module', {
     prototype: { require: window['require'] },
 })
 
-Tabby.registerMock('url', {
-    parse: () => null,
-})
 Tabby.registerMock('http', {
     Agent: class {},
     request: {},
@@ -99,6 +96,10 @@ Tabby.registerModule('net', {
 })
 Tabby.registerModule('events', require('events'))
 Tabby.registerModule('path', require('path-browserify'))
+Tabby.registerModule('url', {
+    ...require('url'),
+    pathToFileURL: x => `file://${x}`,
+})
 Tabby.registerModule('zlib', {
     ...require('browserify-zlib'),
     constants: require('browserify-zlib'),

+ 0 - 1
web/webpack.config.js

@@ -13,7 +13,6 @@ for (const key of [
     'querystring',
     'tls',
     'tty',
-    'url',
     'zlib',
     '../build/Release/cpufeatures.node',
     './crypto/build/Release/sshcrypto.node',

+ 18 - 0
web/yarn.lock

@@ -776,6 +776,16 @@ public-encrypt@^4.0.0:
     randombytes "^2.0.1"
     safe-buffer "^5.1.2"
 
[email protected]:
+  version "1.3.2"
+  resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
+  integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=
+
[email protected]:
+  version "0.2.0"
+  resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
+  integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
+
 randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
   version "2.1.0"
   resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@@ -927,6 +937,14 @@ universalify@^0.1.0:
   resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
   integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
 
+url@^0.11.0:
+  version "0.11.0"
+  resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
+  integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=
+  dependencies:
+    punycode "1.3.2"
+    querystring "0.2.0"
+
 util-deprecate@^1.0.1:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"