Merge branch 'main' into connect-command-spawn
This commit is contained in:
13 files changed
+94
-44
No files matched your search
@@ -31,7 +31,6 @@
|
||||
"ember-cli-babel": "^7.21.0",
|
||||
"ember-cli-htmlbars": "^5.2.0",
|
||||
"ember-intl": "^5.5.0",
|
||||
"ember-notify": "^6.0.0",
|
||||
"ember-page-title": "^6.0.3",
|
||||
"ember-loading": "^0.4.0",
|
||||
"ember-route-action-helper": "^2.0.8"
|
||||
|
||||
@@ -47,11 +47,9 @@
|
||||
}
|
||||
|
||||
.ember-notify {
|
||||
border: 0 !important;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
margin: 10px;
|
||||
padding-bottom: 0 !important;
|
||||
position: relative;
|
||||
width: 300px;
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
"clipboard": "^2.0.6",
|
||||
"core": "*",
|
||||
"rose": "*",
|
||||
"doctoc": "^1.4.0",
|
||||
"ember-a11y-testing": "^3.0.0",
|
||||
"ember-auto-import": "^1.6.0",
|
||||
@@ -63,6 +62,7 @@
|
||||
"ember-load-initializers": "^2.1.1",
|
||||
"ember-maybe-import-regenerator": "^0.1.6",
|
||||
"ember-modifier": "^2.1.1",
|
||||
"ember-notify": "^6.0.0",
|
||||
"ember-qunit": "^4.6.0",
|
||||
"ember-resolver": "^8.0.0",
|
||||
"ember-source": "~3.20.2",
|
||||
@@ -75,6 +75,7 @@
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.1.2",
|
||||
"qunit-dom": "^1.2.0",
|
||||
"rose": "*",
|
||||
"sass": "^1.29.0",
|
||||
"sass-lint": "^1.13.1",
|
||||
"sinon": "^9.2.1"
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { getOwner } from '@ember/application';
|
||||
|
||||
export function initialize(registry) {
|
||||
|
||||
// Lookup the application route
|
||||
const ApplicationRoute = registry.resolveRegistration
|
||||
? registry.resolveRegistration('route:application')
|
||||
: registry.resolve('route:application');
|
||||
|
||||
ApplicationRoute.reopen({
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
const originalBeforeModel = this.beforeModel;
|
||||
|
||||
// Override the beforeModel hook and initialize the origin
|
||||
this.beforeModel = async function() {
|
||||
const origin = getOwner(this).lookup('service:origin');
|
||||
return origin.updateOrigin().then(
|
||||
() => originalBeforeModel.apply(this, arguments),
|
||||
() => originalBeforeModel.apply(this, arguments)
|
||||
);
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
after: 'ember-simple-auth',
|
||||
initialize
|
||||
};
|
||||
@@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
|
||||
export default class IndexRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service session;
|
||||
@service origin;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -12,7 +12,7 @@ export default class IndexRoute extends Route {
|
||||
* If no origin is specified yet, redirects to origin, otherwise scopes.
|
||||
*/
|
||||
redirect() {
|
||||
const rendererOrigin = this.session.data.origin;
|
||||
const rendererOrigin = this.origin.rendererOrigin;
|
||||
if (!rendererOrigin) {
|
||||
this.replaceWith('origin');
|
||||
} else {
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class OriginService extends Service {
|
||||
|
||||
@service ipc;
|
||||
@service store;
|
||||
@service session;
|
||||
@service storage;
|
||||
|
||||
// =attributes
|
||||
|
||||
@@ -23,14 +23,14 @@ export default class OriginService extends Service {
|
||||
* @type {?string}
|
||||
*/
|
||||
get rendererOrigin() {
|
||||
return this.session.data.origin;
|
||||
return this.storage.getItem('origin');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {?string} origin
|
||||
*/
|
||||
set rendererOrigin(origin) {
|
||||
this.session.set('data.origin', origin);
|
||||
this.storage.setItem('origin', origin);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,11 +47,9 @@
|
||||
}
|
||||
|
||||
.ember-notify {
|
||||
border: 0 !important;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
margin: 10px;
|
||||
padding-bottom: 0 !important;
|
||||
position: relative;
|
||||
width: 300px;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
const APP_NAME = process.env.APP_NAME || 'Boundary';
|
||||
const ENABLE_MIRAGE = process.env.ENABLE_MIRAGE === 'false' ? false : true;
|
||||
const API_HOST = process.env.API_HOST || '';
|
||||
const ENABLE_MIRAGE = process.env.ENABLE_MIRAGE ? false : true;
|
||||
|
||||
module.exports = function (environment) {
|
||||
let ENV = {
|
||||
@@ -72,6 +73,11 @@ module.exports = function (environment) {
|
||||
ENV.notifyTimeout = 0;
|
||||
|
||||
ENV.enableConfirmService = false;
|
||||
|
||||
// Use in-memory storage
|
||||
ENV.storage = {
|
||||
memory: true
|
||||
};
|
||||
}
|
||||
|
||||
if (environment === 'production') {
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"ember-load-initializers": "^2.1.1",
|
||||
"ember-maybe-import-regenerator": "^0.1.6",
|
||||
"ember-modifier": "^2.1.1",
|
||||
"ember-notify": "^6.0.0",
|
||||
"ember-qunit": "^4.6.0",
|
||||
"ember-resolver": "^8.0.0",
|
||||
"ember-source": "~3.20.2",
|
||||
|
||||
@@ -62,9 +62,9 @@ module('Acceptance | authentication', function (hooks) {
|
||||
};
|
||||
|
||||
const setDefaultOrigin = (test) => {
|
||||
const origin = window.location.origin;
|
||||
const session = test.owner.lookup('service:session');
|
||||
session.set('data.origin', origin);
|
||||
const windowOrigin = window.location.origin;
|
||||
const origin = test.owner.lookup('service:origin');
|
||||
origin.rendererOrigin = windowOrigin;
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
|
||||
@@ -60,9 +60,9 @@ module('Acceptance | projects', function (hooks) {
|
||||
};
|
||||
|
||||
const setDefaultOrigin = (test) => {
|
||||
const origin = window.location.origin;
|
||||
const session = test.owner.lookup('service:session');
|
||||
session.set('data.origin', origin);
|
||||
const windowOrigin = window.location.origin;
|
||||
const origin = test.owner.lookup('service:origin');
|
||||
origin.rendererOrigin = windowOrigin;
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
@@ -102,7 +102,7 @@ module('Acceptance | projects', function (hooks) {
|
||||
urls.authenticate.global = `${urls.scopes.global}/authenticate`;
|
||||
urls.authenticate.methods.global = `${urls.authenticate.global}/${instances.authMethods.global.id}`;
|
||||
urls.projects = `${urls.scopes.org}/projects`;
|
||||
|
||||
|
||||
class MockIPC {
|
||||
origin = null;
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ module('Acceptance | targets', function (hooks) {
|
||||
};
|
||||
|
||||
const setDefaultOrigin = (test) => {
|
||||
const origin = window.location.origin;
|
||||
const session = test.owner.lookup('service:session');
|
||||
session.set('data.origin', origin);
|
||||
const windowOrigin = window.location.origin;
|
||||
const origin = test.owner.lookup('service:origin');
|
||||
origin.rendererOrigin = windowOrigin;
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
@@ -104,7 +104,7 @@ module('Acceptance | targets', function (hooks) {
|
||||
urls.authenticate.methods.global = `${urls.authenticate.global}/${instances.authMethods.global.id}`;
|
||||
urls.projects = `${urls.scopes.org}/projects`;
|
||||
urls.targets = `${urls.projects}/targets`;
|
||||
|
||||
|
||||
class MockIPC {
|
||||
origin = null;
|
||||
|
||||
|
||||
@@ -3417,7 +3417,7 @@ agentkeepalive@^3.4.1:
|
||||
dependencies:
|
||||
humanize-ms "^1.2.1"
|
||||
|
||||
agentkeepalive@^4.1.0:
|
||||
agentkeepalive@^4.1.3:
|
||||
version "4.1.3"
|
||||
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.3.tgz#360a09d743a1f4fde749f9ba07caa6575d08259a"
|
||||
integrity sha512-wn8fw19xKZwdGPO47jivonaHRTd+nGOMP1z11sgGeQzDy2xd5FG0R67dIMcKHDE2cJ5y+YXV30XVGUBPRSY7Hg==
|
||||
@@ -6068,7 +6068,7 @@ cacache@^13.0.1:
|
||||
ssri "^7.0.0"
|
||||
unique-filename "^1.1.1"
|
||||
|
||||
cacache@^15.0.0, cacache@^15.0.5:
|
||||
cacache@^15.0.5:
|
||||
version "15.0.5"
|
||||
resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.5.tgz#69162833da29170d6732334643c60e005f5f17d0"
|
||||
integrity sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==
|
||||
@@ -7507,7 +7507,7 @@ debug@~4.1.0:
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debuglog@^1.0.1:
|
||||
debuglog@*, debuglog@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
|
||||
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
|
||||
@@ -11970,7 +11970,7 @@ http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1:
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
|
||||
integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
|
||||
|
||||
http-cache-semantics@^4.0.0, http-cache-semantics@^4.0.4:
|
||||
http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
||||
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
|
||||
@@ -12204,7 +12204,7 @@ import-lazy@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153"
|
||||
integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==
|
||||
|
||||
imurmurhash@^0.1.4:
|
||||
imurmurhash@*, imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
|
||||
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
|
||||
@@ -13911,6 +13911,11 @@ lodash._baseflatten@^3.0.0:
|
||||
lodash.isarguments "^3.0.0"
|
||||
lodash.isarray "^3.0.0"
|
||||
|
||||
lodash._baseindexof@*:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
|
||||
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
|
||||
|
||||
lodash._baseuniq@~4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
|
||||
@@ -13919,11 +13924,16 @@ lodash._baseuniq@~4.6.0:
|
||||
lodash._createset "~4.0.0"
|
||||
lodash._root "~3.0.0"
|
||||
|
||||
lodash._bindcallback@^3.0.0:
|
||||
lodash._bindcallback@*, lodash._bindcallback@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
|
||||
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
|
||||
|
||||
lodash._cacheindexof@*:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
|
||||
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
|
||||
|
||||
lodash._createassigner@^3.0.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
|
||||
@@ -13933,12 +13943,19 @@ lodash._createassigner@^3.0.0:
|
||||
lodash._isiterateecall "^3.0.0"
|
||||
lodash.restparam "^3.0.0"
|
||||
|
||||
lodash._createcache@*:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
|
||||
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
|
||||
dependencies:
|
||||
lodash._getnative "^3.0.0"
|
||||
|
||||
lodash._createset@~4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
|
||||
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
|
||||
|
||||
lodash._getnative@^3.0.0:
|
||||
lodash._getnative@*, lodash._getnative@^3.0.0:
|
||||
version "3.9.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
|
||||
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
|
||||
@@ -14151,7 +14168,7 @@ lodash.pick@^4.4.0:
|
||||
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
|
||||
integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
|
||||
|
||||
lodash.restparam@^3.0.0:
|
||||
lodash.restparam@*, lodash.restparam@^3.0.0:
|
||||
version "3.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
|
||||
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
|
||||
@@ -14364,22 +14381,22 @@ make-fetch-happen@^5.0.0:
|
||||
ssri "^6.0.0"
|
||||
|
||||
make-fetch-happen@^8.0.9:
|
||||
version "8.0.10"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.10.tgz#f37c5d93d14290488ca6a2ae917a380bd7d24f16"
|
||||
integrity sha512-jPLPKQjBmDLK5r1BdyDyNKBytmkv2AsDWm2CxHJh+fqhSmC9Pmb7RQxwOq8xQig9+AWIS49+51k4f6vDQ3VnrQ==
|
||||
version "8.0.12"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.12.tgz#e281aa9182d3f2ac657d25a834cd887394eacd9e"
|
||||
integrity sha512-cBD7yM72ltWEV+xlLlbimnh5qHwr+thAb/cZLiaZhicVVPVN63BikBvL5OR68+8+z2fvBOgck628vGJ2ulgF6g==
|
||||
dependencies:
|
||||
agentkeepalive "^4.1.0"
|
||||
cacache "^15.0.0"
|
||||
http-cache-semantics "^4.0.4"
|
||||
agentkeepalive "^4.1.3"
|
||||
cacache "^15.0.5"
|
||||
http-cache-semantics "^4.1.0"
|
||||
http-proxy-agent "^4.0.1"
|
||||
https-proxy-agent "^5.0.0"
|
||||
is-lambda "^1.0.1"
|
||||
lru-cache "^6.0.0"
|
||||
minipass "^3.1.3"
|
||||
minipass-collect "^1.0.2"
|
||||
minipass-fetch "^1.3.0"
|
||||
minipass-fetch "^1.3.2"
|
||||
minipass-flush "^1.0.5"
|
||||
minipass-pipeline "^1.2.2"
|
||||
minipass-pipeline "^1.2.4"
|
||||
promise-retry "^1.1.1"
|
||||
socks-proxy-agent "^5.0.0"
|
||||
ssri "^8.0.0"
|
||||
@@ -14919,7 +14936,7 @@ minipass-collect@^1.0.2:
|
||||
dependencies:
|
||||
minipass "^3.0.0"
|
||||
|
||||
minipass-fetch@^1.2.1, minipass-fetch@^1.3.0:
|
||||
minipass-fetch@^1.2.1, minipass-fetch@^1.3.0, minipass-fetch@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.2.tgz#573766fb1ae86e30df916a6b060bc2e801bf8f37"
|
||||
integrity sha512-/i4fX1ss+Dtwyk++OsAI6SEV+eE1dvI6W+0hORdjfruQ7VD5uYTetJIHcEMjWiEiszWjn2aAtP1CB/Q4KfeoYA==
|
||||
@@ -14945,7 +14962,7 @@ minipass-json-stream@^1.0.1:
|
||||
jsonparse "^1.3.1"
|
||||
minipass "^3.0.0"
|
||||
|
||||
minipass-pipeline@^1.2.2:
|
||||
minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c"
|
||||
integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==
|
||||
@@ -18981,9 +18998,9 @@ socks-proxy-agent@^5.0.0:
|
||||
socks "^2.3.3"
|
||||
|
||||
socks@^2.3.3:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/socks/-/socks-2.5.0.tgz#3a7c286db114f67864a4bd8b4207a91d1db3d6db"
|
||||
integrity sha512-00OqQHp5SCbwm9ecOMJj9aQtMSjwi1uVuGQoxnpKCS50VKZcOZ8z11CTKypmR8sEy7nZimy/qXY7rYJYbRlXmA==
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/socks/-/socks-2.5.1.tgz#7720640b6b5ec9a07d556419203baa3f0596df5f"
|
||||
integrity sha512-oZCsJJxapULAYJaEYBSzMcz8m3jqgGrHaGhkmU/o/PQfFWYWxkAaA0UMGImb6s6tEXfKi959X6VJjMMQ3P6TTQ==
|
||||
dependencies:
|
||||
ip "^1.1.5"
|
||||
smart-buffer "^4.1.0"
|
||||
|
||||
Reference in new issue
Block a user