Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
d2c75c20
Commit
d2c75c20
authored
Jan 22, 2021
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Jan 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move `service-config` into `config`
parent
e4d696a0
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
26 additions
and
26 deletions
+26
-26
group-list.js
src/sidebar/components/group-list.js
+1
-1
hypothesis-app.js
src/sidebar/components/hypothesis-app.js
+1
-1
group-list-test.js
src/sidebar/components/test/group-list-test.js
+1
-1
hypothesis-app-test.js
src/sidebar/components/test/hypothesis-app-test.js
+1
-1
top-bar-test.js
src/sidebar/components/test/top-bar-test.js
+1
-1
user-menu-test.js
src/sidebar/components/test/user-menu-test.js
+1
-1
top-bar.js
src/sidebar/components/top-bar.js
+1
-1
user-menu.js
src/sidebar/components/user-menu.js
+1
-1
get-api-url.js
src/sidebar/config/get-api-url.js
+1
-1
service-config.js
src/sidebar/config/service-config.js
+2
-2
service-config-test.js
src/sidebar/config/test/service-config-test.js
+4
-4
annotation-sharing.js
src/sidebar/helpers/annotation-sharing.js
+1
-1
groups.js
src/sidebar/helpers/groups.js
+1
-1
is-third-party-service.js
src/sidebar/helpers/is-third-party-service.js
+1
-1
session.js
src/sidebar/helpers/session.js
+1
-1
annotation-sharing-test.js
src/sidebar/helpers/test/annotation-sharing-test.js
+1
-1
groups-test.js
src/sidebar/helpers/test/groups-test.js
+1
-1
is-third-party-service-test.js
src/sidebar/helpers/test/is-third-party-service-test.js
+1
-1
groups.js
src/sidebar/services/groups.js
+1
-1
oauth-auth.js
src/sidebar/services/oauth-auth.js
+1
-1
session.js
src/sidebar/services/session.js
+1
-1
session-test.js
src/sidebar/services/test/session-test.js
+1
-1
No files found.
src/sidebar/components/group-list.js
View file @
d2c75c20
...
@@ -2,7 +2,7 @@ import { createElement } from 'preact';
...
@@ -2,7 +2,7 @@ import { createElement } from 'preact';
import
{
useMemo
,
useState
}
from
'preact/hooks'
;
import
{
useMemo
,
useState
}
from
'preact/hooks'
;
import
propTypes
from
'prop-types'
;
import
propTypes
from
'prop-types'
;
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
isThirdPartyUser
}
from
'../helpers/account-id'
;
import
{
isThirdPartyUser
}
from
'../helpers/account-id'
;
import
{
orgName
}
from
'../helpers/group-list-item-common'
;
import
{
orgName
}
from
'../helpers/group-list-item-common'
;
...
...
src/sidebar/components/hypothesis-app.js
View file @
d2c75c20
...
@@ -4,7 +4,7 @@ import { useEffect, useMemo } from 'preact/hooks';
...
@@ -4,7 +4,7 @@ import { useEffect, useMemo } from 'preact/hooks';
import
propTypes
from
'prop-types'
;
import
propTypes
from
'prop-types'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
uiConstants
from
'../ui-constants'
;
import
uiConstants
from
'../ui-constants'
;
import
{
parseAccountID
}
from
'../helpers/account-id'
;
import
{
parseAccountID
}
from
'../helpers/account-id'
;
...
...
src/sidebar/components/test/group-list-test.js
View file @
d2c75c20
...
@@ -64,7 +64,7 @@ describe('GroupList', () => {
...
@@ -64,7 +64,7 @@ describe('GroupList', () => {
$imports
.
$mock
(
mockImportedComponents
());
$imports
.
$mock
(
mockImportedComponents
());
$imports
.
$mock
({
$imports
.
$mock
({
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
});
});
});
});
...
...
src/sidebar/components/test/hypothesis-app-test.js
View file @
d2c75c20
...
@@ -80,7 +80,7 @@ describe('HypothesisApp', () => {
...
@@ -80,7 +80,7 @@ describe('HypothesisApp', () => {
$imports
.
$mock
(
mockImportedComponents
());
$imports
.
$mock
(
mockImportedComponents
());
$imports
.
$mock
({
$imports
.
$mock
({
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../helpers/session'
:
{
'../helpers/session'
:
{
shouldAutoDisplayTutorial
:
fakeShouldAutoDisplayTutorial
,
shouldAutoDisplayTutorial
:
fakeShouldAutoDisplayTutorial
,
...
...
src/sidebar/components/test/top-bar-test.js
View file @
d2c75c20
...
@@ -42,7 +42,7 @@ describe('TopBar', () => {
...
@@ -42,7 +42,7 @@ describe('TopBar', () => {
$imports
.
$mock
({
$imports
.
$mock
({
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../helpers/is-third-party-service'
:
fakeIsThirdPartyService
,
'../helpers/is-third-party-service'
:
fakeIsThirdPartyService
,
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
});
});
});
});
...
...
src/sidebar/components/test/user-menu-test.js
View file @
d2c75c20
...
@@ -60,7 +60,7 @@ describe('UserMenu', () => {
...
@@ -60,7 +60,7 @@ describe('UserMenu', () => {
'../helpers/account-id'
:
{
'../helpers/account-id'
:
{
isThirdPartyUser
:
fakeIsThirdPartyUser
,
isThirdPartyUser
:
fakeIsThirdPartyUser
,
},
},
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
'../store/use-store'
:
{
useStoreProxy
:
()
=>
fakeStore
},
});
});
});
});
...
...
src/sidebar/components/top-bar.js
View file @
d2c75c20
...
@@ -2,7 +2,7 @@ import { Fragment, createElement } from 'preact';
...
@@ -2,7 +2,7 @@ import { Fragment, createElement } from 'preact';
import
propTypes
from
'prop-types'
;
import
propTypes
from
'prop-types'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
uiConstants
from
'../ui-constants'
;
import
uiConstants
from
'../ui-constants'
;
import
isThirdPartyService
from
'../helpers/is-third-party-service'
;
import
isThirdPartyService
from
'../helpers/is-third-party-service'
;
...
...
src/sidebar/components/user-menu.js
View file @
d2c75c20
...
@@ -2,7 +2,7 @@ import { createElement } from 'preact';
...
@@ -2,7 +2,7 @@ import { createElement } from 'preact';
import
propTypes
from
'prop-types'
;
import
propTypes
from
'prop-types'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
bridgeEvents
from
'../../shared/bridge-events'
;
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
{
isThirdPartyUser
}
from
'../helpers/account-id'
;
import
{
isThirdPartyUser
}
from
'../helpers/account-id'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
withServices
}
from
'../service-context'
;
import
{
withServices
}
from
'../service-context'
;
...
...
src/sidebar/config/get-api-url.js
View file @
d2c75c20
import
serviceConfig
from
'.
.
/service-config'
;
import
serviceConfig
from
'./service-config'
;
/**
/**
* Function that returns apiUrl from the settings object.
* Function that returns apiUrl from the settings object.
...
...
src/sidebar/service-config.js
→
src/sidebar/
config/
service-config.js
View file @
d2c75c20
/**
/**
* @typedef {import('../types/config').HostConfig} HostConfig
* @typedef {import('../
../
types/config').HostConfig} HostConfig
* @typedef {import('../types/config').Service} Service
* @typedef {import('../
../
types/config').Service} Service
*/
*/
/**
/**
...
...
src/sidebar/test/service-config-test.js
→
src/sidebar/
config/
test/service-config-test.js
View file @
d2c75c20
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../service-config'
;
describe
(
'
serviceConfig'
,
function
()
{
describe
(
'
config/service-config'
,
()
=>
{
it
(
'returns null if services is not an array'
,
function
()
{
it
(
'returns null if services is not an array'
,
()
=>
{
const
settings
=
{
const
settings
=
{
services
:
'someString'
,
services
:
'someString'
,
};
};
...
@@ -9,7 +9,7 @@ describe('serviceConfig', function () {
...
@@ -9,7 +9,7 @@ describe('serviceConfig', function () {
assert
.
isNull
(
serviceConfig
(
settings
));
assert
.
isNull
(
serviceConfig
(
settings
));
});
});
it
(
'returns null if the settings object has no services'
,
function
()
{
it
(
'returns null if the settings object has no services'
,
()
=>
{
const
settings
=
{
const
settings
=
{
services
:
[],
services
:
[],
};
};
...
@@ -17,7 +17,7 @@ describe('serviceConfig', function () {
...
@@ -17,7 +17,7 @@ describe('serviceConfig', function () {
assert
.
isNull
(
serviceConfig
(
settings
));
assert
.
isNull
(
serviceConfig
(
settings
));
});
});
it
(
'returns the first service in the settings object'
,
function
()
{
it
(
'returns the first service in the settings object'
,
()
=>
{
const
settings
=
{
const
settings
=
{
services
:
[
services
:
[
{
{
...
...
src/sidebar/helpers/annotation-sharing.js
View file @
d2c75c20
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @typedef {import('../../types/config').HostConfig} HostConfig
* @typedef {import('../../types/config').HostConfig} HostConfig
*/
*/
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
/**
/**
* Retrieve an appropriate sharing link for this annotation.
* Retrieve an appropriate sharing link for this annotation.
...
...
src/sidebar/helpers/groups.js
View file @
d2c75c20
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*/
*/
import
escapeStringRegexp
from
'escape-string-regexp'
;
import
escapeStringRegexp
from
'escape-string-regexp'
;
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
/**
/**
* Should users be able to leave private groups of which they
* Should users be able to leave private groups of which they
...
...
src/sidebar/helpers/is-third-party-service.js
View file @
d2c75c20
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @typedef {import('../../types/config').MergedConfig} MergedConfig
* @typedef {import('../../types/config').MergedConfig} MergedConfig
*/
*/
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
/**
/**
* Return `true` if the first configured service is a "third-party" service.
* Return `true` if the first configured service is a "third-party" service.
...
...
src/sidebar/helpers/session.js
View file @
d2c75c20
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
/**
/**
* @typedef {import('../../types/config').HostConfig} HostConfig
* @typedef {import('../../types/config').HostConfig} HostConfig
...
...
src/sidebar/helpers/test/annotation-sharing-test.js
View file @
d2c75c20
...
@@ -17,7 +17,7 @@ describe('sidebar/helpers/annotation-sharing', () => {
...
@@ -17,7 +17,7 @@ describe('sidebar/helpers/annotation-sharing', () => {
};
};
sharingUtil
.
$imports
.
$mock
({
sharingUtil
.
$imports
.
$mock
({
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
});
});
});
});
...
...
src/sidebar/helpers/test/groups-test.js
View file @
d2c75c20
...
@@ -6,7 +6,7 @@ describe('sidebar/helpers/groups', () => {
...
@@ -6,7 +6,7 @@ describe('sidebar/helpers/groups', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
fakeServiceConfig
=
sinon
.
stub
().
returns
(
null
);
fakeServiceConfig
=
sinon
.
stub
().
returns
(
null
);
$imports
.
$mock
({
$imports
.
$mock
({
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
});
});
});
});
...
...
src/sidebar/helpers/test/is-third-party-service-test.js
View file @
d2c75c20
...
@@ -10,7 +10,7 @@ describe('sidebar/helpers/is-third-party-service', () => {
...
@@ -10,7 +10,7 @@ describe('sidebar/helpers/is-third-party-service', () => {
fakeSettings
=
{
authDomain
:
'hypothes.is'
};
fakeSettings
=
{
authDomain
:
'hypothes.is'
};
$imports
.
$mock
({
$imports
.
$mock
({
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
});
});
});
});
...
...
src/sidebar/services/groups.js
View file @
d2c75c20
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
{
isReply
}
from
'../helpers/annotation-metadata'
;
import
{
isReply
}
from
'../helpers/annotation-metadata'
;
import
{
combineGroups
}
from
'../helpers/groups'
;
import
{
combineGroups
}
from
'../helpers/groups'
;
import
{
awaitStateChange
}
from
'../store/util'
;
import
{
awaitStateChange
}
from
'../store/util'
;
...
...
src/sidebar/services/oauth-auth.js
View file @
d2c75c20
import
{
TinyEmitter
}
from
'tiny-emitter'
;
import
{
TinyEmitter
}
from
'tiny-emitter'
;
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
OAuthClient
from
'../util/oauth-client'
;
import
OAuthClient
from
'../util/oauth-client'
;
import
{
resolve
}
from
'../util/url'
;
import
{
resolve
}
from
'../util/url'
;
...
...
src/sidebar/services/session.js
View file @
d2c75c20
import
serviceConfig
from
'../service-config'
;
import
serviceConfig
from
'../
config/
service-config'
;
import
*
as
retryUtil
from
'../util/retry'
;
import
*
as
retryUtil
from
'../util/retry'
;
import
*
as
sentry
from
'../util/sentry'
;
import
*
as
sentry
from
'../util/sentry'
;
...
...
src/sidebar/services/test/session-test.js
View file @
d2c75c20
...
@@ -56,7 +56,7 @@ describe('sidebar/services/session', function () {
...
@@ -56,7 +56,7 @@ describe('sidebar/services/session', function () {
fakeToastMessenger
=
{
error
:
sandbox
.
spy
()
};
fakeToastMessenger
=
{
error
:
sandbox
.
spy
()
};
$imports
.
$mock
({
$imports
.
$mock
({
'../service-config'
:
fakeServiceConfig
,
'../
config/
service-config'
:
fakeServiceConfig
,
'../util/sentry'
:
fakeSentry
,
'../util/sentry'
:
fakeSentry
,
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment