@prisma/cli-engine 0.1.0 → 0.1.1
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/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as exitWithChildStatus, S as resolveGating, T as positional, _ as noSessionForWorkspaceError, b as userConfigPath, c as loadConfig, d as WORKSPACE_ID_ENV_VAR, f as authServiceError, g as emptyServiceTokenError, h as credentialsRequiredError, i as buildEngine, l as PRISMA_CONFIG_VERSION, m as credentialWorkspaceMismatchError, n as claimedIdentity, o as defineConfig, p as credentialRejectedError, r as credentialWorkspaceId, s as definePrismaConfig, t as claimedExpiresAt, u as SERVICE_TOKEN_ENV_VAR, v as PRESENTED, w as flag, x as writeUserConfig, y as readUserConfig } from "./token-claims-
|
|
1
|
+
import { C as exitWithChildStatus, S as resolveGating, T as positional, _ as noSessionForWorkspaceError, b as userConfigPath, c as loadConfig, d as WORKSPACE_ID_ENV_VAR, f as authServiceError, g as emptyServiceTokenError, h as credentialsRequiredError, i as buildEngine, l as PRISMA_CONFIG_VERSION, m as credentialWorkspaceMismatchError, n as claimedIdentity, o as defineConfig, p as credentialRejectedError, r as credentialWorkspaceId, s as definePrismaConfig, t as claimedExpiresAt, u as SERVICE_TOKEN_ENV_VAR, v as PRESENTED, w as flag, x as writeUserConfig, y as readUserConfig } from "./token-claims-B-rQgBjv.js";
|
|
2
2
|
import { i as ok, r as notOk, t as CliStructuredError } from "./protocol-D1CRNkhv.js";
|
|
3
3
|
//#region src/cli.ts
|
|
4
4
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as noSessionForWorkspaceError, h as credentialsRequiredError, i as buildEngine, m as credentialWorkspaceMismatchError, n as claimedIdentity, r as credentialWorkspaceId, t as claimedExpiresAt } from "./token-claims-
|
|
1
|
+
import { _ as noSessionForWorkspaceError, h as credentialsRequiredError, i as buildEngine, m as credentialWorkspaceMismatchError, n as claimedIdentity, r as credentialWorkspaceId, t as claimedExpiresAt } from "./token-claims-B-rQgBjv.js";
|
|
2
2
|
import { Buffer } from "node:buffer";
|
|
3
3
|
//#region src/in-memory-credential-manager.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { a as okVoid, r as notOk, t as CliStructuredError } from "./protocol-D1CRNkhv.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { FlagNotFoundError, buildApplication, buildCommand, buildRouteMap, run, text_en } from "@stricli/core";
|
|
4
|
-
import vendors from "ci-info/vendors.json" with { type: "json" };
|
|
5
4
|
import { randomUUID } from "node:crypto";
|
|
6
5
|
import { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
|
|
7
6
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -171,14 +170,337 @@ function isChildStatusSettlement(value) {
|
|
|
171
170
|
//#endregion
|
|
172
171
|
//#region src/ci.ts
|
|
173
172
|
/**
|
|
174
|
-
* ci-info's
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
173
|
+
* ci-info's provider table. Its `isCI` export is unusable — it reads
|
|
174
|
+
* the real `process.env` at import; the engine reads only host-injected
|
|
175
|
+
* env. The table is inlined into the build (tsdown `noExternal`): the
|
|
176
|
+
* file is CJS-owned by ci-info, and loading it as ESM at runtime breaks
|
|
177
|
+
* hosts that also require ci-info (Bun's dual registry; composer#234).
|
|
178
|
+
* Pinned by tests/no-esm-json-import-in-dist.test.ts.
|
|
180
179
|
*/
|
|
181
|
-
const VENDORS =
|
|
180
|
+
const VENDORS = [
|
|
181
|
+
{
|
|
182
|
+
"name": "Agola CI",
|
|
183
|
+
"constant": "AGOLA",
|
|
184
|
+
"env": "AGOLA_GIT_REF",
|
|
185
|
+
"pr": "AGOLA_PULL_REQUEST_ID"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "Alpic",
|
|
189
|
+
"constant": "ALPIC",
|
|
190
|
+
"env": "ALPIC_HOST"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "Appcircle",
|
|
194
|
+
"constant": "APPCIRCLE",
|
|
195
|
+
"env": "AC_APPCIRCLE",
|
|
196
|
+
"pr": {
|
|
197
|
+
"env": "AC_GIT_PR",
|
|
198
|
+
"ne": "false"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "AppVeyor",
|
|
203
|
+
"constant": "APPVEYOR",
|
|
204
|
+
"env": "APPVEYOR",
|
|
205
|
+
"pr": "APPVEYOR_PULL_REQUEST_NUMBER"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "AWS CodeBuild",
|
|
209
|
+
"constant": "CODEBUILD",
|
|
210
|
+
"env": "CODEBUILD_BUILD_ARN",
|
|
211
|
+
"pr": {
|
|
212
|
+
"env": "CODEBUILD_WEBHOOK_EVENT",
|
|
213
|
+
"any": [
|
|
214
|
+
"PULL_REQUEST_CREATED",
|
|
215
|
+
"PULL_REQUEST_UPDATED",
|
|
216
|
+
"PULL_REQUEST_REOPENED"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "Azure Pipelines",
|
|
222
|
+
"constant": "AZURE_PIPELINES",
|
|
223
|
+
"env": "TF_BUILD",
|
|
224
|
+
"pr": { "BUILD_REASON": "PullRequest" }
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "Bamboo",
|
|
228
|
+
"constant": "BAMBOO",
|
|
229
|
+
"env": "bamboo_planKey"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "Bitbucket Pipelines",
|
|
233
|
+
"constant": "BITBUCKET",
|
|
234
|
+
"env": "BITBUCKET_COMMIT",
|
|
235
|
+
"pr": "BITBUCKET_PR_ID"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "Bitrise",
|
|
239
|
+
"constant": "BITRISE",
|
|
240
|
+
"env": "BITRISE_IO",
|
|
241
|
+
"pr": "BITRISE_PULL_REQUEST"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "Buddy",
|
|
245
|
+
"constant": "BUDDY",
|
|
246
|
+
"env": "BUDDY_WORKSPACE_ID",
|
|
247
|
+
"pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "Buildkite",
|
|
251
|
+
"constant": "BUILDKITE",
|
|
252
|
+
"env": "BUILDKITE",
|
|
253
|
+
"pr": {
|
|
254
|
+
"env": "BUILDKITE_PULL_REQUEST",
|
|
255
|
+
"ne": "false"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "CircleCI",
|
|
260
|
+
"constant": "CIRCLE",
|
|
261
|
+
"env": "CIRCLECI",
|
|
262
|
+
"pr": "CIRCLE_PULL_REQUEST"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "Cirrus CI",
|
|
266
|
+
"constant": "CIRRUS",
|
|
267
|
+
"env": "CIRRUS_CI",
|
|
268
|
+
"pr": "CIRRUS_PR"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "Cloudflare Pages",
|
|
272
|
+
"constant": "CLOUDFLARE_PAGES",
|
|
273
|
+
"env": "CF_PAGES"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "Cloudflare Workers",
|
|
277
|
+
"constant": "CLOUDFLARE_WORKERS",
|
|
278
|
+
"env": "WORKERS_CI"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "Codefresh",
|
|
282
|
+
"constant": "CODEFRESH",
|
|
283
|
+
"env": "CF_BUILD_ID",
|
|
284
|
+
"pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] }
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "Codemagic",
|
|
288
|
+
"constant": "CODEMAGIC",
|
|
289
|
+
"env": "CM_BUILD_ID",
|
|
290
|
+
"pr": "CM_PULL_REQUEST"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "Codeship",
|
|
294
|
+
"constant": "CODESHIP",
|
|
295
|
+
"env": { "CI_NAME": "codeship" }
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "Drone",
|
|
299
|
+
"constant": "DRONE",
|
|
300
|
+
"env": "DRONE",
|
|
301
|
+
"pr": { "DRONE_BUILD_EVENT": "pull_request" }
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "dsari",
|
|
305
|
+
"constant": "DSARI",
|
|
306
|
+
"env": "DSARI"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "Earthly",
|
|
310
|
+
"constant": "EARTHLY",
|
|
311
|
+
"env": "EARTHLY_CI"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "Expo Application Services",
|
|
315
|
+
"constant": "EAS",
|
|
316
|
+
"env": "EAS_BUILD"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "Gerrit",
|
|
320
|
+
"constant": "GERRIT",
|
|
321
|
+
"env": "GERRIT_PROJECT"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "Gitea Actions",
|
|
325
|
+
"constant": "GITEA_ACTIONS",
|
|
326
|
+
"env": "GITEA_ACTIONS"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"name": "GitHub Actions",
|
|
330
|
+
"constant": "GITHUB_ACTIONS",
|
|
331
|
+
"env": "GITHUB_ACTIONS",
|
|
332
|
+
"pr": { "GITHUB_EVENT_NAME": "pull_request" }
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "GitLab CI",
|
|
336
|
+
"constant": "GITLAB",
|
|
337
|
+
"env": "GITLAB_CI",
|
|
338
|
+
"pr": "CI_MERGE_REQUEST_ID"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "GoCD",
|
|
342
|
+
"constant": "GOCD",
|
|
343
|
+
"env": "GO_PIPELINE_LABEL"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "Google Cloud Build",
|
|
347
|
+
"constant": "GOOGLE_CLOUD_BUILD",
|
|
348
|
+
"env": "BUILDER_OUTPUT"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "Harness CI",
|
|
352
|
+
"constant": "HARNESS",
|
|
353
|
+
"env": "HARNESS_BUILD_ID"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "Heroku",
|
|
357
|
+
"constant": "HEROKU",
|
|
358
|
+
"env": {
|
|
359
|
+
"env": "NODE",
|
|
360
|
+
"includes": "/app/.heroku/node/bin/node"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "Hudson",
|
|
365
|
+
"constant": "HUDSON",
|
|
366
|
+
"env": "HUDSON_URL"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "Jenkins",
|
|
370
|
+
"constant": "JENKINS",
|
|
371
|
+
"env": ["JENKINS_URL", "BUILD_ID"],
|
|
372
|
+
"pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "LayerCI",
|
|
376
|
+
"constant": "LAYERCI",
|
|
377
|
+
"env": "LAYERCI",
|
|
378
|
+
"pr": "LAYERCI_PULL_REQUEST"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"name": "Magnum CI",
|
|
382
|
+
"constant": "MAGNUM",
|
|
383
|
+
"env": "MAGNUM"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "Netlify CI",
|
|
387
|
+
"constant": "NETLIFY",
|
|
388
|
+
"env": "NETLIFY",
|
|
389
|
+
"pr": {
|
|
390
|
+
"env": "PULL_REQUEST",
|
|
391
|
+
"ne": "false"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"name": "Nevercode",
|
|
396
|
+
"constant": "NEVERCODE",
|
|
397
|
+
"env": "NEVERCODE",
|
|
398
|
+
"pr": {
|
|
399
|
+
"env": "NEVERCODE_PULL_REQUEST",
|
|
400
|
+
"ne": "false"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"name": "Prow",
|
|
405
|
+
"constant": "PROW",
|
|
406
|
+
"env": "PROW_JOB_ID"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"name": "ReleaseHub",
|
|
410
|
+
"constant": "RELEASEHUB",
|
|
411
|
+
"env": "RELEASE_BUILD_ID"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "Render",
|
|
415
|
+
"constant": "RENDER",
|
|
416
|
+
"env": "RENDER",
|
|
417
|
+
"pr": { "IS_PULL_REQUEST": "true" }
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "Sail CI",
|
|
421
|
+
"constant": "SAIL",
|
|
422
|
+
"env": "SAILCI",
|
|
423
|
+
"pr": "SAIL_PULL_REQUEST_NUMBER"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "Screwdriver",
|
|
427
|
+
"constant": "SCREWDRIVER",
|
|
428
|
+
"env": "SCREWDRIVER",
|
|
429
|
+
"pr": {
|
|
430
|
+
"env": "SD_PULL_REQUEST",
|
|
431
|
+
"ne": "false"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "Semaphore",
|
|
436
|
+
"constant": "SEMAPHORE",
|
|
437
|
+
"env": "SEMAPHORE",
|
|
438
|
+
"pr": "PULL_REQUEST_NUMBER"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "Sourcehut",
|
|
442
|
+
"constant": "SOURCEHUT",
|
|
443
|
+
"env": { "CI_NAME": "sourcehut" }
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "Strider CD",
|
|
447
|
+
"constant": "STRIDER",
|
|
448
|
+
"env": "STRIDER"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "TaskCluster",
|
|
452
|
+
"constant": "TASKCLUSTER",
|
|
453
|
+
"env": ["TASK_ID", "RUN_ID"]
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "TeamCity",
|
|
457
|
+
"constant": "TEAMCITY",
|
|
458
|
+
"env": "TEAMCITY_VERSION"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"name": "Travis CI",
|
|
462
|
+
"constant": "TRAVIS",
|
|
463
|
+
"env": "TRAVIS",
|
|
464
|
+
"pr": {
|
|
465
|
+
"env": "TRAVIS_PULL_REQUEST",
|
|
466
|
+
"ne": "false"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "Vela",
|
|
471
|
+
"constant": "VELA",
|
|
472
|
+
"env": "VELA",
|
|
473
|
+
"pr": { "VELA_PULL_REQUEST": "1" }
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "Vercel",
|
|
477
|
+
"constant": "VERCEL",
|
|
478
|
+
"env": { "any": ["NOW_BUILDER", "VERCEL"] },
|
|
479
|
+
"pr": "VERCEL_GIT_PULL_REQUEST_ID"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "Visual Studio App Center",
|
|
483
|
+
"constant": "APPCENTER",
|
|
484
|
+
"env": "APPCENTER_BUILD_ID"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "Woodpecker",
|
|
488
|
+
"constant": "WOODPECKER",
|
|
489
|
+
"env": { "CI": "woodpecker" },
|
|
490
|
+
"pr": { "CI_BUILD_EVENT": "pull_request" }
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "Xcode Cloud",
|
|
494
|
+
"constant": "XCODE_CLOUD",
|
|
495
|
+
"env": "CI_XCODE_PROJECT",
|
|
496
|
+
"pr": "CI_PULL_REQUEST_NUMBER"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "Xcode Server",
|
|
500
|
+
"constant": "XCODE_SERVER",
|
|
501
|
+
"env": "XCS"
|
|
502
|
+
}
|
|
503
|
+
];
|
|
182
504
|
/**
|
|
183
505
|
* The variables ci-info checks outside the vendor table, catching CI
|
|
184
506
|
* systems that set a conventional variable but have no table entry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "The execution engine of the unified Prisma CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"@prisma/management-api-sdk": "1.55.0",
|
|
45
45
|
"@stricli/core": "1.3.0",
|
|
46
46
|
"c12": "3.3.4",
|
|
47
|
-
"ci-info": "^4.3.1",
|
|
48
47
|
"colorette": "^2.0.20",
|
|
49
48
|
"package-manager-detector": "1.8.0",
|
|
50
49
|
"string-width": "^8.2.1"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
|
-
"@repo/cli-conformance": "8.0.0-rc.2",
|
|
54
|
-
"@repo/tsconfig": "8.0.0-rc.2",
|
|
52
|
+
"@repo/cli-conformance": "8.0.0-rc.2-dev.49",
|
|
53
|
+
"@repo/tsconfig": "8.0.0-rc.2-dev.49",
|
|
55
54
|
"@types/node": "^22.19.19",
|
|
55
|
+
"ci-info": "^4.3.1",
|
|
56
56
|
"tsdown": "^0.21.10",
|
|
57
57
|
"typescript": "^6.0.3",
|
|
58
58
|
"vitest": "^4.1.8"
|