UNPKG

883 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Copy = void 0;
4const jsonInstruction_1 = require("../jsonInstruction");
5class Copy extends jsonInstruction_1.JSONInstruction {
6 constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) {
7 super(document, range, dockerfile, escapeChar, instruction, instructionRange);
8 }
9 stopSearchingForFlags(argument) {
10 return argument.indexOf("--") === -1;
11 }
12 getFromFlag() {
13 let flags = super.getFlags();
14 return flags.length === 1 && flags[0].getName() === "from" ? flags[0] : null;
15 }
16 /**
17 * Returns there here-documents that are defined in this RUN
18 * instruction.
19 *
20 * This API is experimental and subject to change.
21 */
22 getHeredocs() {
23 return super.getHeredocs();
24 }
25}
26exports.Copy = Copy;