@travetto/pack 8.0.0-alpha.7 → 8.0.0-alpha.9
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/README.md +3 -3
- package/package.json +4 -4
- package/support/cli.pack_docker.ts +1 -1
- package/support/pack.base.ts +2 -3
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Options:
|
|
|
45
45
|
-wr, --include-workspace-resources Include workspace resources (default: false)
|
|
46
46
|
-np, --npm-package <string> External NPM Packages (default: [])
|
|
47
47
|
-m, --module <module> Module to run for
|
|
48
|
-
|
|
48
|
+
--help display help for command
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
This command line operation will compile your project, and produce a ready to use workspace as a deliverable. Additionally, you can pass in a file to the `eject-file` flag that will allow for a script to be produced (base on the host operating system).
|
|
@@ -111,7 +111,7 @@ Options:
|
|
|
111
111
|
-wr, --include-workspace-resources Include workspace resources (default: false)
|
|
112
112
|
-np, --npm-package <string> External NPM Packages (default: [])
|
|
113
113
|
-m, --module <module> Module to run for
|
|
114
|
-
|
|
114
|
+
--help display help for command
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
## CLI - pack:docker
|
|
@@ -151,7 +151,7 @@ Options:
|
|
|
151
151
|
-dx, --docker-push Docker Push Tags (default: false)
|
|
152
152
|
-db, --docker-build-platform <string> Docker Build Platform
|
|
153
153
|
-dr, --docker-registry <string> Docker Registry
|
|
154
|
-
|
|
154
|
+
--help display help for command
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
The additional flags provided are allow for specifying the base image, the final docker image name (and tags), and which registry to push to (if any). Additionally, there are flags for exposing which ports the image should expect to open as well. When using the `--eject-file` flag, the output script will produce the entire Dockerfile output inline, so that it can be easily modified as needed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/pack",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.9",
|
|
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.
|
|
34
|
-
"@travetto/terminal": "^8.0.0-alpha.
|
|
33
|
+
"@travetto/runtime": "^8.0.0-alpha.6",
|
|
34
|
+
"@travetto/terminal": "^8.0.0-alpha.6",
|
|
35
35
|
"rollup": "^4.59.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@travetto/cli": "^8.0.0-alpha.
|
|
38
|
+
"@travetto/cli": "^8.0.0-alpha.11"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@travetto/cli": {
|
|
@@ -24,7 +24,7 @@ export class PackDockerCommand extends BasePackCommand {
|
|
|
24
24
|
@CliFlag({ short: 'di', envVars: ['PACK_DOCKER_IMAGE'] })
|
|
25
25
|
dockerImage = `node:${NODE_MAJOR}-alpine`;
|
|
26
26
|
/** Docker Image Name */
|
|
27
|
-
@CliFlag({ short: 'dn', envVars: ['
|
|
27
|
+
@CliFlag({ short: 'dn', envVars: ['PACK_DOCKER_NAME'] })
|
|
28
28
|
@Required(false)
|
|
29
29
|
dockerName: string;
|
|
30
30
|
/** Docker Runtime user */
|
package/support/pack.base.ts
CHANGED
|
@@ -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';
|
|
@@ -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();
|