eas-cli 12.2.0 → 12.4.0

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.
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatWorkerDeploymentJson = exports.formatWorkerDeploymentTable = exports.getDashboardUrl = exports.getDeploymentUrlFromFullName = exports.EXPO_BASE_DOMAIN = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
7
+ exports.EXPO_BASE_DOMAIN = process.env.EXPO_STAGING ? 'staging.expo' : 'expo';
8
+ function getDeploymentUrlFromFullName(deploymentFullName) {
9
+ return `https://${deploymentFullName}.${exports.EXPO_BASE_DOMAIN}.app`;
10
+ }
11
+ exports.getDeploymentUrlFromFullName = getDeploymentUrlFromFullName;
12
+ function getDashboardUrl(projectId) {
13
+ return `https://${exports.EXPO_BASE_DOMAIN}.dev/projects/${projectId}/hosting/deployments`;
14
+ }
15
+ exports.getDashboardUrl = getDashboardUrl;
16
+ function formatWorkerDeploymentTable(data) {
17
+ const fields = [
18
+ { label: 'Dashboard', value: getDashboardUrl(data.projectId) },
19
+ { label: 'Deployment URL', value: data.deployment.url },
20
+ ];
21
+ if (data.aliases?.length) {
22
+ fields.push({ label: 'Alias URL', value: data.aliases[0].url });
23
+ }
24
+ if (data.production) {
25
+ fields.push({ label: 'Production URL', value: data.production.url });
26
+ }
27
+ const lastUrlField = fields[fields.length - 1];
28
+ lastUrlField.value = chalk_1.default.cyan(lastUrlField.value);
29
+ return (0, formatFields_1.default)(fields);
30
+ }
31
+ exports.formatWorkerDeploymentTable = formatWorkerDeploymentTable;
32
+ function formatWorkerDeploymentJson(data) {
33
+ return {
34
+ dashboardUrl: getDashboardUrl(data.projectId),
35
+ deployment: {
36
+ identifier: data.deployment.deploymentIdentifier,
37
+ url: data.deployment.url,
38
+ aliases: !data.aliases?.length
39
+ ? undefined
40
+ : data.aliases.map(alias => ({
41
+ id: alias.id,
42
+ name: alias.aliasName,
43
+ url: alias.url,
44
+ })),
45
+ production: !data.production
46
+ ? undefined
47
+ : {
48
+ id: data.production.id,
49
+ url: data.production.url,
50
+ },
51
+ },
52
+ };
53
+ }
54
+ exports.formatWorkerDeploymentJson = formatWorkerDeploymentJson;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "12.2.0",
2
+ "version": "12.4.0",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -3372,10 +3372,77 @@
3372
3372
  "loggedIn": {}
3373
3373
  }
3374
3374
  },
