eoas 2.3.17-alpha → 2.3.18

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.
@@ -12,6 +12,7 @@ export default class Publish extends Command {
12
12
  outputDir: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
13
  packageRunner: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
14
  message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ dumpSourcemap: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
16
  };
16
17
  private sanitizeFlags;
17
18
  run(): Promise<void>;
@@ -65,6 +65,10 @@ class Publish extends core_1.Command {
65
65
  description: 'A short message describing the update. Defaults to the latest git commit message.',
66
66
  required: false,
67
67
  }),
68
+ dumpSourcemap: core_1.Flags.boolean({
69
+ description: 'Emit Hermes source maps alongside the bundle so the published artifact can be symbolicated by tools like Sentry or PostHog.',
70
+ default: false,
71
+ }),
68
72
  };
69
73
  sanitizeFlags(flags) {
70
74
  return {
@@ -76,6 +80,7 @@ class Publish extends core_1.Command {
76
80
  packageRunner: (0, packageRunner_1.resolvePackageRunner)(flags.packageRunner, process.cwd()),
77
81
  providedDeprecatedChannel: flags.channel,
78
82
  message: flags.message,
83
+ dumpSourcemap: flags.dumpSourcemap,
79
84
  };
80
85
  }
81
86
  async run() {
@@ -85,7 +90,7 @@ class Publish extends core_1.Command {
85
90
  process.exit(1);
86
91
  }
87
92
  const { flags } = await this.parse(Publish);
88
- const { platform, nonInteractive, branch, outputDir, packageRunner, providedDeprecatedChannel, disableRepositoryCheck, message, } = this.sanitizeFlags(flags);
93
+ const { platform, nonInteractive, branch, outputDir, packageRunner, providedDeprecatedChannel, disableRepositoryCheck, message, dumpSourcemap, } = this.sanitizeFlags(flags);
89
94
  if (!branch) {
90
95
  log_1.default.error('Branch name is required');
91
96
  process.exit(1);
@@ -187,7 +192,8 @@ class Publish extends core_1.Command {
187
192
  const exportSpinner = (0, ora_1.ora)('📦 Exporting project files...').start();
188
193
  try {
189
194
  const specifiedPlatform = platform === expoConfig_1.RequestedPlatform.All ? [] : ['--platform', platform];
190
- const { stdout } = await (0, spawn_async_1.default)(packageRunner, ['expo', 'export', '--output-dir', outputDir, ...specifiedPlatform], {
195
+ const sourcemapArgs = dumpSourcemap ? ['--dump-sourcemap'] : [];
196
+ const { stdout } = await (0, spawn_async_1.default)(packageRunner, ['expo', 'export', '--output-dir', outputDir, ...sourcemapArgs, ...specifiedPlatform], {
191
197
  cwd: projectDir,
192
198
  env: {
193
199
  ...process.env,
@@ -21,7 +21,7 @@ class Publish extends core_1.Command {
21
21
  }),
22
22
  platform: core_1.Flags.string({
23
23
  type: 'option',
24
- options: ['ios', 'android'],
24
+ options: ['ios', 'android', 'all'],
25
25
  default: 'all',
26
26
  required: true,
27
27
  }),
@@ -108,8 +108,12 @@ class Publish extends core_1.Command {
108
108
  process.exit(1);
109
109
  }
110
110
  const updates = (await updatesResponse.json()).filter(u => {
111
- return u.updateUUID !== 'Rollback to embedded' && u.platform === platform;
111
+ return (u.updateUUID !== 'Rollback to embedded' && (platform === 'all' || u.platform === platform));
112
112
  });
113
+ if (updates.length === 0) {
114
+ log_1.default.error(`No republishable updates found for runtime version ${selectedRuntimeVersion.runtimeVersion} on platform ${platform}.`);
115
+ process.exit(1);
116
+ }
113
117
  const selectedUpdated = await (0, prompts_1.promptAsync)({
114
118
  type: 'select',
115
119
  name: 'update',
@@ -122,7 +126,7 @@ class Publish extends core_1.Command {
122
126
  });
123
127
  log_1.default.log(`Re-publishing update: ${selectedUpdated.update.updateUUID}`);
124
128
  const republishUrl = new URL(`${baseUrl}/republish/${branch}`);
125
- republishUrl.searchParams.set('platform', platform);
129
+ republishUrl.searchParams.set('platform', selectedUpdated.update.platform);
126
130
  republishUrl.searchParams.set('runtimeVersion', selectedRuntimeVersion.runtimeVersion);
127
131
  republishUrl.searchParams.set('updateId', selectedUpdated.update.updateId);
128
132
  republishUrl.searchParams.set('commitHash', selectedUpdated.update.commitHash);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoas",
3
- "version": "2.3.17-alpha",
3
+ "version": "2.3.18",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.json",