varlock 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-load.js +5 -6
- package/dist/chunk-33ROL4J5.js.map +1 -1
- package/dist/chunk-3NTATUIY.js +17 -0
- package/dist/chunk-3NTATUIY.js.map +1 -0
- package/dist/{chunk-DHFEY3C4.js → chunk-46HUIBFX.js} +30 -7
- package/dist/chunk-46HUIBFX.js.map +1 -0
- package/dist/{chunk-7UQXFWKN.js → chunk-5URKU5HG.js} +93 -3
- package/dist/chunk-5URKU5HG.js.map +1 -0
- package/dist/{chunk-C273RDM5.js → chunk-656FP6YP.js} +10 -8
- package/dist/chunk-656FP6YP.js.map +1 -0
- package/dist/{chunk-XPHGSDAF.js → chunk-7TXRGZZC.js} +3 -4
- package/dist/chunk-7TXRGZZC.js.map +1 -0
- package/dist/chunk-ANHWU7RB.js +59 -0
- package/dist/chunk-ANHWU7RB.js.map +1 -0
- package/dist/{chunk-VN64D2EQ.js → chunk-ASGIMFTP.js} +3 -4
- package/dist/chunk-ASGIMFTP.js.map +1 -0
- package/dist/{chunk-ZIN4KXR6.js → chunk-BIYA4LBB.js} +10 -9
- package/dist/chunk-BIYA4LBB.js.map +1 -0
- package/dist/chunk-DAZNZPLN.js.map +1 -1
- package/dist/chunk-FGMXIEFA.js.map +1 -1
- package/dist/{chunk-DOIKZ3NG.js → chunk-HBCSJWPN.js} +6 -6
- package/dist/chunk-HBCSJWPN.js.map +1 -0
- package/dist/{chunk-H2TT4DP5.js → chunk-HH7DAS63.js} +17 -161
- package/dist/chunk-HH7DAS63.js.map +1 -0
- package/dist/{chunk-NN3XFBPE.js → chunk-I3J2UCH7.js} +3 -3
- package/dist/chunk-I3J2UCH7.js.map +1 -0
- package/dist/{chunk-DROJWTCD.js → chunk-INMYFAWB.js} +1401 -1434
- package/dist/chunk-INMYFAWB.js.map +1 -0
- package/dist/{chunk-A4AHZSZB.js → chunk-JX4PYL7V.js} +15 -27
- package/dist/chunk-JX4PYL7V.js.map +1 -0
- package/dist/chunk-LHTLO65N.js +99 -0
- package/dist/chunk-LHTLO65N.js.map +1 -0
- package/dist/{chunk-B4UBSMSZ.js → chunk-PUGFIZE3.js} +4 -3
- package/dist/chunk-PUGFIZE3.js.map +1 -0
- package/dist/{chunk-RCHPHIHX.js → chunk-RZT65DRA.js} +2 -2
- package/dist/chunk-RZT65DRA.js.map +1 -0
- package/dist/chunk-USSBWRQF.js +54 -0
- package/dist/chunk-USSBWRQF.js.map +1 -0
- package/dist/chunk-WGUFO7CT.js +193 -0
- package/dist/chunk-WGUFO7CT.js.map +1 -0
- package/dist/{chunk-SVDXBE6D.js → chunk-X3HJMANF.js} +3 -4
- package/dist/chunk-X3HJMANF.js.map +1 -0
- package/dist/chunk-YSPDPNBR.js +14 -0
- package/dist/{chunk-RUB5A7IC.js.map → chunk-YSPDPNBR.js.map} +1 -1
- package/dist/cli/cli-executable.js +702 -158
- package/dist/cli/cli-executable.js.map +1 -1
- package/dist/doctor.command-SBG4H7Z4.js +7 -0
- package/dist/{doctor.command-7BQSOQWW.js.map → doctor.command-SBG4H7Z4.js.map} +1 -1
- package/dist/dotenv-compat.js +5 -6
- package/dist/en-US-TSGNDI2P.js.map +1 -1
- package/dist/encrypt.command-AGHQ4KTI.js +7 -0
- package/dist/{encrypt.command-VGJABHNK.js.map → encrypt.command-AGHQ4KTI.js.map} +1 -1
- package/dist/env-B8lQt2sl.d.ts +42 -0
- package/dist/help.command-B7VWA53B.js +5 -0
- package/dist/{help.command-YZDL2VEQ.js.map → help.command-B7VWA53B.js.map} +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -1
- package/dist/init.command-3DHC5DNC.js +13 -0
- package/dist/{init.command-CY3ZOIGP.js.map → init.command-3DHC5DNC.js.map} +1 -1
- package/dist/ja-JP-UBPCQAAD.js.map +1 -1
- package/dist/load.command-CTOV5PYR.js +12 -0
- package/dist/{load.command-ZFNTAAJE.js.map → load.command-CTOV5PYR.js.map} +1 -1
- package/dist/login.command-UZBZIPP3.js +10 -0
- package/dist/{login.command-KYZ4FXS5.js.map → login.command-UZBZIPP3.js.map} +1 -1
- package/dist/run.command-5276KIMX.js +12 -0
- package/dist/{run.command-VRKI6ZVN.js.map → run.command-5276KIMX.js.map} +1 -1
- package/dist/runtime/env.d.ts +1 -27
- package/dist/runtime/env.js +1 -1
- package/dist/runtime/patch-console.js +2 -3
- package/dist/runtime/patch-response.js +2 -3
- package/dist/runtime/patch-server-response.js +2 -3
- package/dist/telemetry.command-UHJTZULL.js +10 -0
- package/dist/telemetry.command-UHJTZULL.js.map +1 -0
- package/package.json +5 -1
- package/dist/chunk-7UQXFWKN.js.map +0 -1
- package/dist/chunk-A4AHZSZB.js.map +0 -1
- package/dist/chunk-B4UBSMSZ.js.map +0 -1
- package/dist/chunk-C273RDM5.js.map +0 -1
- package/dist/chunk-CLVBJA4G.js +0 -107
- package/dist/chunk-CLVBJA4G.js.map +0 -1
- package/dist/chunk-DHFEY3C4.js.map +0 -1
- package/dist/chunk-DOIKZ3NG.js.map +0 -1
- package/dist/chunk-DROJWTCD.js.map +0 -1
- package/dist/chunk-GSRDZVQI.js +0 -26
- package/dist/chunk-GSRDZVQI.js.map +0 -1
- package/dist/chunk-H2TT4DP5.js.map +0 -1
- package/dist/chunk-NN3XFBPE.js.map +0 -1
- package/dist/chunk-QCC3P7BT.js +0 -39
- package/dist/chunk-QCC3P7BT.js.map +0 -1
- package/dist/chunk-RCHPHIHX.js.map +0 -1
- package/dist/chunk-RUB5A7IC.js +0 -14
- package/dist/chunk-SVDXBE6D.js.map +0 -1
- package/dist/chunk-VN64D2EQ.js.map +0 -1
- package/dist/chunk-XHOJF7U7.js +0 -12
- package/dist/chunk-XHOJF7U7.js.map +0 -1
- package/dist/chunk-XPHGSDAF.js.map +0 -1
- package/dist/chunk-ZIN4KXR6.js.map +0 -1
- package/dist/doctor.command-7BQSOQWW.js +0 -6
- package/dist/encrypt.command-VGJABHNK.js +0 -6
- package/dist/help.command-YZDL2VEQ.js +0 -5
- package/dist/init.command-CY3ZOIGP.js +0 -11
- package/dist/load.command-ZFNTAAJE.js +0 -10
- package/dist/login.command-KYZ4FXS5.js +0 -7
- package/dist/opt-out.command-Y4KUQ6PQ.js +0 -5
- package/dist/opt-out.command-Y4KUQ6PQ.js.map +0 -1
- package/dist/run.command-VRKI6ZVN.js +0 -10
|
@@ -1,24 +1,472 @@
|
|
|
1
|
-
import { commandSpec as commandSpec$6 } from '../chunk-
|
|
2
|
-
import { CONFIG, commandSpec as commandSpec$7 } from '../chunk-
|
|
3
|
-
import {
|
|
4
|
-
import { fmt } from '../chunk-
|
|
5
|
-
import { commandSpec as commandSpec$1 } from '../chunk-
|
|
6
|
-
import { commandSpec as commandSpec$2 } from '../chunk-
|
|
7
|
-
import { commandSpec as commandSpec$3 } from '../chunk-
|
|
1
|
+
import { commandSpec as commandSpec$6 } from '../chunk-USSBWRQF.js';
|
|
2
|
+
import { CONFIG, commandSpec as commandSpec$7 } from '../chunk-BIYA4LBB.js';
|
|
3
|
+
import { commandSpec } from '../chunk-HH7DAS63.js';
|
|
4
|
+
import { CliExitError, fmt } from '../chunk-WGUFO7CT.js';
|
|
5
|
+
import { commandSpec as commandSpec$1 } from '../chunk-656FP6YP.js';
|
|
6
|
+
import { commandSpec as commandSpec$2 } from '../chunk-JX4PYL7V.js';
|
|
7
|
+
import { commandSpec as commandSpec$3 } from '../chunk-PUGFIZE3.js';
|
|
8
8
|
import '../chunk-DAZNZPLN.js';
|
|
9
|
-
import { commandSpec as commandSpec$4 } from '../chunk-
|
|
10
|
-
import { commandSpec as commandSpec$5 } from '../chunk-
|
|
9
|
+
import { commandSpec as commandSpec$4 } from '../chunk-I3J2UCH7.js';
|
|
10
|
+
import { commandSpec as commandSpec$5 } from '../chunk-RZT65DRA.js';
|
|
11
11
|
import { cli } from '../chunk-33ROL4J5.js';
|
|
12
|
-
import { InvalidEnvError } from '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import { ansis_default } from '../chunk-
|
|
15
|
-
import {
|
|
12
|
+
import { InvalidEnvError } from '../chunk-HBCSJWPN.js';
|
|
13
|
+
import '../chunk-3NTATUIY.js';
|
|
14
|
+
import { ansis_default } from '../chunk-5URKU5HG.js';
|
|
15
|
+
import { gracefulExit, asyncExitHook } from '../chunk-LHTLO65N.js';
|
|
16
|
+
import '../chunk-ANHWU7RB.js';
|
|
17
|
+
import { EnvSourceParseError } from '../chunk-INMYFAWB.js';
|
|
16
18
|
import '../chunk-FGMXIEFA.js';
|
|
17
|
-
import { __name } from '../chunk-XN24GZXQ.js';
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { __commonJS, __name, __toESM } from '../chunk-XN24GZXQ.js';
|
|
20
|
+
import os2 from 'node:os';
|
|
21
|
+
import crypto, { createHash } from 'node:crypto';
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import fs, { readFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
24
|
+
import Debug from 'debug';
|
|
25
|
+
import process2 from 'node:process';
|
|
21
26
|
|
|
27
|
+
// ../../node_modules/.pnpm/ci-info@4.3.0/node_modules/ci-info/vendors.json
|
|
28
|
+
var require_vendors = __commonJS({
|
|
29
|
+
"../../node_modules/.pnpm/ci-info@4.3.0/node_modules/ci-info/vendors.json"(exports, module) {
|
|
30
|
+
module.exports = [
|
|
31
|
+
{
|
|
32
|
+
name: "Agola CI",
|
|
33
|
+
constant: "AGOLA",
|
|
34
|
+
env: "AGOLA_GIT_REF",
|
|
35
|
+
pr: "AGOLA_PULL_REQUEST_ID"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "Appcircle",
|
|
39
|
+
constant: "APPCIRCLE",
|
|
40
|
+
env: "AC_APPCIRCLE",
|
|
41
|
+
pr: {
|
|
42
|
+
env: "AC_GIT_PR",
|
|
43
|
+
ne: "false"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "AppVeyor",
|
|
48
|
+
constant: "APPVEYOR",
|
|
49
|
+
env: "APPVEYOR",
|
|
50
|
+
pr: "APPVEYOR_PULL_REQUEST_NUMBER"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "AWS CodeBuild",
|
|
54
|
+
constant: "CODEBUILD",
|
|
55
|
+
env: "CODEBUILD_BUILD_ARN",
|
|
56
|
+
pr: {
|
|
57
|
+
env: "CODEBUILD_WEBHOOK_EVENT",
|
|
58
|
+
any: [
|
|
59
|
+
"PULL_REQUEST_CREATED",
|
|
60
|
+
"PULL_REQUEST_UPDATED",
|
|
61
|
+
"PULL_REQUEST_REOPENED"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "Azure Pipelines",
|
|
67
|
+
constant: "AZURE_PIPELINES",
|
|
68
|
+
env: "TF_BUILD",
|
|
69
|
+
pr: {
|
|
70
|
+
BUILD_REASON: "PullRequest"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "Bamboo",
|
|
75
|
+
constant: "BAMBOO",
|
|
76
|
+
env: "bamboo_planKey"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "Bitbucket Pipelines",
|
|
80
|
+
constant: "BITBUCKET",
|
|
81
|
+
env: "BITBUCKET_COMMIT",
|
|
82
|
+
pr: "BITBUCKET_PR_ID"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "Bitrise",
|
|
86
|
+
constant: "BITRISE",
|
|
87
|
+
env: "BITRISE_IO",
|
|
88
|
+
pr: "BITRISE_PULL_REQUEST"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "Buddy",
|
|
92
|
+
constant: "BUDDY",
|
|
93
|
+
env: "BUDDY_WORKSPACE_ID",
|
|
94
|
+
pr: "BUDDY_EXECUTION_PULL_REQUEST_ID"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "Buildkite",
|
|
98
|
+
constant: "BUILDKITE",
|
|
99
|
+
env: "BUILDKITE",
|
|
100
|
+
pr: {
|
|
101
|
+
env: "BUILDKITE_PULL_REQUEST",
|
|
102
|
+
ne: "false"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "CircleCI",
|
|
107
|
+
constant: "CIRCLE",
|
|
108
|
+
env: "CIRCLECI",
|
|
109
|
+
pr: "CIRCLE_PULL_REQUEST"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "Cirrus CI",
|
|
113
|
+
constant: "CIRRUS",
|
|
114
|
+
env: "CIRRUS_CI",
|
|
115
|
+
pr: "CIRRUS_PR"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "Cloudflare Pages",
|
|
119
|
+
constant: "CLOUDFLARE_PAGES",
|
|
120
|
+
env: "CF_PAGES"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "Cloudflare Workers",
|
|
124
|
+
constant: "CLOUDFLARE_WORKERS",
|
|
125
|
+
env: "WORKERS_CI"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "Codefresh",
|
|
129
|
+
constant: "CODEFRESH",
|
|
130
|
+
env: "CF_BUILD_ID",
|
|
131
|
+
pr: {
|
|
132
|
+
any: [
|
|
133
|
+
"CF_PULL_REQUEST_NUMBER",
|
|
134
|
+
"CF_PULL_REQUEST_ID"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "Codemagic",
|
|
140
|
+
constant: "CODEMAGIC",
|
|
141
|
+
env: "CM_BUILD_ID",
|
|
142
|
+
pr: "CM_PULL_REQUEST"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "Codeship",
|
|
146
|
+
constant: "CODESHIP",
|
|
147
|
+
env: {
|
|
148
|
+
CI_NAME: "codeship"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "Drone",
|
|
153
|
+
constant: "DRONE",
|
|
154
|
+
env: "DRONE",
|
|
155
|
+
pr: {
|
|
156
|
+
DRONE_BUILD_EVENT: "pull_request"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "dsari",
|
|
161
|
+
constant: "DSARI",
|
|
162
|
+
env: "DSARI"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "Earthly",
|
|
166
|
+
constant: "EARTHLY",
|
|
167
|
+
env: "EARTHLY_CI"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "Expo Application Services",
|
|
171
|
+
constant: "EAS",
|
|
172
|
+
env: "EAS_BUILD"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "Gerrit",
|
|
176
|
+
constant: "GERRIT",
|
|
177
|
+
env: "GERRIT_PROJECT"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "Gitea Actions",
|
|
181
|
+
constant: "GITEA_ACTIONS",
|
|
182
|
+
env: "GITEA_ACTIONS"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "GitHub Actions",
|
|
186
|
+
constant: "GITHUB_ACTIONS",
|
|
187
|
+
env: "GITHUB_ACTIONS",
|
|
188
|
+
pr: {
|
|
189
|
+
GITHUB_EVENT_NAME: "pull_request"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "GitLab CI",
|
|
194
|
+
constant: "GITLAB",
|
|
195
|
+
env: "GITLAB_CI",
|
|
196
|
+
pr: "CI_MERGE_REQUEST_ID"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "GoCD",
|
|
200
|
+
constant: "GOCD",
|
|
201
|
+
env: "GO_PIPELINE_LABEL"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "Google Cloud Build",
|
|
205
|
+
constant: "GOOGLE_CLOUD_BUILD",
|
|
206
|
+
env: "BUILDER_OUTPUT"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "Harness CI",
|
|
210
|
+
constant: "HARNESS",
|
|
211
|
+
env: "HARNESS_BUILD_ID"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: "Heroku",
|
|
215
|
+
constant: "HEROKU",
|
|
216
|
+
env: {
|
|
217
|
+
env: "NODE",
|
|
218
|
+
includes: "/app/.heroku/node/bin/node"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "Hudson",
|
|
223
|
+
constant: "HUDSON",
|
|
224
|
+
env: "HUDSON_URL"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "Jenkins",
|
|
228
|
+
constant: "JENKINS",
|
|
229
|
+
env: [
|
|
230
|
+
"JENKINS_URL",
|
|
231
|
+
"BUILD_ID"
|
|
232
|
+
],
|
|
233
|
+
pr: {
|
|
234
|
+
any: [
|
|
235
|
+
"ghprbPullId",
|
|
236
|
+
"CHANGE_ID"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "LayerCI",
|
|
242
|
+
constant: "LAYERCI",
|
|
243
|
+
env: "LAYERCI",
|
|
244
|
+
pr: "LAYERCI_PULL_REQUEST"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: "Magnum CI",
|
|
248
|
+
constant: "MAGNUM",
|
|
249
|
+
env: "MAGNUM"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "Netlify CI",
|
|
253
|
+
constant: "NETLIFY",
|
|
254
|
+
env: "NETLIFY",
|
|
255
|
+
pr: {
|
|
256
|
+
env: "PULL_REQUEST",
|
|
257
|
+
ne: "false"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: "Nevercode",
|
|
262
|
+
constant: "NEVERCODE",
|
|
263
|
+
env: "NEVERCODE",
|
|
264
|
+
pr: {
|
|
265
|
+
env: "NEVERCODE_PULL_REQUEST",
|
|
266
|
+
ne: "false"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: "Prow",
|
|
271
|
+
constant: "PROW",
|
|
272
|
+
env: "PROW_JOB_ID"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: "ReleaseHub",
|
|
276
|
+
constant: "RELEASEHUB",
|
|
277
|
+
env: "RELEASE_BUILD_ID"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: "Render",
|
|
281
|
+
constant: "RENDER",
|
|
282
|
+
env: "RENDER",
|
|
283
|
+
pr: {
|
|
284
|
+
IS_PULL_REQUEST: "true"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: "Sail CI",
|
|
289
|
+
constant: "SAIL",
|
|
290
|
+
env: "SAILCI",
|
|
291
|
+
pr: "SAIL_PULL_REQUEST_NUMBER"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "Screwdriver",
|
|
295
|
+
constant: "SCREWDRIVER",
|
|
296
|
+
env: "SCREWDRIVER",
|
|
297
|
+
pr: {
|
|
298
|
+
env: "SD_PULL_REQUEST",
|
|
299
|
+
ne: "false"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: "Semaphore",
|
|
304
|
+
constant: "SEMAPHORE",
|
|
305
|
+
env: "SEMAPHORE",
|
|
306
|
+
pr: "PULL_REQUEST_NUMBER"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "Sourcehut",
|
|
310
|
+
constant: "SOURCEHUT",
|
|
311
|
+
env: {
|
|
312
|
+
CI_NAME: "sourcehut"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: "Strider CD",
|
|
317
|
+
constant: "STRIDER",
|
|
318
|
+
env: "STRIDER"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: "TaskCluster",
|
|
322
|
+
constant: "TASKCLUSTER",
|
|
323
|
+
env: [
|
|
324
|
+
"TASK_ID",
|
|
325
|
+
"RUN_ID"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
name: "TeamCity",
|
|
330
|
+
constant: "TEAMCITY",
|
|
331
|
+
env: "TEAMCITY_VERSION"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: "Travis CI",
|
|
335
|
+
constant: "TRAVIS",
|
|
336
|
+
env: "TRAVIS",
|
|
337
|
+
pr: {
|
|
338
|
+
env: "TRAVIS_PULL_REQUEST",
|
|
339
|
+
ne: "false"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "Vela",
|
|
344
|
+
constant: "VELA",
|
|
345
|
+
env: "VELA",
|
|
346
|
+
pr: {
|
|
347
|
+
VELA_PULL_REQUEST: "1"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "Vercel",
|
|
352
|
+
constant: "VERCEL",
|
|
353
|
+
env: {
|
|
354
|
+
any: [
|
|
355
|
+
"NOW_BUILDER",
|
|
356
|
+
"VERCEL"
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
pr: "VERCEL_GIT_PULL_REQUEST_ID"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: "Visual Studio App Center",
|
|
363
|
+
constant: "APPCENTER",
|
|
364
|
+
env: "APPCENTER_BUILD_ID"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: "Woodpecker",
|
|
368
|
+
constant: "WOODPECKER",
|
|
369
|
+
env: {
|
|
370
|
+
CI: "woodpecker"
|
|
371
|
+
},
|
|
372
|
+
pr: {
|
|
373
|
+
CI_BUILD_EVENT: "pull_request"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: "Xcode Cloud",
|
|
378
|
+
constant: "XCODE_CLOUD",
|
|
379
|
+
env: "CI_XCODE_PROJECT",
|
|
380
|
+
pr: "CI_PULL_REQUEST_NUMBER"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "Xcode Server",
|
|
384
|
+
constant: "XCODE_SERVER",
|
|
385
|
+
env: "XCS"
|
|
386
|
+
}
|
|
387
|
+
];
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
// ../../node_modules/.pnpm/ci-info@4.3.0/node_modules/ci-info/index.js
|
|
392
|
+
var require_ci_info = __commonJS({
|
|
393
|
+
"../../node_modules/.pnpm/ci-info@4.3.0/node_modules/ci-info/index.js"(exports) {
|
|
394
|
+
var vendors = require_vendors();
|
|
395
|
+
var env = process.env;
|
|
396
|
+
Object.defineProperty(exports, "_vendors", {
|
|
397
|
+
value: vendors.map(function(v) {
|
|
398
|
+
return v.constant;
|
|
399
|
+
})
|
|
400
|
+
});
|
|
401
|
+
exports.name = null;
|
|
402
|
+
exports.isPR = null;
|
|
403
|
+
exports.id = null;
|
|
404
|
+
vendors.forEach(function(vendor) {
|
|
405
|
+
const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
|
|
406
|
+
const isCI2 = envs.every(function(obj) {
|
|
407
|
+
return checkEnv(obj);
|
|
408
|
+
});
|
|
409
|
+
exports[vendor.constant] = isCI2;
|
|
410
|
+
if (!isCI2) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
exports.name = vendor.name;
|
|
414
|
+
exports.isPR = checkPR(vendor);
|
|
415
|
+
exports.id = vendor.constant;
|
|
416
|
+
});
|
|
417
|
+
exports.isCI = !!(env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
|
|
418
|
+
(env.BUILD_ID || // Jenkins, Cloudbees
|
|
419
|
+
env.BUILD_NUMBER || // Jenkins, TeamCity
|
|
420
|
+
env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari, Cloudflare Pages/Workers
|
|
421
|
+
env.CI_APP_ID || // Appflow
|
|
422
|
+
env.CI_BUILD_ID || // Appflow
|
|
423
|
+
env.CI_BUILD_NUMBER || // Appflow
|
|
424
|
+
env.CI_NAME || // Codeship and others
|
|
425
|
+
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
|
|
426
|
+
env.RUN_ID || // TaskCluster, dsari
|
|
427
|
+
exports.name || false));
|
|
428
|
+
function checkEnv(obj) {
|
|
429
|
+
if (typeof obj === "string") return !!env[obj];
|
|
430
|
+
if ("env" in obj) {
|
|
431
|
+
return env[obj.env] && env[obj.env].includes(obj.includes);
|
|
432
|
+
}
|
|
433
|
+
if ("any" in obj) {
|
|
434
|
+
return obj.any.some(function(k) {
|
|
435
|
+
return !!env[k];
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
return Object.keys(obj).every(function(k) {
|
|
439
|
+
return env[k] === obj[k];
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
__name(checkEnv, "checkEnv");
|
|
443
|
+
function checkPR(vendor) {
|
|
444
|
+
switch (typeof vendor.pr) {
|
|
445
|
+
case "string":
|
|
446
|
+
return !!env[vendor.pr];
|
|
447
|
+
case "object":
|
|
448
|
+
if ("env" in vendor.pr) {
|
|
449
|
+
if ("any" in vendor.pr) {
|
|
450
|
+
return vendor.pr.any.some(function(key) {
|
|
451
|
+
return env[vendor.pr.env] === key;
|
|
452
|
+
});
|
|
453
|
+
} else {
|
|
454
|
+
return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
|
|
455
|
+
}
|
|
456
|
+
} else if ("any" in vendor.pr) {
|
|
457
|
+
return vendor.pr.any.some(function(key) {
|
|
458
|
+
return !!env[key];
|
|
459
|
+
});
|
|
460
|
+
} else {
|
|
461
|
+
return checkEnv(vendor.pr);
|
|
462
|
+
}
|
|
463
|
+
default:
|
|
464
|
+
return null;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
__name(checkPR, "checkPR");
|
|
468
|
+
}
|
|
469
|
+
});
|
|
22
470
|
var VARLOCK_BANNER = [
|
|
23
471
|
"",
|
|
24
472
|
" \u2588\u2588\u2592 \u2588\u2593 \u2584\u2584\u2584 \u2588\u2588\u2580\u2588\u2588\u2588 \u2588\u2588\u2593 \u2592\u2588\u2588\u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588\u2584 \u2588\u2588 \u2584\u2588\u2580",
|
|
@@ -33,45 +481,230 @@ var VARLOCK_BANNER = [
|
|
|
33
481
|
// ' ░ ░ ',
|
|
34
482
|
].join("\n");
|
|
35
483
|
var VARLOCK_BANNER_COLOR = VARLOCK_BANNER.replaceAll(/([▀▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▐▔▕▖▗▘▙▚▛▜▝▞▟]+)/g, (m) => ansis_default.hex("#DD0000")(m)).replaceAll(/([▓░▒]+)/g, (m) => ansis_default.blue(m));
|
|
36
|
-
|
|
37
|
-
|
|
484
|
+
var import_ci_info = __toESM(require_ci_info(), 1);
|
|
485
|
+
var isDockerCached;
|
|
486
|
+
function hasDockerEnv() {
|
|
487
|
+
try {
|
|
488
|
+
fs.statSync("/.dockerenv");
|
|
38
489
|
return true;
|
|
490
|
+
} catch {
|
|
491
|
+
return false;
|
|
39
492
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
493
|
+
}
|
|
494
|
+
__name(hasDockerEnv, "hasDockerEnv");
|
|
495
|
+
function hasDockerCGroup() {
|
|
496
|
+
try {
|
|
497
|
+
return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
498
|
+
} catch {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
__name(hasDockerCGroup, "hasDockerCGroup");
|
|
503
|
+
function isDocker() {
|
|
504
|
+
if (isDockerCached === void 0) {
|
|
505
|
+
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
506
|
+
}
|
|
507
|
+
return isDockerCached;
|
|
508
|
+
}
|
|
509
|
+
__name(isDocker, "isDocker");
|
|
510
|
+
var cachedResult;
|
|
511
|
+
var hasContainerEnv = /* @__PURE__ */ __name(() => {
|
|
512
|
+
try {
|
|
513
|
+
fs.statSync("/run/.containerenv");
|
|
514
|
+
return true;
|
|
515
|
+
} catch {
|
|
516
|
+
return false;
|
|
517
|
+
}
|
|
518
|
+
}, "hasContainerEnv");
|
|
519
|
+
function isInsideContainer() {
|
|
520
|
+
if (cachedResult === void 0) {
|
|
521
|
+
cachedResult = hasContainerEnv() || isDocker();
|
|
522
|
+
}
|
|
523
|
+
return cachedResult;
|
|
524
|
+
}
|
|
525
|
+
__name(isInsideContainer, "isInsideContainer");
|
|
526
|
+
|
|
527
|
+
// ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
|
|
528
|
+
var isWsl = /* @__PURE__ */ __name(() => {
|
|
529
|
+
if (process2.platform !== "linux") {
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
532
|
+
if (os2.release().toLowerCase().includes("microsoft")) {
|
|
533
|
+
if (isInsideContainer()) {
|
|
534
|
+
return false;
|
|
48
535
|
}
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
try {
|
|
539
|
+
return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
540
|
+
} catch {
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
}, "isWsl");
|
|
544
|
+
var is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
545
|
+
|
|
546
|
+
// package.json
|
|
547
|
+
var package_default = {
|
|
548
|
+
version: "0.0.6"};
|
|
549
|
+
|
|
550
|
+
// src/cli/helpers/telemetry.ts
|
|
551
|
+
var debug = Debug("varlock:telemetry");
|
|
552
|
+
var TRUE_ENV_VAR_VALUES = ["true", "1", "t"];
|
|
553
|
+
var varlockConfigDirPath = join(os2.homedir(), ".varlock");
|
|
554
|
+
var varlockConfigFilePath = join(varlockConfigDirPath, "config.json");
|
|
555
|
+
var varlockConfigFileContents;
|
|
556
|
+
function getConfigFileContents() {
|
|
557
|
+
if (varlockConfigFileContents) return varlockConfigFileContents;
|
|
558
|
+
try {
|
|
559
|
+
const configContent = readFileSync(varlockConfigFilePath, "utf-8");
|
|
560
|
+
varlockConfigFileContents = JSON.parse(configContent);
|
|
561
|
+
return varlockConfigFileContents;
|
|
562
|
+
} catch (error) {
|
|
563
|
+
debug("Failed to read varlock config:", error);
|
|
564
|
+
return {};
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
__name(getConfigFileContents, "getConfigFileContents");
|
|
568
|
+
var cachedAnonymousId;
|
|
569
|
+
function getAnonymousId() {
|
|
570
|
+
if (cachedAnonymousId) return cachedAnonymousId;
|
|
571
|
+
const configFileContents = getConfigFileContents();
|
|
572
|
+
if (configFileContents?.anonymousId) {
|
|
573
|
+
cachedAnonymousId = configFileContents.anonymousId;
|
|
574
|
+
return configFileContents.anonymousId;
|
|
575
|
+
}
|
|
576
|
+
const newAnonymousId = `${import_ci_info.isCI ? "ci-" : ""}${crypto.randomUUID()}`;
|
|
577
|
+
if (!existsSync(varlockConfigDirPath)) {
|
|
578
|
+
mkdirSync(varlockConfigDirPath, { recursive: true });
|
|
579
|
+
}
|
|
580
|
+
writeFileSync(
|
|
581
|
+
varlockConfigFilePath,
|
|
582
|
+
JSON.stringify({
|
|
583
|
+
...configFileContents,
|
|
584
|
+
anonymousId: newAnonymousId
|
|
585
|
+
}, null, 2),
|
|
586
|
+
{ flag: "w" }
|
|
587
|
+
);
|
|
588
|
+
cachedAnonymousId = newAnonymousId;
|
|
589
|
+
return newAnonymousId;
|
|
590
|
+
}
|
|
591
|
+
__name(getAnonymousId, "getAnonymousId");
|
|
592
|
+
function checkIsOptedOut() {
|
|
593
|
+
if (process.env.PH_OPT_OUT === "true" || TRUE_ENV_VAR_VALUES.includes((process.env.VARLOCK_TELEMETRY_DISABLED || "").toLowerCase())) {
|
|
594
|
+
debug("telemetry opted out - env var");
|
|
595
|
+
return true;
|
|
596
|
+
}
|
|
597
|
+
const varlockConfigFile = getConfigFileContents();
|
|
598
|
+
if (varlockConfigFile?.analytics_opt_out || varlockConfigFile?.telemetryDisabled) {
|
|
599
|
+
debug("telemetry opted out - config file");
|
|
600
|
+
return true;
|
|
49
601
|
}
|
|
50
602
|
return false;
|
|
51
603
|
}
|
|
52
604
|
__name(checkIsOptedOut, "checkIsOptedOut");
|
|
53
|
-
|
|
605
|
+
function anonymizeValue(payload) {
|
|
606
|
+
if (payload === "") {
|
|
607
|
+
return payload;
|
|
608
|
+
}
|
|
609
|
+
const hash = createHash("sha256");
|
|
610
|
+
hash.update(payload);
|
|
611
|
+
return hash.digest("hex");
|
|
612
|
+
}
|
|
613
|
+
__name(anonymizeValue, "anonymizeValue");
|
|
614
|
+
function getProjectGitRemoteUrl() {
|
|
615
|
+
try {
|
|
616
|
+
let gitDirPath;
|
|
617
|
+
let currentDir = process.cwd();
|
|
618
|
+
while (currentDir && currentDir !== "/") {
|
|
619
|
+
const possibleGitDirPath = join(currentDir, ".git");
|
|
620
|
+
if (existsSync(possibleGitDirPath)) {
|
|
621
|
+
gitDirPath = possibleGitDirPath;
|
|
622
|
+
break;
|
|
623
|
+
}
|
|
624
|
+
currentDir = join(currentDir, "..");
|
|
625
|
+
}
|
|
626
|
+
if (!gitDirPath) return void 0;
|
|
627
|
+
const gitConfigContents = readFileSync(join(gitDirPath, "config"), "utf-8");
|
|
628
|
+
const remoteUpstreamPos = gitConfigContents.indexOf('[remote "upstream"]');
|
|
629
|
+
if (remoteUpstreamPos !== -1) {
|
|
630
|
+
const remoteUpstreamUrl = gitConfigContents.slice(remoteUpstreamPos).match(/url = (.+)/)?.[1];
|
|
631
|
+
return remoteUpstreamUrl;
|
|
632
|
+
}
|
|
633
|
+
const remoteOriginPos = gitConfigContents.indexOf('[remote "origin"]');
|
|
634
|
+
if (remoteOriginPos === -1) return void 0;
|
|
635
|
+
const remoteOriginUrl = gitConfigContents.slice(remoteOriginPos).match(/url = (.+)/)?.[1];
|
|
636
|
+
return remoteOriginUrl;
|
|
637
|
+
} catch (err) {
|
|
638
|
+
return void 0;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
__name(getProjectGitRemoteUrl, "getProjectGitRemoteUrl");
|
|
642
|
+
function getAnonymousProjectId() {
|
|
643
|
+
const gitRemoteUrl = getProjectGitRemoteUrl();
|
|
644
|
+
if (!gitRemoteUrl) return null;
|
|
645
|
+
return anonymizeValue(gitRemoteUrl);
|
|
646
|
+
}
|
|
647
|
+
__name(getAnonymousProjectId, "getAnonymousProjectId");
|
|
648
|
+
var cachedTelemetryMetadata;
|
|
649
|
+
function getTelemetryMeta() {
|
|
650
|
+
if (cachedTelemetryMetadata) return cachedTelemetryMetadata;
|
|
651
|
+
const cpus = os2.cpus() || [];
|
|
652
|
+
let versionIdentifier = package_default.version;
|
|
653
|
+
cachedTelemetryMetadata = {
|
|
654
|
+
anonymous_project_id: getAnonymousProjectId(),
|
|
655
|
+
node_version: process.version.replace(/^v?/, ""),
|
|
656
|
+
varlock_version: versionIdentifier,
|
|
657
|
+
// TODO: pass through version info for specific integrations/plugins?
|
|
658
|
+
system_platform: os2.platform(),
|
|
659
|
+
system_release: os2.release(),
|
|
660
|
+
system_architecture: os2.arch(),
|
|
661
|
+
cpu_count: cpus.length,
|
|
662
|
+
cpu_model: cpus.length ? cpus[0].model : null,
|
|
663
|
+
cpu_speed: cpus.length ? cpus[0].speed : null,
|
|
664
|
+
memory_mb: Math.trunc(os2.totalmem() / 1024 ** 2),
|
|
665
|
+
is_docker: isDocker(),
|
|
666
|
+
is_tty: process.stdout.isTTY,
|
|
667
|
+
is_wsl: is_wsl_default,
|
|
668
|
+
is_ci: import_ci_info.isCI,
|
|
669
|
+
ci_name: import_ci_info.name,
|
|
670
|
+
is_sea: false
|
|
671
|
+
};
|
|
672
|
+
return cachedTelemetryMetadata;
|
|
673
|
+
}
|
|
674
|
+
__name(getTelemetryMeta, "getTelemetryMeta");
|
|
54
675
|
var isOptedOut = checkIsOptedOut();
|
|
55
|
-
|
|
676
|
+
var lastTelemetryReq;
|
|
56
677
|
async function posthogCapture(event, properties) {
|
|
57
|
-
|
|
678
|
+
const telemetryMeta = getTelemetryMeta();
|
|
58
679
|
const payload = {
|
|
59
680
|
api_key: CONFIG.POSTHOG_API_KEY,
|
|
60
681
|
event,
|
|
61
682
|
properties: {
|
|
62
683
|
$process_person_profile: false,
|
|
684
|
+
...telemetryMeta,
|
|
63
685
|
...properties
|
|
64
686
|
},
|
|
65
|
-
distinct_id:
|
|
687
|
+
distinct_id: getAnonymousId()
|
|
66
688
|
};
|
|
67
|
-
|
|
689
|
+
debug(`track${isOptedOut ? " (disabled)" : ""}`, payload);
|
|
690
|
+
if (isOptedOut) return;
|
|
691
|
+
const removeExitHook = asyncExitHook(async () => {
|
|
692
|
+
await lastTelemetryReq;
|
|
693
|
+
}, { wait: 500 });
|
|
694
|
+
lastTelemetryReq = fetch(`${CONFIG.POSTHOG_HOST}/i/v0/e/`, {
|
|
68
695
|
method: "POST",
|
|
69
696
|
body: JSON.stringify(payload),
|
|
70
697
|
headers: {
|
|
71
698
|
"Content-Type": "application/json"
|
|
72
699
|
}
|
|
700
|
+
}).then((res) => {
|
|
701
|
+
if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`);
|
|
702
|
+
return res.text();
|
|
703
|
+
}).then((text) => debug("telemetry response:", text)).catch((error) => {
|
|
704
|
+
debug("telemetry error:", error);
|
|
705
|
+
}).finally(() => {
|
|
706
|
+
removeExitHook();
|
|
73
707
|
});
|
|
74
|
-
if (DEBUG_PH) console.log("res", await res.text());
|
|
75
708
|
}
|
|
76
709
|
__name(posthogCapture, "posthogCapture");
|
|
77
710
|
async function trackCommand(command, properties) {
|
|
@@ -82,113 +715,8 @@ async function trackCommand(command, properties) {
|
|
|
82
715
|
}
|
|
83
716
|
__name(trackCommand, "trackCommand");
|
|
84
717
|
|
|
85
|
-
// package.json
|
|
86
|
-
var package_default = {
|
|
87
|
-
name: "varlock",
|
|
88
|
-
version: "0.0.4",
|
|
89
|
-
description: "",
|
|
90
|
-
main: "index.js",
|
|
91
|
-
type: "module",
|
|
92
|
-
author: "dmno-dev",
|
|
93
|
-
license: "MIT",
|
|
94
|
-
repository: {
|
|
95
|
-
type: "git",
|
|
96
|
-
url: "https://github.com/dmno-dev/varlock.git",
|
|
97
|
-
directory: "packages/varlock"
|
|
98
|
-
},
|
|
99
|
-
scripts: {
|
|
100
|
-
build: "tsup",
|
|
101
|
-
"build:sea": "tsup --config tsup-sea.config.ts",
|
|
102
|
-
dev: "tsup",
|
|
103
|
-
test: "vitest",
|
|
104
|
-
lint: "eslint .",
|
|
105
|
-
"lint:fix": "pnpm run lint --fix"
|
|
106
|
-
},
|
|
107
|
-
keywords: [],
|
|
108
|
-
files: [
|
|
109
|
-
"/bin",
|
|
110
|
-
"/dist"
|
|
111
|
-
],
|
|
112
|
-
bin: {
|
|
113
|
-
varlock: "./bin/cli.js"
|
|
114
|
-
},
|
|
115
|
-
engines: {
|
|
116
|
-
node: ">=22"
|
|
117
|
-
},
|
|
118
|
-
exports: {
|
|
119
|
-
".": {
|
|
120
|
-
"ts-src": "./src/index.ts",
|
|
121
|
-
types: "./dist/index.d.ts",
|
|
122
|
-
default: "./dist/index.js"
|
|
123
|
-
},
|
|
124
|
-
"./env": {
|
|
125
|
-
"ts-src": "./src/runtime/env.ts",
|
|
126
|
-
types: "./dist/runtime/env.d.ts",
|
|
127
|
-
default: "./dist/runtime/env.js"
|
|
128
|
-
},
|
|
129
|
-
"./auto-load": {
|
|
130
|
-
"ts-src": "./src/auto-load.ts",
|
|
131
|
-
types: "./dist/auto-load.d.ts",
|
|
132
|
-
default: "./dist/auto-load.js"
|
|
133
|
-
},
|
|
134
|
-
"./patch-console": {
|
|
135
|
-
"ts-src": "./src/runtime/patch-console.ts",
|
|
136
|
-
types: "./dist/runtime/patch-console.d.ts",
|
|
137
|
-
default: "./dist/runtime/patch-console.js"
|
|
138
|
-
},
|
|
139
|
-
"./patch-response": {
|
|
140
|
-
"ts-src": "./src/runtime/patch-response.ts",
|
|
141
|
-
types: "./dist/runtime/patch-response.d.ts",
|
|
142
|
-
default: "./dist/runtime/patch-response.js"
|
|
143
|
-
},
|
|
144
|
-
"./patch-server-response": {
|
|
145
|
-
"ts-src": "./src/runtime/patch-server-response.ts",
|
|
146
|
-
types: "./dist/runtime/patch-server-response.d.ts",
|
|
147
|
-
default: "./dist/runtime/patch-server-response.js"
|
|
148
|
-
},
|
|
149
|
-
"./config": {
|
|
150
|
-
"ts-src": "./src/config.ts",
|
|
151
|
-
types: "./dist/dotenv-compat.d.ts",
|
|
152
|
-
default: "./dist/dotenv-compat.js"
|
|
153
|
-
},
|
|
154
|
-
"./config.js": {
|
|
155
|
-
"ts-src": "./src/config.ts",
|
|
156
|
-
types: "./dist/dotenv-compat.d.ts",
|
|
157
|
-
default: "./dist/dotenv-compat.js"
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
dependencies: {
|
|
161
|
-
"@env-spec/parser": "workspace:^",
|
|
162
|
-
debug: "catalog:",
|
|
163
|
-
execa: "^9.6.0",
|
|
164
|
-
which: "^5.0.0"
|
|
165
|
-
},
|
|
166
|
-
devDependencies: {
|
|
167
|
-
"@clack/core": "^0.5.0",
|
|
168
|
-
"@clack/prompts": "^0.11.0",
|
|
169
|
-
"@env-spec/env-graph": "workspace:*",
|
|
170
|
-
"@env-spec/utils": "workspace:*",
|
|
171
|
-
"@sindresorhus/is": "catalog:",
|
|
172
|
-
"@types/debug": "catalog:",
|
|
173
|
-
"@types/node": "catalog:",
|
|
174
|
-
"@types/which": "^3.0.4",
|
|
175
|
-
"@yao-pkg/pkg": "^6.5.1",
|
|
176
|
-
ansis: "catalog:",
|
|
177
|
-
"browser-or-node": "^3.0.0",
|
|
178
|
-
gunshi: "^0.26.3",
|
|
179
|
-
"is-unicode-supported": "^2.1.0",
|
|
180
|
-
outdent: "catalog:",
|
|
181
|
-
tsup: "catalog:",
|
|
182
|
-
vitest: "catalog:"
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
|
|
186
718
|
// src/cli/cli-executable.ts
|
|
187
|
-
var
|
|
188
|
-
run: /* @__PURE__ */ __name(() => {
|
|
189
|
-
console.log("Use one of the sub-commands...");
|
|
190
|
-
}, "run")
|
|
191
|
-
};
|
|
719
|
+
var versionId = package_default.version;
|
|
192
720
|
function buildLazyCommand(commandSpec9, loadCommandFn) {
|
|
193
721
|
const commandName = commandSpec9.name;
|
|
194
722
|
return {
|
|
@@ -202,50 +730,66 @@ function buildLazyCommand(commandSpec9, loadCommandFn) {
|
|
|
202
730
|
}
|
|
203
731
|
__name(buildLazyCommand, "buildLazyCommand");
|
|
204
732
|
var subCommands = /* @__PURE__ */ new Map();
|
|
205
|
-
subCommands.set("init", buildLazyCommand(commandSpec, async () => await import('../init.command-
|
|
206
|
-
subCommands.set("load", buildLazyCommand(commandSpec$1, async () => await import('../load.command-
|
|
207
|
-
subCommands.set("run", buildLazyCommand(commandSpec$2, async () => await import('../run.command-
|
|
208
|
-
subCommands.set("encrypt", buildLazyCommand(commandSpec$3, async () => await import('../encrypt.command-
|
|
209
|
-
subCommands.set("doctor", buildLazyCommand(commandSpec$4, async () => await import('../doctor.command-
|
|
210
|
-
subCommands.set("help", buildLazyCommand(commandSpec$5, async () => await import('../help.command-
|
|
211
|
-
subCommands.set("
|
|
212
|
-
subCommands.set("login", buildLazyCommand(commandSpec$7, async () => await import('../login.command-
|
|
733
|
+
subCommands.set("init", buildLazyCommand(commandSpec, async () => await import('../init.command-3DHC5DNC.js')));
|
|
734
|
+
subCommands.set("load", buildLazyCommand(commandSpec$1, async () => await import('../load.command-CTOV5PYR.js')));
|
|
735
|
+
subCommands.set("run", buildLazyCommand(commandSpec$2, async () => await import('../run.command-5276KIMX.js')));
|
|
736
|
+
subCommands.set("encrypt", buildLazyCommand(commandSpec$3, async () => await import('../encrypt.command-AGHQ4KTI.js')));
|
|
737
|
+
subCommands.set("doctor", buildLazyCommand(commandSpec$4, async () => await import('../doctor.command-SBG4H7Z4.js')));
|
|
738
|
+
subCommands.set("help", buildLazyCommand(commandSpec$5, async () => await import('../help.command-B7VWA53B.js')));
|
|
739
|
+
subCommands.set("telemetry", buildLazyCommand(commandSpec$6, async () => await import('../telemetry.command-UHJTZULL.js')));
|
|
740
|
+
subCommands.set("login", buildLazyCommand(commandSpec$7, async () => await import('../login.command-UZBZIPP3.js')));
|
|
213
741
|
(/* @__PURE__ */ __name(async function go() {
|
|
214
742
|
try {
|
|
215
743
|
let args = process.argv.slice(2);
|
|
216
744
|
if (args[0] === "help") args = ["--help"];
|
|
217
745
|
if (false) ;
|
|
218
|
-
|
|
746
|
+
if (args[0] === "--version") {
|
|
747
|
+
await trackCommand("version");
|
|
748
|
+
}
|
|
749
|
+
await cli(args, {
|
|
750
|
+
// main command - triggered if you just run `varlock` with no args
|
|
751
|
+
run: /* @__PURE__ */ __name(() => {
|
|
752
|
+
console.log("Please run one of the sub-commands. Run `varlock --help` for more info.");
|
|
753
|
+
}, "run")
|
|
754
|
+
}, {
|
|
219
755
|
name: "varlock",
|
|
220
756
|
description: "Encrypt and protect your env vars",
|
|
221
|
-
version:
|
|
757
|
+
version: versionId,
|
|
222
758
|
subCommands,
|
|
223
759
|
renderHeader: /* @__PURE__ */ __name(async (ctx) => {
|
|
224
760
|
if (ctx.name) return "";
|
|
225
761
|
return VARLOCK_BANNER_COLOR;
|
|
226
762
|
}, "renderHeader")
|
|
227
763
|
});
|
|
228
|
-
|
|
764
|
+
gracefulExit();
|
|
229
765
|
} catch (error) {
|
|
230
|
-
if (error instanceof
|
|
766
|
+
if (error instanceof Error && error.message.startsWith("Command not found: ")) {
|
|
767
|
+
const badCommandName = error.message.split(": ")[1];
|
|
768
|
+
const badCommandErr = new CliExitError(`Invalid subcommand: ${badCommandName}`, {
|
|
769
|
+
suggestion: `Run \`${fmt.command("varlock --help", { jsPackageManager: true })}\` for more info.`
|
|
770
|
+
});
|
|
771
|
+
console.error(badCommandErr.getFormattedOutput());
|
|
772
|
+
gracefulExit(1);
|
|
773
|
+
} else if (error instanceof CliExitError || error instanceof InvalidEnvError) {
|
|
231
774
|
console.error(error.getFormattedOutput());
|
|
232
775
|
} else if (error instanceof EnvSourceParseError) {
|
|
233
|
-
console.
|
|
234
|
-
console.
|
|
776
|
+
console.error(`\u{1F6A8} Error encountered while loading ${error.location.path}`);
|
|
777
|
+
console.error(error.message);
|
|
235
778
|
const errLoc = error.location;
|
|
236
779
|
const errPreview = [
|
|
237
780
|
errLoc.lineStr,
|
|
238
781
|
`${ansis_default.gray("-".repeat(errLoc.colNumber - 1))}${ansis_default.red("^")}`
|
|
239
782
|
].join("\n");
|
|
240
|
-
console.
|
|
241
|
-
console.
|
|
242
|
-
console.
|
|
243
|
-
|
|
783
|
+
console.error("Error parsing .env file");
|
|
784
|
+
console.error(fmt.filePath(`${errLoc.path}:${errLoc.lineNumber}:${errLoc.colNumber}`));
|
|
785
|
+
console.error(errPreview);
|
|
786
|
+
gracefulExit(1);
|
|
244
787
|
} else {
|
|
245
788
|
throw error;
|
|
246
789
|
}
|
|
247
|
-
|
|
790
|
+
gracefulExit(1);
|
|
248
791
|
}
|
|
249
792
|
}, "go"))();
|
|
793
|
+
//! this ouput is used by homebrew formula to check installed version is correct
|
|
250
794
|
//# sourceMappingURL=cli-executable.js.map
|
|
251
795
|
//# sourceMappingURL=cli-executable.js.map
|