Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996447
cli.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
cli.ts
View Options
#!/usr/bin/env node
import
{
addCollection
}
from
"./add-collection.js"
;
import
{
addJDDComponent
}
from
"./add-jdd-component.js"
;
import
{
addRoute
}
from
"./add-route.js"
;
import
{
buildProject
}
from
"./build.js"
;
import
{
generateCollections
}
from
"./generate-collections.js"
;
import
{
generateComponents
}
from
"./generate-components.js"
;
import
{
generateRoutes
}
from
"./generate-routes.js"
;
import
{
makeEnv
}
from
"./make-env.js"
;
import
yargs
from
"yargs/yargs"
;
import
{
getFonts
}
from
"./get-fonts.js"
;
import
{
addCRUD
}
from
"./add-crud.js"
;
const
actions
:
Record
<
string
,
(
args
:
Record
<
string
,
string
|
boolean
>
)
=>
Promise
<
void
>
|
undefined
>
=
{
"add-collection"
:
addCollection
,
"add-route"
:
addRoute
,
"add-crud"
:
addCRUD
,
"generate-collections"
:
generateCollections
,
"generate-components"
:
generateComponents
,
"generate-routes"
:
generateRoutes
,
build
:
buildProject
,
default
:
async
function
()
{
console
.
log
(
"Usage: `npx sealgen <action>`"
);
console
.
log
(
`Available actions:
${
Object
.
keys
(
actions
)
.
filter
((
e
)
=>
e
!=
"default"
)
.
join
(
", "
)
}
`
);
},
"make-env"
:
makeEnv
,
"add-component"
:
addJDDComponent
,
"get-fonts"
:
getFonts
,
};
void
(
async
function
()
{
const
action
=
process
.
argv
.
at
(
2
);
const
fn
=
actions
[
action
||
"default"
]
||
actions
.
default
;
const
args
=
yargs
(
process
.
argv
).
argv
as
Record
<
string
,
string
|
boolean
>
;
await
fn
(
args
);
})();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 14:03 (16 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557261
Default Alt Text
cli.ts (1 KB)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment