@travetto/pack 8.0.0-alpha.6 → 8.0.0-alpha.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/pack",
3
- "version": "8.0.0-alpha.6",
3
+ "version": "8.0.0-alpha.8",
4
4
  "type": "module",
5
5
  "description": "Code packing utilities",
6
6
  "keywords": [
@@ -30,12 +30,12 @@
30
30
  "@rollup/plugin-json": "^6.1.0",
31
31
  "@rollup/plugin-node-resolve": "^16.0.3",
32
32
  "@rollup/plugin-terser": "^1.0.0",
33
- "@travetto/runtime": "^8.0.0-alpha.4",
34
- "@travetto/terminal": "^8.0.0-alpha.4",
33
+ "@travetto/runtime": "^8.0.0-alpha.5",
34
+ "@travetto/terminal": "^8.0.0-alpha.5",
35
35
  "rollup": "^4.59.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@travetto/cli": "^8.0.0-alpha.7"
38
+ "@travetto/cli": "^8.0.0-alpha.9"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@travetto/cli": {
@@ -5,7 +5,7 @@ import { type CliCommandShape, CliFlag, CliModuleFlag, CliParseUtil, cliTpl } fr
5
5
  import { TimeUtil, Runtime, RuntimeIndex } from '@travetto/runtime';
6
6
  import { Terminal } from '@travetto/terminal';
7
7
  import { Ignore, Method, Required, Schema } from '@travetto/schema';
8
- import { PackageUtil } from '@travetto/manifest';
8
+ import { PackageUtil, type IndexedModule } from '@travetto/manifest';
9
9
 
10
10
  import { PackOperation } from './bin/operation.ts';
11
11
  import { PackUtil } from './bin/util.ts';
@@ -114,8 +114,8 @@ export abstract class BasePackCommand implements CliCommandShape {
114
114
  */
115
115
  async * runOperations(): AsyncIterable<string> {
116
116
  for (const operation of this.getOperations()) {
117
- for await (const msg of operation(this)) {
118
- yield msg.join(' ');
117
+ for await (const message of operation(this)) {
118
+ yield message.join(' ');
119
119
  }
120
120
  }
121
121
  }
@@ -126,8 +126,7 @@ export abstract class BasePackCommand implements CliCommandShape {
126
126
  getBinaryDependencies(): string[] {
127
127
  return [...RuntimeIndex.getModuleList('all')]
128
128
  .map(name => RuntimeIndex.getModule(name))
129
- .filter(module => !!module)
130
- .filter(module => module.production)
129
+ .filter((module): module is IndexedModule => !!module?.production)
131
130
  .map(module => PackageUtil.readPackage(module?.sourcePath))
132
131
  .map(pkg => pkg?.travetto?.build?.binaryDependencies ?? [])
133
132
  .flat();
@@ -162,11 +161,11 @@ export abstract class BasePackCommand implements CliCommandShape {
162
161
 
163
162
  await term.streamLines(stream);
164
163
 
165
- let msg = cliTpl`${{ success: 'Success' }} (${{ identifier: TimeUtil.asClock(Date.now() - start) }}) ${{ subtitle: 'module' }}=${{ param: this.module }}`;
164
+ let message = cliTpl`${{ success: 'Success' }} (${{ identifier: TimeUtil.asClock(Date.now() - start) }}) ${{ subtitle: 'module' }}=${{ param: this.module }}`;
166
165
  if (this.output) {
167
- msg = cliTpl`${msg} ${{ subtitle: 'output' }}=${{ path: this.output }}`;
166
+ message = cliTpl`${message} ${{ subtitle: 'output' }}=${{ path: this.output }}`;
168
167
  }
169
- await term.writer.writeLine(msg).commit();
168
+ await term.writer.writeLine(message).commit();
170
169
  }
171
170
  }
172
171
  }
@@ -18,7 +18,7 @@ export function travettoSourcemaps(config: CoreRollupConfig): Plugin {
18
18
  return {
19
19
  name: 'travetto-source-maps',
20
20
  async load(this: PluginContext, id: string): Promise<LoadResult> {
21
- if (!id.endsWith('.js') || id.endsWith('@travetto/runtime/support/polyfill.js')) {
21
+ if (!id.endsWith('.js') || id.endsWith('@travetto/runtime/support/patch.js')) {
22
22
  return null;
23
23
  }
24
24
  try {