3375
+ "worker:alias": {
3376
+ "id": "worker:alias",
3377
+ "description": "Assign deployment aliases",
3378
+ "strict": true,
3379
+ "pluginName": "eas-cli",
3380
+ "pluginAlias": "eas-cli",
3381
+ "pluginType": "core",
3382
+ "hidden": true,
3383
+ "state": "beta",
3384
+ "aliases": [
3385
+ "deploy:alias",
3386
+ "deploy:promote"
3387
+ ],
3388
+ "flags": {
3389
+ "prod": {
3390
+ "name": "prod",
3391
+ "type": "boolean",
3392
+ "description": "Promote an existing deployment to production",
3393
+ "allowNo": false,
3394
+ "aliases": [
3395
+ "production"
3396
+ ]
3397
+ },
3398
+ "alias": {
3399
+ "name": "alias",
3400
+ "type": "option",
3401
+ "description": "Custom alias to assign to the existing deployment",
3402
+ "required": false,
3403
+ "helpValue": "name",
3404
+ "multiple": false
3405
+ },
3406
+ "id": {
3407
+ "name": "id",
3408
+ "type": "option",
3409
+ "description": "Unique identifier of an existing deployment",
3410
+ "required": false,
3411
+ "helpValue": "xyz123",
3412
+ "multiple": false
3413
+ },
3414
+ "json": {
3415
+ "name": "json",
3416
+ "type": "boolean",
3417
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr.",
3418
+ "allowNo": false,
3419
+ "dependsOn": [
3420
+ "non-interactive"
3421
+ ]
3422
+ },
3423
+ "non-interactive": {
3424
+ "name": "non-interactive",
3425
+ "type": "boolean",
3426
+ "description": "Run the command in non-interactive mode.",
3427
+ "allowNo": false
3428
+ }
3429
+ },
3430
+ "args": {},
3431
+ "contextDefinition": {
3432
+ "getDynamicPublicProjectConfigAsync": {},
3433
+ "getDynamicPrivateProjectConfigAsync": {},
3434
+ "projectDir": {},
3435
+ "loggedIn": {}
3436
+ }
3437
+ },
3375
3438
  "worker:deploy": {
3376
3439
  "id": "worker:deploy",
3377
- "description": "deploy an Expo web build",
3440
+ "description": "Deploy your Expo web build",
3378
3441
  "strict": true,
3442
+ "usage": [
3443
+ "deploy [options]",
3444
+ "deploy --prod"
3445
+ ],
3379
3446
  "pluginName": "eas-cli",
3380
3447
  "pluginAlias": "eas-cli",
3381
3448
  "pluginType": "core",
@@ -3384,7 +3451,66 @@
3384
3451
  "aliases": [
3385
3452
  "deploy"
3386
3453
  ],
3387
- "flags": {},
3454
+ "flags": {
3455
+ "prod": {
3456
+ "name": "prod",
3457
+ "type": "boolean",
3458
+ "description": "Create a new production deployment",
3459
+ "allowNo": false,
3460
+ "aliases": [
3461
+ "production"
3462
+ ]
3463
+ },
3464
+ "alias": {
3465
+ "name": "alias",
3466
+ "type": "option",
3467
+ "description": "Custom alias to assign to the new deployment",
3468
+ "helpValue": "name",
3469
+ "multiple": false
3470
+ },
3471
+ "id": {
3472
+ "name": "id",
3473
+ "type": "option",
3474
+ "description": "Custom unique identifier for the new deployment",
3475
+ "helpValue": "xyz123",
3476
+ "multiple": false
3477
+ },
3478
+ "export-dir": {
3479
+ "name": "export-dir",
3480
+ "type": "option",
3481
+ "description": "Directory where the Expo project was exported",
3482
+ "helpValue": "dir",
3483
+ "multiple": false,
3484
+ "default": "dist"
3485
+ },
3486
+ "json": {
3487
+ "name": "json",
3488
+ "type": "boolean",
3489
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr.",
3490
+ "allowNo": false,
3491
+ "dependsOn": [
3492
+ "non-interactive"
3493
+ ]
3494
+ },
3495
+ "non-interactive": {
3496
+ "name": "non-interactive",
3497
+ "type": "boolean",
3498
+ "description": "Run the command in non-interactive mode.",
3499
+ "allowNo": false
3500
+ },
3501
+ "environment": {
3502
+ "name": "environment",
3503
+ "type": "option",
3504
+ "description": "Environment variable's environment",
3505
+ "helpValue": "(development|preview|production)",
3506
+ "multiple": false,
3507
+ "options": [
3508
+ "development",
3509
+ "preview",
3510
+ "production"
3511
+ ]
3512
+ }
3513
+ },
3388
3514
  "args": {},
3389
3515
  "contextDefinition": {
3390
3516
  "getDynamicPublicProjectConfigAsync": {},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "12.2.0",
4
+ "version": "12.4.0",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -15,6 +15,7 @@
15
15
  "@expo/config-types": "50.0.0",
16
16
  "@expo/eas-build-job": "1.0.133",
17
17
  "@expo/eas-json": "12.0.0",
18
+ "@expo/env": "^0.3.0",
18
19
  "@expo/json-file": "8.2.37",
19
20
  "@expo/logger": "1.0.117",
20
21
  "@expo/multipart-body-parser": "1.1.0",
@@ -113,7 +114,7 @@
113
114
  "@types/wrap-ansi": "3.0.0",
114
115
  "axios": "0.28.1",
115
116
  "eslint-plugin-graphql": "4.0.0",
116
- "express": "4.19.2",
117
+ "express": "4.20.0",
117
118
  "memfs": "3.4.13",
118
119
  "mockdate": "3.0.5",
119
120
  "nock": "13.4.0",
@@ -226,5 +227,5 @@
226
227
  "node": "20.11.0",
227
228
  "yarn": "1.22.21"
228
229
  },
229
- "gitHead": "a2219beaba502c258c86a07b5f18d17713cb0165"
230
+ "gitHead": "87b0cf41a8b14373d452e1b8adeed3daa1b5ae2d"
230
231
  }