impreza-mcp 0.21.0 → 0.23.0
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 +43 -2
- package/dist/client.d.ts +18 -0
- package/dist/client.js +3 -1
- package/dist/client.js.map +1 -1
- package/dist/server.js +66 -16
- package/dist/server.js.map +1 -1
- package/dist/ui-assets.d.ts +2 -2
- package/dist/ui-assets.js +11 -6
- package/dist/ui-assets.js.map +1 -1
- package/package.json +64 -64
package/README.md
CHANGED
|
@@ -10,6 +10,44 @@ loaded, Claude calls `impreza_deploy_custom` directly — packages your
|
|
|
10
10
|
project, uploads it, builds + runs on your Impreza VPS, and reports
|
|
11
11
|
back the URL.
|
|
12
12
|
|
|
13
|
+
## Runtime health and deployment operations
|
|
14
|
+
|
|
15
|
+
`impreza_list_deployments` returns `runtime` and `last_operation` separately.
|
|
16
|
+
A failed build can leave the previous application healthy. Read runtime state,
|
|
17
|
+
observation time and reason; old or missing readings remain unknown.
|
|
18
|
+
Running without a confirmed healthcheck is not healthy. This requires agent
|
|
19
|
+
0.6.4+ for observations and does not verify external HTTP/DNS/TLS. Existing
|
|
20
|
+
servers update explicitly. See [runtime health](https://docs.imprezahost.com/runtime-health.html).
|
|
21
|
+
|
|
22
|
+
## Retained source uploads
|
|
23
|
+
|
|
24
|
+
Use `impreza_upload_context` with `dir` and an optional `label` to upload an immutable
|
|
25
|
+
source version without deploying. The response includes its `context_id`, SHA256,
|
|
26
|
+
size and expiry. List or inspect versions with `impreza_list_contexts`.
|
|
27
|
+
|
|
28
|
+
Create an app with `impreza_deploy_custom`, `mode: "dockerfile"` and `context_id`
|
|
29
|
+
(or deploy a local `dir` directly). Rebuild it with `impreza_redeploy_deployment`
|
|
30
|
+
and optionally another retained `context_id`. The app identity, domain, host port,
|
|
31
|
+
volumes and build recipe stay fixed. The selected source can differ from the
|
|
32
|
+
running release after failure or rollback; inspect deployment history.
|
|
33
|
+
|
|
34
|
+
Sources in use remain available. Unreferenced versions expire seven days after
|
|
35
|
+
upload or their last deployment request, not seven days after detachment. Default
|
|
36
|
+
quotas are 10 unexpired/referenced archives, 300 MiB per account and 100 MiB per
|
|
37
|
+
archive; referenced sources count. Delete an unused version with
|
|
38
|
+
`impreza_delete_context`, `context_id` and `confirm: true` after customer confirmation.
|
|
39
|
+
Metadata requires read scope, upload requires deploy, and deletion requires
|
|
40
|
+
manage. Resource-confined credentials cannot manage account uploads.
|
|
41
|
+
|
|
42
|
+
The packer excludes common dependency/VCS folders, .env and .env.* (except
|
|
43
|
+
example/sample/template files), .npmrc and .pypirc. It does not scan arbitrary
|
|
44
|
+
secrets or interpret .gitignore/.dockerignore; review what you upload. Portal
|
|
45
|
+
archives are sent unchanged. Legacy REST uploads remain temporary unless they
|
|
46
|
+
opt into `retain=true`. Older uploaded-source apps can migrate by selecting a
|
|
47
|
+
fresh retained context on redeploy. These MCP tools require 0.22.0+; no agent
|
|
48
|
+
update is needed solely for source retention. See the
|
|
49
|
+
[source upload guide](https://docs.imprezahost.com/source-uploads.html).
|
|
50
|
+
|
|
13
51
|
## Node.js npm builds
|
|
14
52
|
|
|
15
53
|
Deploy an independent npm HTTP application without a repository Dockerfile using
|
|
@@ -22,8 +60,8 @@ must be available on the server. Workspaces, private npm configuration and build
|
|
|
22
60
|
secrets require a custom Dockerfile. The app must listen on 0.0.0.0 and the
|
|
23
61
|
configured port. Keep runtime PORT consistent with that port.
|
|
24
62
|
|
|
25
|
-
Git redeploys and previews reuse the recipe snapshot.
|
|
26
|
-
|
|
63
|
+
Git redeploys and previews reuse the recipe snapshot. Retained uploaded sources
|
|
64
|
+
support reuse and source-version selection; older temporary uploads remain single-use. The recipe excludes .git, node_modules, .env,
|
|
27
65
|
.env.* and .npmrc from the source copy; this does not scan arbitrary secrets.
|
|
28
66
|
Keep credentials out of source code. The HTTP startup probe accepts responses
|
|
29
67
|
below 500 at / and is not a functional application test.
|
|
@@ -291,6 +329,9 @@ and `impreza_api_search` finds anything not named here.
|
|
|
291
329
|
| `impreza_list_servers` | `GET /v1/platform/servers` |
|
|
292
330
|
| `impreza_list_apps` | `GET /v1/platform/apps` |
|
|
293
331
|
| `impreza_list_deployments` | `GET /v1/platform/deployments` + `/custom` (merged) |
|
|
332
|
+
| `impreza_upload_context` | `POST /v1/platform/deployments/custom/contexts?retain=true` |
|
|
333
|
+
| `impreza_list_contexts` | `GET /v1/platform/deployments/custom/contexts[/{context_id}]` |
|
|
334
|
+
| `impreza_delete_context` | `DELETE /v1/platform/deployments/custom/contexts/{context_id}` |
|
|
294
335
|
| `impreza_deploy_custom` | `POST /v1/platform/deployments/custom` (3 modes) |
|
|
295
336
|
| `impreza_deploy_catalog_app` | `POST /v1/platform/deployments` |
|
|
296
337
|
| `impreza_uninstall_deployment` | `POST .../uninstall` |
|
package/dist/client.d.ts
CHANGED
|
@@ -92,7 +92,25 @@ export interface Deployment {
|
|
|
92
92
|
memory_mb?: number;
|
|
93
93
|
vars?: Record<string, unknown>;
|
|
94
94
|
created_at: string;
|
|
95
|
+
/** Historical deployment receipt; use runtime for current container health. */
|
|
95
96
|
last_health_at?: string | null;
|
|
97
|
+
runtime?: {
|
|
98
|
+
state: 'healthy' | 'running' | 'starting' | 'degraded' | 'stopped' | 'unknown';
|
|
99
|
+
reason: string | null;
|
|
100
|
+
observed_at: string | null;
|
|
101
|
+
age_seconds: number | null;
|
|
102
|
+
fresh_for_seconds: number;
|
|
103
|
+
scope: 'containers';
|
|
104
|
+
last_reported_state: string | null;
|
|
105
|
+
counts: Record<string, number> | null;
|
|
106
|
+
};
|
|
107
|
+
last_operation?: {
|
|
108
|
+
command_id: string;
|
|
109
|
+
kind: string;
|
|
110
|
+
status: string;
|
|
111
|
+
created_at: string;
|
|
112
|
+
completed_at: string | null;
|
|
113
|
+
} | null;
|
|
96
114
|
last_error?: string | null;
|
|
97
115
|
}
|
|
98
116
|
export interface DeploymentList {
|
package/dist/client.js
CHANGED
|
@@ -195,7 +195,7 @@ export async function tarProjectDir(projectDir) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
const EXCLUDED_DIRS = new Set(['.git', '.svn', '.hg', '.bzr', 'node_modules', '__pycache__', '.venv', 'venv', '.impreza']);
|
|
198
|
-
const EXCLUDED_FILES = new Set(['.DS_Store', 'Thumbs.db']);
|
|
198
|
+
const EXCLUDED_FILES = new Set(['.DS_Store', 'Thumbs.db', '.npmrc', '.pypirc']);
|
|
199
199
|
function isExcluded(relPath) {
|
|
200
200
|
const normalized = relPath.replace(/^\.[\\/]+/, '').replace(/\\/g, '/');
|
|
201
201
|
const parts = normalized.split('/').filter((p) => p && p !== '.');
|
|
@@ -206,6 +206,8 @@ function isExcluded(relPath) {
|
|
|
206
206
|
const base = parts[parts.length - 1] ?? '';
|
|
207
207
|
if (EXCLUDED_FILES.has(base))
|
|
208
208
|
return true;
|
|
209
|
+
if (base === '.env' || (base.startsWith('.env.') && !['.env.example', '.env.sample', '.env.template'].includes(base)))
|
|
210
|
+
return true;
|
|
209
211
|
if (base.endsWith('.pyc'))
|
|
210
212
|
return true;
|
|
211
213
|
return false;
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,mEAAmE;AACnE,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,2DAA2D;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAU3B,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,CAAC;QACtB,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IACxC,CAAC;IACD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACnI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,SAAS,CAAC,KAAiB;IACzC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -141,8 +141,8 @@ const TOOLS = [
|
|
|
141
141
|
{
|
|
142
142
|
name: 'impreza_list_deployments',
|
|
143
143
|
description: 'List the customer\'s currently-installed app deployments (catalog + custom). ' +
|
|
144
|
-
'Optionally narrow to a single server via `agent_id`. ' +
|
|
145
|
-
'Use to
|
|
144
|
+
'Runtime observations (agent 0.6.4+) and last_operation are separate. Read runtime.state, reason, observed_at and age_seconds; unknown/stale/offline is not healthy. Running without a healthcheck is not proven healthy. Container health does not verify the public URL. status and its filter are legacy deployment lifecycle fields, not current availability. Optionally narrow to a single server via `agent_id`. ' +
|
|
145
|
+
'Use to inspect deployments before adding more, or to find a `deployment_id` to uninstall/restart.',
|
|
146
146
|
inputSchema: {
|
|
147
147
|
type: 'object',
|
|
148
148
|
properties: {
|
|
@@ -191,6 +191,7 @@ const TOOLS = [
|
|
|
191
191
|
static_output_dir: { type: 'string', minLength: 1, maxLength: 120, description: 'Static npm only: output folder relative to project_dir containing index.html (default dist). No hidden/parent/node_modules segments or symlinks.' },
|
|
192
192
|
static_spa: { type: 'boolean', description: 'Static npm only: true (default) uses index.html for unknown routes; false returns 404.' },
|
|
193
193
|
dockerfile_path: { type: 'string', description: 'Optional Dockerfile path relative to the dir/repo root (default "Dockerfile").' },
|
|
194
|
+
context_id: { type: 'string', description: 'mode=dockerfile: uploaded source ID, mutually exclusive with dir or git_url. Retained archives support redeploy.' },
|
|
194
195
|
compose_yaml: { type: 'string', maxLength: 65536, description: 'mode=compose: self-contained YAML reviewed with impreza_prepare_compose.' },
|
|
195
196
|
web_service: { type: 'string', maxLength: 63, description: 'mode=compose: selected HTTP service; target_port is its integer container port.' },
|
|
196
197
|
compose_review_id: { type: 'string', description: 'mode=compose: analysis_id from the exact YAML, HTTP service and port review.' },
|
|
@@ -444,11 +445,12 @@ const TOOLS = [
|
|
|
444
445
|
},
|
|
445
446
|
{
|
|
446
447
|
name: 'impreza_redeploy_deployment',
|
|
447
|
-
description: 'Rebuild a CUSTOM deployment in place from its current source — re-pull the image, re-clone the watched git ref at its new HEAD, or rebuild —
|
|
448
|
+
description: 'Rebuild a CUSTOM deployment in place from its current source — re-pull the image, re-clone the watched git ref at its new HEAD, or rebuild — using the existing startup and recovery policy. Reuses the same deployment, so the domain, host port, and URL never change. This is the in-place way to ship a new build of a running custom app the customer changed — PREFER it over uninstall + recreate. Optional `vars` are merged into the stored environment before the rebuild (rotate a secret / add a var without a teardown); system vars (DEPLOYMENT_ID, DOMAIN_URL, HOST_PORT, ...) are preserved. Uploaded-source apps can select a retained context_id for a newer archive; omission rebuilds the current retained archive. Build recipe, paths and public build settings stay fixed. After a failed replacement, the running release can use an earlier source; check deployment history. Image and Git source changes require a new app. Custom deployments only; returns the deployment flipped to `updating` — poll impreza_list_deployments for running/failed.',
|
|
448
449
|
inputSchema: {
|
|
449
450
|
type: 'object',
|
|
450
451
|
properties: {
|
|
451
452
|
deployment_id: { type: 'string', description: 'The dpl_... id of the custom deployment to rebuild.' },
|
|
453
|
+
context_id: { type: 'string', description: 'Optional retained archive version for an app created from an upload.' },
|
|
452
454
|
vars: { type: 'object', description: 'Optional env vars merged into the deployment before the rebuild. System vars are preserved.' },
|
|
453
455
|
},
|
|
454
456
|
required: ['deployment_id'],
|
|
@@ -789,6 +791,21 @@ const TOOLS = [
|
|
|
789
791
|
additionalProperties: false,
|
|
790
792
|
},
|
|
791
793
|
},
|
|
794
|
+
{
|
|
795
|
+
name: 'impreza_upload_context',
|
|
796
|
+
description: 'Upload a local project folder as an immutable retained source version. Does not deploy. Returns context_id, SHA256, size and expiry for impreza_deploy_custom or impreza_redeploy_deployment. Excludes common local-only files, but is not a secret scanner: review the project first. Sources in use remain available; unused versions expire seven days after upload or their last deploy request. Account quotas include retained versions. Requires deploy scope.',
|
|
797
|
+
inputSchema: { type: 'object', properties: { dir: { type: 'string' }, label: { type: 'string', maxLength: 120 } }, required: ['dir'], additionalProperties: false },
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: 'impreza_list_contexts',
|
|
801
|
+
description: 'List uploaded source versions or inspect one context_id. Returns label, SHA256, size, retention, expiry and references; no archive bytes or storage paths. Retained sources in use do not expire. Use a listed context_id to create or redeploy an uploaded-source app.',
|
|
802
|
+
inputSchema: { type: 'object', properties: { context_id: { type: 'string' } }, additionalProperties: false },
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
name: 'impreza_delete_context',
|
|
806
|
+
description: 'Permanently remove an unused source upload after customer confirmation. Refuses versions referenced by apps. Does not uninstall apps or remove app volumes. Requires manage scope.',
|
|
807
|
+
inputSchema: { type: 'object', properties: { context_id: { type: 'string' }, confirm: { type: 'boolean', const: true } }, required: ['context_id', 'confirm'], additionalProperties: false },
|
|
808
|
+
},
|
|
792
809
|
{
|
|
793
810
|
name: 'impreza_prepare_compose',
|
|
794
811
|
description: 'Review a self-contained Compose YAML before deploying. Public images only; no builds, file dependencies, aliases, profiles, host privileges or external volumes/networks. Returns services, TCP port hints, variable names, changes and blockers without executing or fetching anything. Select web_service and target_port explicitly. Original published ports are removed; only the HTTP service joins the proxy and receives a loopback port. Names and volumes become deployment-specific. Use the returned analysis_id as compose_review_id with the same YAML/service/port in impreza_deploy_custom mode=compose after review. Never paste secrets: reference uppercase vars instead. This is a configuration review, not an executable stored plan or a health check.',
|
|
@@ -2019,6 +2036,9 @@ const TOOL_ANNOTATIONS = {
|
|
|
2019
2036
|
impreza_delete_webhook: A_DESTRUCTIVE_IDEM,
|
|
2020
2037
|
impreza_rotate_webhook_secret: A_DESTRUCTIVE,
|
|
2021
2038
|
impreza_search_docs: A_READ,
|
|
2039
|
+
impreza_upload_context: A_WRITE_EXT,
|
|
2040
|
+
impreza_list_contexts: A_READ,
|
|
2041
|
+
impreza_delete_context: A_DESTRUCTIVE,
|
|
2022
2042
|
impreza_prepare_compose: A_READ,
|
|
2023
2043
|
impreza_prepare_project: A_READ,
|
|
2024
2044
|
impreza_validate_manifest: A_READ,
|
|
@@ -2476,6 +2496,11 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
2476
2496
|
if (!dep)
|
|
2477
2497
|
return toError('deployment_id is required');
|
|
2478
2498
|
const body = {};
|
|
2499
|
+
if (args.context_id !== undefined) {
|
|
2500
|
+
if (typeof args.context_id !== "string" || !/^ctx_[a-f0-9]{1,36}$/.test(args.context_id))
|
|
2501
|
+
return toError("Invalid context_id");
|
|
2502
|
+
body.context_id = args.context_id;
|
|
2503
|
+
}
|
|
2479
2504
|
if (args.vars && typeof args.vars === 'object') {
|
|
2480
2505
|
body.vars = args.vars;
|
|
2481
2506
|
}
|
|
@@ -2881,6 +2906,20 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
2881
2906
|
return toError('query is required, or pass section to read one whole section');
|
|
2882
2907
|
return toResult(await impreza.get('/v1/docs/search', query));
|
|
2883
2908
|
}
|
|
2909
|
+
case 'impreza_upload_context':
|
|
2910
|
+
if (typeof args.dir !== 'string' || !args.dir)
|
|
2911
|
+
return toError('dir is required');
|
|
2912
|
+
return toResult(await uploadSourceContext(args.dir, args.label));
|
|
2913
|
+
case 'impreza_list_contexts': {
|
|
2914
|
+
const context = args.context_id;
|
|
2915
|
+
if (context !== undefined && (typeof context !== 'string' || !/^ctx_[a-f0-9]{1,36}$/.test(context)))
|
|
2916
|
+
return toError('Invalid context_id');
|
|
2917
|
+
return toResult(await impreza.get('/v1/platform/deployments/custom/contexts' + (context ? '/' + encodeURIComponent(context) : '')));
|
|
2918
|
+
}
|
|
2919
|
+
case 'impreza_delete_context':
|
|
2920
|
+
if (args.confirm !== true || typeof args.context_id !== 'string' || !/^ctx_[a-f0-9]{1,36}$/.test(args.context_id))
|
|
2921
|
+
return toError('Valid context_id and confirm=true are required');
|
|
2922
|
+
return toResult(await impreza.del('/v1/platform/deployments/custom/contexts/' + encodeURIComponent(args.context_id)));
|
|
2884
2923
|
case 'impreza_prepare_compose': {
|
|
2885
2924
|
const body = {};
|
|
2886
2925
|
for (const field of ['compose_yaml', 'web_service', 'target_port'])
|
|
@@ -3449,6 +3488,17 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
3449
3488
|
return toError(msg);
|
|
3450
3489
|
}
|
|
3451
3490
|
});
|
|
3491
|
+
async function uploadSourceContext(dir, label = '') {
|
|
3492
|
+
if (typeof label !== 'string' || Buffer.byteLength(label) > 120 || /[\x00-\x1f\x7f]/.test(label))
|
|
3493
|
+
throw new Error('label must be text up to 120 UTF-8 bytes without control characters');
|
|
3494
|
+
const packed = await tarProjectDir(dir);
|
|
3495
|
+
try {
|
|
3496
|
+
return await impreza.postRaw('/v1/platform/deployments/custom/contexts?retain=true&label=' + encodeURIComponent(label), 'application/gzip', packed.bytes);
|
|
3497
|
+
}
|
|
3498
|
+
finally {
|
|
3499
|
+
await packed.cleanup();
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3452
3502
|
async function deployCustom(args) {
|
|
3453
3503
|
const name = String(args.name ?? '');
|
|
3454
3504
|
const agentId = String(args.agent_id ?? '');
|
|
@@ -3544,6 +3594,9 @@ async function deployCustom(args) {
|
|
|
3544
3594
|
throw new Error('Invalid build_strategy');
|
|
3545
3595
|
body.build_strategy = String(args.build_strategy);
|
|
3546
3596
|
}
|
|
3597
|
+
const sourceCount = [args.git_url, args.dir, args.context_id].filter(value => value !== undefined && value !== '').length;
|
|
3598
|
+
if (sourceCount !== 1)
|
|
3599
|
+
throw new Error('Choose exactly one of git_url, dir or context_id');
|
|
3547
3600
|
const gitURL = typeof args.git_url === 'string' ? args.git_url : '';
|
|
3548
3601
|
if (gitURL) {
|
|
3549
3602
|
// Git source — the agent clones at deploy time; no local upload.
|
|
@@ -3570,20 +3623,17 @@ async function deployCustom(args) {
|
|
|
3570
3623
|
? ' (deploy_key — add the returned git_auth.public_key to your repo as a read-only Deploy Key, then redeploy)'
|
|
3571
3624
|
: ` (git: ${gitURL})`;
|
|
3572
3625
|
}
|
|
3626
|
+
else if (typeof args.context_id === 'string' && /^ctx_[a-f0-9]{1,36}$/.test(args.context_id)) {
|
|
3627
|
+
body.context_id = args.context_id;
|
|
3628
|
+
if (typeof args.dockerfile_path === 'string' && args.dockerfile_path)
|
|
3629
|
+
body.dockerfile_path = args.dockerfile_path;
|
|
3630
|
+
}
|
|
3573
3631
|
else if (typeof args.dir === 'string' && args.dir) {
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
if (typeof args.dockerfile_path === 'string' && args.dockerfile_path && args.dockerfile_path !== 'Dockerfile') {
|
|
3580
|
-
body.dockerfile_path = args.dockerfile_path;
|
|
3581
|
-
}
|
|
3582
|
-
traceTail = ` (uploaded ${packed.sizeBytes} B → ${upload.context_id})`;
|
|
3583
|
-
}
|
|
3584
|
-
finally {
|
|
3585
|
-
await packed.cleanup();
|
|
3586
|
-
}
|
|
3632
|
+
const upload = await uploadSourceContext(args.dir);
|
|
3633
|
+
body.context_id = upload.context_id;
|
|
3634
|
+
if (typeof args.dockerfile_path === 'string' && args.dockerfile_path)
|
|
3635
|
+
body.dockerfile_path = args.dockerfile_path;
|
|
3636
|
+
traceTail = ' (retained source ' + upload.context_id + ')';
|
|
3587
3637
|
}
|
|
3588
3638
|
else {
|
|
3589
3639
|
throw new Error('mode=dockerfile requires `dir` (local project directory) OR `git_url` (git repo)');
|