FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
socket-cli/scripts/constants.js at main · solveforceapp/socket-cli · GitHub
solveforceapp
/
socket-cli
Public
forked from
SocketDev/socket-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
socket-cli
/
scripts
/
constants.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
179 lines (161 loc) · 5.75 KB
Breadcrumbs
socket-cli
/
scripts
/
constants.js
Copy path
File metadata and controls
179 lines (161 loc) · 5.75 KB
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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
'use strict'
const
path
=
require
(
'node:path'
)
const
registryConstants
=
require
(
'@socketsecurity/registry/lib/constants'
)
const
{
kInternalsSymbol
,
[
kInternalsSymbol
]
:
{
attributes
:
registryConstantsAttribs
,
createConstantsObject
,
}
,
}
=
registryConstants
const
CONSTANTS
=
'constants'
const
INLINED_CYCLONEDX_CDXGEN_VERSION
=
'INLINED_CYCLONEDX_CDXGEN_VERSION'
const
INLINED_SOCKET_CLI_HOMEPAGE
=
'INLINED_SOCKET_CLI_HOMEPAGE'
const
INLINED_SOCKET_CLI_LEGACY_BUILD
=
'INLINED_SOCKET_CLI_LEGACY_BUILD'
const
INLINED_SOCKET_CLI_NAME
=
'INLINED_SOCKET_CLI_NAME'
const
INLINED_SOCKET_CLI_PUBLISHED_BUILD
=
'INLINED_SOCKET_CLI_PUBLISHED_BUILD'
const
INLINED_SOCKET_CLI_SENTRY_BUILD
=
'INLINED_SOCKET_CLI_SENTRY_BUILD'
const
INLINED_SOCKET_CLI_VERSION
=
'INLINED_SOCKET_CLI_VERSION'
const
INLINED_SOCKET_CLI_VERSION_HASH
=
'INLINED_SOCKET_CLI_VERSION_HASH'
const
INLINED_SYNP_VERSION
=
'INLINED_SYNP_VERSION'
const
INSTRUMENT_WITH_SENTRY
=
'instrument-with-sentry'
const
ROLLUP_EXTERNAL_SUFFIX
=
'?commonjs-external'
const
SHADOW_NPM_BIN
=
'shadow-npm-bin'
const
SHADOW_NPM_INJECT
=
'shadow-npm-inject'
const
SLASH_NODE_MODULES_SLASH
=
'/node_modules/'
const
SOCKET
=
'socket'
const
SOCKET_CLI_BIN_NAME
=
'socket'
const
SOCKET_CLI_BIN_NAME_ALIAS
=
'cli'
const
SOCKET_CLI_SENTRY_BIN_NAME_ALIAS
=
'cli-with-sentry'
const
SOCKET_CLI_LEGACY_PACKAGE_NAME
=
'@socketsecurity/cli'
const
SOCKET_CLI_NPM_BIN_NAME
=
'socket-npm'
const
SOCKET_CLI_NPX_BIN_NAME
=
'socket-npx'
const
SOCKET_CLI_PACKAGE_NAME
=
'socket'
const
SOCKET_CLI_SENTRY_BIN_NAME
=
'socket-with-sentry'
const
SOCKET_CLI_SENTRY_NPM_BIN_NAME
=
'socket-npm-with-sentry'
const
SOCKET_CLI_SENTRY_NPX_BIN_NAME
=
'socket-npx-with-sentry'
const
SOCKET_CLI_SENTRY_PACKAGE_NAME
=
'@socketsecurity/cli-with-sentry'
const
UTILS
=
'utils'
const
VENDOR
=
'vendor'
const
WITH_SENTRY
=
'with-sentry'
const
LAZY_ENV
=
(
)
=>
{
const
{
envAsBoolean
}
=
require
(
'@socketsecurity/registry/lib/env'
)
const
{
env
}
=
process
return
Object
.
freeze
(
{
// Lazily access registryConstants.ENV.
...
registryConstants
.
ENV
,
// Flag set to determine if this is the Legacy build.
[
INLINED_SOCKET_CLI_LEGACY_BUILD
]
:
envAsBoolean
(
env
[
INLINED_SOCKET_CLI_LEGACY_BUILD
]
,
)
,
// Flag set to determine if this is a published build.
[
INLINED_SOCKET_CLI_PUBLISHED_BUILD
]
:
envAsBoolean
(
env
[
INLINED_SOCKET_CLI_PUBLISHED_BUILD
]
,
)
,
// Flag set to determine if this is the Sentry build.
[
INLINED_SOCKET_CLI_SENTRY_BUILD
]
:
envAsBoolean
(
env
[
INLINED_SOCKET_CLI_SENTRY_BUILD
]
,
)
,
}
)
}
const
lazyBlessedContribPath
=
(
)
=>
// Lazily access constants.externalPath.
path
.
join
(
constants
.
externalPath
,
'blessed-contrib'
)
const
lazyBlessedPath
=
(
)
=>
// Lazily access constants.externalPath.
path
.
join
(
constants
.
externalPath
,
'blessed'
)
const
lazyCoanaBinPath
=
(
)
=>
// Lazily access constants.coanaPath.
path
.
join
(
constants
.
coanaPath
,
'cli.mjs'
)
const
lazyCoanaPath
=
(
)
=>
// Lazily access constants.externalPath.
path
.
join
(
constants
.
externalPath
,
'@coana-tech/cli'
)
const
lazyConfigPath
=
(
)
=>
// Lazily access constants.rootPath.
path
.
join
(
constants
.
rootPath
,
'.config'
)
const
lazyDistPath
=
(
)
=>
// Lazily access constants.rootPath.
path
.
join
(
constants
.
rootPath
,
'dist'
)
const
lazyExternalPath
=
(
)
=>
// Lazily access constants.rootPath.
path
.
join
(
constants
.
rootPath
,
'external'
)
const
lazyRootPackageJsonPath
=
(
)
=>
// Lazily access constants.rootPath.
path
.
join
(
constants
.
rootPath
,
'package.json'
)
const
lazyRootPackageLockPath
=
(
)
=>
// Lazily access constants.rootPath.
path
.
join
(
constants
.
rootPath
,
'package-lock.json'
)
const
lazyRootPath
=
(
)
=>
path
.
resolve
(
__dirname
,
'..'
)
const
lazySocketRegistryPath
=
(
)
=>
// Lazily access constants.externalPath.
path
.
join
(
constants
.
externalPath
,
'@socketsecurity/registry'
)
const
lazySrcPath
=
(
)
=>
// Lazily access constants.rootPath.
path
.
join
(
constants
.
rootPath
,
'src'
)
const
constants
=
createConstantsObject
(
{
...
registryConstantsAttribs
.
props
,
CONSTANTS
,
ENV
:
undefined
,
INLINED_CYCLONEDX_CDXGEN_VERSION
,
INLINED_SOCKET_CLI_HOMEPAGE
,
INLINED_SOCKET_CLI_LEGACY_BUILD
,
INLINED_SOCKET_CLI_NAME
,
INLINED_SOCKET_CLI_PUBLISHED_BUILD
,
INLINED_SOCKET_CLI_SENTRY_BUILD
,
INLINED_SOCKET_CLI_VERSION
,
INLINED_SOCKET_CLI_VERSION_HASH
,
INLINED_SYNP_VERSION
,
INSTRUMENT_WITH_SENTRY
,
ROLLUP_EXTERNAL_SUFFIX
,
SHADOW_NPM_BIN
,
SHADOW_NPM_INJECT
,
SLASH_NODE_MODULES_SLASH
,
SOCKET
,
SOCKET_CLI_BIN_NAME
,
SOCKET_CLI_BIN_NAME_ALIAS
,
SOCKET_CLI_LEGACY_PACKAGE_NAME
,
SOCKET_CLI_NPM_BIN_NAME
,
SOCKET_CLI_NPX_BIN_NAME
,
SOCKET_CLI_PACKAGE_NAME
,
SOCKET_CLI_SENTRY_BIN_NAME
,
SOCKET_CLI_SENTRY_BIN_NAME_ALIAS
,
SOCKET_CLI_SENTRY_NPM_BIN_NAME
,
SOCKET_CLI_SENTRY_NPX_BIN_NAME
,
SOCKET_CLI_SENTRY_PACKAGE_NAME
,
UTILS
,
VENDOR
,
WITH_SENTRY
,
blessedContribPath
:
undefined
,
blessedOptions
:
undefined
,
blessedPath
:
undefined
,
coanaBinPath
:
undefined
,
coanaPath
:
undefined
,
configPath
:
undefined
,
distPath
:
undefined
,
externalPath
:
undefined
,
rootPackageJsonPath
:
undefined
,
rootPath
:
undefined
,
socketRegistryPath
:
undefined
,
srcPath
:
undefined
,
}
,
{
getters
:
{
...
registryConstantsAttribs
.
getters
,
ENV
:
LAZY_ENV
,
blessedContribPath
:
lazyBlessedContribPath
,
blessedPath
:
lazyBlessedPath
,
coanaBinPath
:
lazyCoanaBinPath
,
coanaPath
:
lazyCoanaPath
,
configPath
:
lazyConfigPath
,
distPath
:
lazyDistPath
,
externalPath
:
lazyExternalPath
,
rootPackageJsonPath
:
lazyRootPackageJsonPath
,
rootPackageLockPath
:
lazyRootPackageLockPath
,
rootPath
:
lazyRootPath
,
socketRegistryPath
:
lazySocketRegistryPath
,
srcPath
:
lazySrcPath
,
}
,
}
,
)
module
.
exports
=
constants
Back
|
FazBrowse Home
|
New Git URL