@travetto/pack 3.4.3 → 3.4.5
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/LICENSE +1 -1
- package/README.md +22 -21
- package/package.json +4 -4
- package/support/bin/docker-operation.ts +1 -1
- package/support/bin/types.ts +1 -1
- package/support/cli.pack_docker.ts +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -116,27 +116,28 @@ $ trv pack:docker --help
|
|
|
116
116
|
Usage: pack:docker [options]
|
|
117
117
|
|
|
118
118
|
Options:
|
|
119
|
-
-w, --workspace <string>
|
|
120
|
-
--clean, --no-clean
|
|
121
|
-
-o, --output <string>
|
|
122
|
-
--main-scripts, --no-main-scripts
|
|
123
|
-
-f, --main-name <string>
|
|
124
|
-
-e, --entry-point <string>
|
|
125
|
-
--minify, --no-minify
|
|
126
|
-
-sm, --sourcemap
|
|
127
|
-
-is, --include-sources
|
|
128
|
-
-x, --eject-file <string>
|
|
129
|
-
-r, --rollup-configuration <string>
|
|
130
|
-
-df, --docker-factory <string>
|
|
131
|
-
-di, --docker-image <string>
|
|
132
|
-
-dn, --docker-name <string>
|
|
133
|
-
-dt, --docker-tag <string>
|
|
134
|
-
-dp, --docker-port <number>
|
|
135
|
-
-dx, --docker-push
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
119
|
+
-w, --workspace <string> Workspace for building (default: "/tmp/<temp-folder>")
|
|
120
|
+
--clean, --no-clean Clean workspace (default: true)
|
|
121
|
+
-o, --output <string> Output location
|
|
122
|
+
--main-scripts, --no-main-scripts Create entry scripts (default: true)
|
|
123
|
+
-f, --main-name <string> Main name for build artifact
|
|
124
|
+
-e, --entry-point <string> Entry point (default: "@travetto/cli/support/entry.trv")
|
|
125
|
+
--minify, --no-minify Minify output (default: true)
|
|
126
|
+
-sm, --sourcemap Bundle source maps (default: false)
|
|
127
|
+
-is, --include-sources Include source with source maps (default: false)
|
|
128
|
+
-x, --eject-file <string> Eject commands to file
|
|
129
|
+
-r, --rollup-configuration <string> Rollup configuration file (default: "@travetto/pack/support/bin/rollup")
|
|
130
|
+
-df, --docker-factory <string> Docker Factory source (default: "@travetto/pack/support/pack.dockerfile")
|
|
131
|
+
-di, --docker-image <string> Docker Image to extend (default: "node:20-alpine")
|
|
132
|
+
-dn, --docker-name <string> Docker Image Name (default: "travetto_pack")
|
|
133
|
+
-dt, --docker-tag <string> Docker Image Tag (default: ["latest"])
|
|
134
|
+
-dp, --docker-port <number> Docker Image Port (default: [])
|
|
135
|
+
-dx, --docker-push Docker Push Tags (default: false)
|
|
136
|
+
-db, --docker-build-platform <string> Docker Build Platform
|
|
137
|
+
-dr, --docker-registry <string> Docker Registry
|
|
138
|
+
-du, --docker-runtime-user <string> Docker Runtime user
|
|
139
|
+
-m, --module <string> Module to run for
|
|
140
|
+
-h, --help display help for command
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
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": "3.4.
|
|
3
|
+
"version": "3.4.5",
|
|
4
4
|
"description": "Code packing utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"travetto",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@rollup/plugin-json": "^6.0.1",
|
|
29
29
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
30
30
|
"@rollup/plugin-terser": "^0.4.4",
|
|
31
|
-
"@travetto/base": "^3.4.
|
|
32
|
-
"rollup": "^4.
|
|
31
|
+
"@travetto/base": "^3.4.1",
|
|
32
|
+
"rollup": "^4.5.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@travetto/cli": "^3.4.
|
|
35
|
+
"@travetto/cli": "^3.4.3"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"@travetto/cli": {
|
|
@@ -57,7 +57,7 @@ export class DockerPackOperation {
|
|
|
57
57
|
static async* buildDockerContainer(cfg: DockerPackConfig): AsyncIterable<string[]> {
|
|
58
58
|
const cmd = [
|
|
59
59
|
'docker', 'build',
|
|
60
|
-
...(cfg.dockerBuildPlatform ? ['
|
|
60
|
+
...(cfg.dockerBuildPlatform ? ['--platform', cfg.dockerBuildPlatform] : []),
|
|
61
61
|
...DockerPackOperation.getDockerTags(cfg).flatMap(x => ['-t', x]), '.'
|
|
62
62
|
];
|
|
63
63
|
|
package/support/bin/types.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class PackDockerCommand extends BasePackCommand {
|
|
|
27
27
|
dockerPort: number[] = [];
|
|
28
28
|
@CliFlag({ desc: 'Docker Push Tags ', short: 'dx', envVars: ['PACK_DOCKER_PUSH'] })
|
|
29
29
|
dockerPush = false;
|
|
30
|
-
@CliFlag({ desc: 'Docker Build Platform ', short: '
|
|
30
|
+
@CliFlag({ desc: 'Docker Build Platform ', short: 'db', envVars: ['PACK_DOCKER_BUILD_PLATFORM'] })
|
|
31
31
|
dockerBuildPlatform?: string;
|
|
32
32
|
@CliFlag({ desc: 'Docker Registry ', short: 'dr', envVars: ['PACK_DOCKER_REGISTRY'] })
|
|
33
33
|
dockerRegistry?: string;
|