FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ToolJet/plugins/create-operations-file.js at develop · nestjs-examples/ToolJet · GitHub
nestjs-examples
ToolJet
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ToolJet
/
plugins
/
create-operations-file.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (19 loc) · 736 Bytes
Breadcrumbs
ToolJet
/
plugins
/
create-operations-file.js
Copy path
File metadata and controls
21 lines (19 loc) · 736 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const
{
readdirSync
,
writeFileSync
,
existsSync
}
=
require
(
'fs'
)
;
const
packages
=
readdirSync
(
'./packages'
,
{
withFileTypes
:
true
}
)
.
filter
(
(
dirent
)
=>
dirent
.
isDirectory
(
)
&&
dirent
.
name
!==
'common'
)
;
packages
.
forEach
(
(
dirent
)
=>
{
if
(
existsSync
(
`./packages/
${
dirent
.
name
}
/dist/operations/index.js`
)
)
{
console
.
log
(
`Building operations.json for :
${
dirent
.
name
}
`
)
;
import
(
`./packages/
${
dirent
.
name
}
/dist/operations/index.js`
)
.
then
(
(
module
)
=>
{
writeFileSync
(
`./packages/
${
dirent
.
name
}
/lib/operations.json`
,
JSON
.
stringify
(
module
.
default
.
default
)
,
{
encoding
:
'utf8'
,
}
)
;
}
)
.
catch
(
(
err
)
=>
{
console
.
error
(
dirent
.
name
,
err
)
;
throw
err
;
}
)
;
}
}
)
;
Back
|
FazBrowse Home
|
New Git URL