Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9583703
index.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
790 B
Referenced Files
None
Subscribers
None
index.ts
View Options
#!/usr/bin/env node
import
{
addCollection
}
from
"./add-collection"
;
import
{
addRoute
}
from
"./add-route"
;
import
{
generateCollections
}
from
"./generate-collections"
;
import
{
generateRoutes
}
from
"./generate-routes"
;
const
actions
:
Record
<
string
,
()
=>
Promise
<
void
>
|
undefined
>
=
{
"add-collection"
:
addCollection
,
"add-route"
:
addRoute
,
"generate-collections"
:
generateCollections
,
"generate-routes"
:
generateRoutes
,
default
:
async
function
()
{
console
.
log
(
"Usage: `sealscript <action>`"
);
console
.
log
(
`Available actions:
${
Object
.
keys
(
actions
)
.
filter
((
e
)
=>
e
!=
"default"
)
.
join
(
", "
)
}
`
);
},
};
void
(
async
function
()
{
const
action
=
process
.
argv
.
at
(
-
1
);
actions
;
const
fn
=
actions
[
action
||
"default"
]
||
actions
.
default
;
await
fn
();
})();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 10:28 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
973904
Default Alt Text
index.ts (790 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment