@travetto/pack 5.0.0-rc.6 → 5.0.0-rc.7

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": "5.0.0-rc.6",
3
+ "version": "5.0.0-rc.7",
4
4
  "description": "Code packing utilities",
5
5
  "keywords": [
6
6
  "travetto",
@@ -29,12 +29,12 @@
29
29
  "@rollup/plugin-json": "^6.1.0",
30
30
  "@rollup/plugin-node-resolve": "^15.2.3",
31
31
  "@rollup/plugin-terser": "^0.4.4",
32
- "@travetto/runtime": "^5.0.0-rc.6",
33
- "@travetto/terminal": "^5.0.0-rc.6",
32
+ "@travetto/runtime": "^5.0.0-rc.7",
33
+ "@travetto/terminal": "^5.0.0-rc.7",
34
34
  "rollup": "^4.18.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@travetto/cli": "^5.0.0-rc.6"
37
+ "@travetto/cli": "^5.0.0-rc.7"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@travetto/cli": {
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
 
4
- import { RuntimeIndex } from '@travetto/runtime';
4
+ import { Runtime } from '@travetto/runtime';
5
5
  import { cliTpl } from '@travetto/cli';
6
6
 
7
7
  import { ActiveShellCommand } from './shell';
@@ -32,12 +32,7 @@ export class DockerPackOperation {
32
32
  */
33
33
  static async* writeDockerFile(cfg: DockerPackConfig): AsyncIterable<string[]> {
34
34
  const dockerFile = path.resolve(cfg.buildDir, 'Dockerfile');
35
-
36
- const factory = RuntimeIndex.getFromImport(cfg.dockerFactory);
37
- if (!factory) {
38
- throw new Error(`Unable to resolve docker factory at ${cfg.dockerFactory}`);
39
- }
40
- const mod: DockerPackFactoryModule = await import(factory.import);
35
+ const mod = await Runtime.importFrom<DockerPackFactoryModule>(cfg.dockerFactory);
41
36
  const content = (await mod.factory(cfg)).trim();
42
37
 
43
38
  yield* PackOperation.title(cfg, cliTpl`${{ title: 'Generating Docker File' }} ${{ path: dockerFile }} ${{ param: cfg.dockerFactory }}`);
@@ -18,7 +18,7 @@ function getFilesFromModule(m: ManifestModule): string[] {
18
18
  ]
19
19
  .filter(([, t]) => t === 'ts' || t === 'js' || t === 'json')
20
20
  .filter(f => (f[3] ?? 'std') === 'std') // Only include standard files
21
- .map(([f]) => ManifestModuleUtil.sourceToOutputExt(path.resolve(m.outputFolder, f)));
21
+ .map(([f]) => ManifestModuleUtil.withOutputExtension(path.resolve(m.outputFolder, f)));
22
22
  }
23
23
 
24
24
  export function getOutput(): OutputOptions {