@faable/faable 1.4.8 → 1.4.10
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/dist/api/client.js
CHANGED
|
@@ -4,7 +4,7 @@ function prepare_client({ authStrategy, auth, } = {}) {
|
|
|
4
4
|
const strategy = authStrategy && authStrategy(auth);
|
|
5
5
|
const client = axios.create({
|
|
6
6
|
baseURL: "https://api.faable.com",
|
|
7
|
-
timeout:
|
|
7
|
+
timeout: 10000,
|
|
8
8
|
});
|
|
9
9
|
client.interceptors.request.use(async function (config) {
|
|
10
10
|
// Do something before request is sent
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { strategy_nodejs } from './strategies/nodejs.js';
|
|
2
2
|
import * as R from 'ramda';
|
|
3
3
|
import { has_any_of_files } from './helpers/has_any_of_files.js';
|
|
4
|
-
import { strategy_python } from './strategies/python.js';
|
|
5
4
|
import { strategy_docker } from './strategies/docker.js';
|
|
6
5
|
|
|
7
6
|
const runtime_detection = async (workdir) => {
|
|
8
7
|
const has = R.curry(has_any_of_files);
|
|
9
8
|
const strategy = R.cond([
|
|
10
9
|
[has(["package.json"]), R.always(strategy_nodejs)],
|
|
11
|
-
[has(["requirements.txt"]), R.always(strategy_python)],
|
|
10
|
+
// [has(["requirements.txt"]), R.always(strategy_python)],
|
|
12
11
|
[has(["Dockerfile"]), R.always(strategy_docker)],
|
|
13
12
|
])(workdir);
|
|
14
13
|
if (!strategy) {
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path__default from 'path';
|
|
3
|
-
|
|
4
|
-
const strategy_python = async (workdir) => {
|
|
5
|
-
const runtime_config = path__default.join(workdir, "runtime.txt");
|
|
6
|
-
// Default runtime
|
|
7
|
-
let runtime_version = "3.11.3";
|
|
8
|
-
// Select runtime based on config
|
|
9
|
-
if (fs.existsSync(runtime_config)) {
|
|
10
|
-
const runtime_data = fs.readFileSync(runtime_config).toString();
|
|
11
|
-
if (!runtime_data.startsWith("python-")) {
|
|
12
|
-
throw new Error("runtime.txt must have runtime format with python-<version>");
|
|
13
|
-
}
|
|
14
|
-
runtime_version = runtime_data.split("-")[1];
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
runtime: {
|
|
18
|
-
name: "python",
|
|
19
|
-
version: runtime_version,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { strategy_python };
|