Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F5665550
list.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
824 B
Referenced Files
None
Subscribers
None
list.ts
View Options
import
_locreq
from
"locreq"
;
import
prompts
from
"prompts"
;
import
{
listCollections
}
from
"../utils/list-collections.js"
;
import
{
formatWithPrettier
}
from
"../utils/prettier.js"
;
import
{
collectionListTemplate
}
from
"./shared/collection-list.js"
;
export
const
listTemplate
=
async
(
action_name
:
string
,
newfilefullpath
:
string
)
:
Promise
<
string
>
=>
{
const
response
=
await
prompts
({
type
:
"autocomplete"
,
name
:
"collection"
,
message
:
"Which sealious collection do you want to list?"
,
choices
:
(
await
listCollections
()
).
map
((
collection
)
=>
({
title
:
collection
,
value
:
collection
,
})),
});
const
collection_name
=
response
.
collection
as
string
;
const
result
=
await
collectionListTemplate
(
collection_name
,
action_name
,
newfilefullpath
);
return
formatWithPrettier
(
result
);
};
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sat, Jun 7, 23:21 (5 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625061
Default Alt Text
list.ts (824 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment