|
1 | 1 | const crossSpawn = require('cross-spawn'); |
2 | 2 | const glob = require('glob-all'); |
3 | 3 | const JSZip = require('jszip'); |
4 | | -const sha256File = require('sha256-file'); |
| 4 | +// const sha256File = require('sha256-file'); |
5 | 5 | const tape = require('tape-promise/tape'); |
6 | 6 |
|
7 | 7 | const { |
8 | | - chmodSync, |
| 8 | + // chmodSync, |
9 | 9 | removeSync, |
10 | 10 | readFile, |
11 | 11 | copySync, |
12 | | - writeFileSync, |
13 | | - statSync, |
14 | | - pathExistsSync, |
| 12 | + // writeFileSync, |
| 13 | + // statSync, |
| 14 | + // pathExistsSync, |
15 | 15 | } = require('fs-extra'); |
16 | 16 | const { quote } = require('shell-quote'); |
17 | 17 | const { sep } = require('path'); |
18 | 18 |
|
19 | | -const { getUserCachePath, sha256Path } = require('./lib/shared'); |
| 19 | +const { getUserCachePath } = require('./lib/shared'); |
20 | 20 |
|
21 | 21 | const initialWorkingDir = process.cwd(); |
22 | 22 |
|
@@ -53,7 +53,7 @@ const mkCommand = |
53 | 53 | const sls = mkCommand('sls'); |
54 | 54 | const git = mkCommand('git'); |
55 | 55 | const npm = mkCommand('npm'); |
56 | | -const perl = mkCommand('perl'); |
| 56 | +// const perl = mkCommand('perl'); |
57 | 57 |
|
58 | 58 | const setup = () => { |
59 | 59 | removeSync(getUserCachePath()); |
@@ -161,31 +161,31 @@ const availablePythons = (() => { |
161 | 161 | return mapping; |
162 | 162 | })(); |
163 | 163 |
|
164 | | -const getPythonBin = (version) => { |
165 | | - const bin = availablePythons[String(version)]; |
166 | | - if (!bin) throw new Error(`No python version ${version} available`); |
167 | | - return bin; |
168 | | -}; |
169 | | - |
170 | | -const listZipFiles = async function (filename) { |
171 | | - const file = await readFile(filename); |
172 | | - const zip = await new JSZip().loadAsync(file); |
173 | | - return Object.keys(zip.files); |
174 | | -}; |
175 | | - |
176 | | -const listZipFilesWithMetaData = async function (filename) { |
177 | | - const file = await readFile(filename); |
178 | | - const zip = await new JSZip().loadAsync(file); |
179 | | - return Object(zip.files); |
180 | | -}; |
181 | | - |
182 | | -const listRequirementsZipFiles = async function (filename) { |
183 | | - const file = await readFile(filename); |
184 | | - const zip = await new JSZip().loadAsync(file); |
185 | | - const reqsBuffer = await zip.file('.requirements.zip').async('nodebuffer'); |
186 | | - const reqsZip = await new JSZip().loadAsync(reqsBuffer); |
187 | | - return Object.keys(reqsZip.files); |
188 | | -}; |
| 164 | +// const getPythonBin = (version) => { |
| 165 | +// const bin = availablePythons[String(version)]; |
| 166 | +// if (!bin) throw new Error(`No python version ${version} available`); |
| 167 | +// return bin; |
| 168 | +// }; |
| 169 | +// |
| 170 | +// const listZipFiles = async function (filename) { |
| 171 | +// const file = await readFile(filename); |
| 172 | +// const zip = await new JSZip().loadAsync(file); |
| 173 | +// return Object.keys(zip.files); |
| 174 | +// }; |
| 175 | +// |
| 176 | +// const listZipFilesWithMetaData = async function (filename) { |
| 177 | +// const file = await readFile(filename); |
| 178 | +// const zip = await new JSZip().loadAsync(file); |
| 179 | +// return Object(zip.files); |
| 180 | +// }; |
| 181 | +// |
| 182 | +// const listRequirementsZipFiles = async function (filename) { |
| 183 | +// const file = await readFile(filename); |
| 184 | +// const zip = await new JSZip().loadAsync(file); |
| 185 | +// const reqsBuffer = await zip.file('.requirements.zip').async('nodebuffer'); |
| 186 | +// const reqsZip = await new JSZip().loadAsync(reqsBuffer); |
| 187 | +// return Object.keys(reqsZip.files); |
| 188 | +// }; |
189 | 189 |
|
190 | 190 | const canUseDocker = () => { |
191 | 191 | let result; |
|
0 commit comments