Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
dfcd03c3
Commit
dfcd03c3
authored
Dec 22, 2020
by
aniket-engg
Committed by
Aniket
Jan 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
params to param in comments
parent
ee391dbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
resolve.ts
libs/remix-url-resolver/src/resolve.ts
+9
-5
No files found.
libs/remix-url-resolver/src/resolve.ts
View file @
dfcd03c3
...
@@ -24,10 +24,11 @@ export class RemixURLResolver {
...
@@ -24,10 +24,11 @@ export class RemixURLResolver {
this
.
previouslyHandled
=
{}
this
.
previouslyHandled
=
{}
this
.
gistAccessToken
=
gistToken
?
gistToken
:
''
this
.
gistAccessToken
=
gistToken
?
gistToken
:
''
}
}
/**
/**
* Handle an import statement based on github
* Handle an import statement based on github
* @param
s
root The root of the github import statement
* @param root The root of the github import statement
* @param
s
filePath path of the file in github
* @param filePath path of the file in github
*/
*/
async
handleGithubCall
(
root
:
string
,
filePath
:
string
)
{
async
handleGithubCall
(
root
:
string
,
filePath
:
string
)
{
let
param
=
'?'
let
param
=
'?'
...
@@ -49,13 +50,13 @@ export class RemixURLResolver {
...
@@ -49,13 +50,13 @@ export class RemixURLResolver {
throw
e
throw
e
}
}
}
}
/**
/**
* Handle an import statement based on http
* Handle an import statement based on http
* @param url The url of the import statement
* @param url The url of the import statement
* @param cleanUrl
* @param cleanUrl
*/
*/
async
handleHttp
(
url
:
string
,
cleanUrl
:
string
)
{
async
handleHttp
(
url
:
string
,
cleanUrl
:
string
)
{
console
.
log
(
'Inside libs handleHttpCall'
)
//eslint-disable-next-line no-useless-catch
//eslint-disable-next-line no-useless-catch
try
{
try
{
const
response
:
AxiosResponse
=
await
axios
.
get
(
url
)
const
response
:
AxiosResponse
=
await
axios
.
get
(
url
)
...
@@ -64,13 +65,13 @@ export class RemixURLResolver {
...
@@ -64,13 +65,13 @@ export class RemixURLResolver {
throw
e
throw
e
}
}
}
}
/**
/**
* Handle an import statement based on https
* Handle an import statement based on https
* @param url The url of the import statement
* @param url The url of the import statement
* @param cleanUrl
* @param cleanUrl
*/
*/
async
handleHttps
(
url
:
string
,
cleanUrl
:
string
)
{
async
handleHttps
(
url
:
string
,
cleanUrl
:
string
)
{
console
.
log
(
'Inside libs handleHttpsCall'
)
//eslint-disable-next-line no-useless-catch
//eslint-disable-next-line no-useless-catch
try
{
try
{
const
response
:
AxiosResponse
=
await
axios
.
get
(
url
)
const
response
:
AxiosResponse
=
await
axios
.
get
(
url
)
...
@@ -79,12 +80,14 @@ export class RemixURLResolver {
...
@@ -79,12 +80,14 @@ export class RemixURLResolver {
throw
e
throw
e
}
}
}
}
handleSwarm
(
url
:
string
,
cleanURL
:
string
)
{
handleSwarm
(
url
:
string
,
cleanURL
:
string
)
{
return
return
}
}
/**
/**
* Handle an import statement based on IPFS
* Handle an import statement based on IPFS
* @param
s
url The url of the IPFS import statement
* @param url The url of the IPFS import statement
*/
*/
async
handleIPFS
(
url
:
string
)
{
async
handleIPFS
(
url
:
string
)
{
// replace ipfs:// with /ipfs/
// replace ipfs:// with /ipfs/
...
@@ -100,6 +103,7 @@ export class RemixURLResolver {
...
@@ -100,6 +103,7 @@ export class RemixURLResolver {
throw
e
throw
e
}
}
}
}
getHandlers
():
Handler
[]
{
getHandlers
():
Handler
[]
{
return
[
return
[
{
{
...
...
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