@faable/faable 1.5.0 → 1.5.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://faable.com">
3
- <img src="https://www.faable.com/logo/Emblem.png" height="96">
3
+ <img src="https://www.faable.com/assets/logo/Emblem.png" height="96">
4
4
  <h3 align="center">Faable</h3>
5
5
  </a>
6
6
  </p>
@@ -5,7 +5,7 @@ import { Configuration } from '../../../lib/Configuration.js';
5
5
  const build_project = async (args) => {
6
6
  const build_script = args.build_script;
7
7
  const build_command = build_script
8
- ? `yarn run ${build_script}`
8
+ ? `npm run ${build_script}`
9
9
  : Configuration.instance().buildCommand;
10
10
  if (build_command) {
11
11
  const cwd = args.cwd || process.cwd();
@@ -6,9 +6,9 @@ import * as path from 'path';
6
6
  import { fileURLToPath } from 'url';
7
7
  import { Configuration } from '../../../lib/Configuration.js';
8
8
 
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
- const templates_dir = path.join(__dirname, "templates");
9
+ const __filename$1 = fileURLToPath(import.meta.url);
10
+ const __dirname$1 = path.dirname(__filename$1);
11
+ const templates_dir = path.join(__dirname$1, "templates");
12
12
  const dockerfile = fs.readFileSync(`${templates_dir}/Dockerfile`).toString();
13
13
  const entrypoint = fs
14
14
  .readFileSync(`${templates_dir}/entrypoint.sh`)
@@ -29,8 +29,13 @@ const bundle_docker = async (props) => {
29
29
  const entrypoint_custom = entrypoint_template(template_context);
30
30
  const start_command = Configuration.instance().startCommand;
31
31
  log.info(`⚙️ Start command: ${start_command}`);
32
+ // NOTE: use slim to build projects
33
+ const linux_distro = "slim";
34
+ const from = [template_context.from, linux_distro].filter((e) => e).join("-");
35
+ log.info(`Using docker image ${from}`);
36
+ // run template
32
37
  const dockerfile = docker_template({
33
- from: template_context.from,
38
+ from,
34
39
  entry_script: entrypoint_custom,
35
40
  start_command,
36
41
  });
@@ -10,7 +10,7 @@ const build_node = async (app, options) => {
10
10
  }
11
11
  // Analyze package.json to check if build is needed
12
12
  const { build_script, type } = await analyze_package({ workdir });
13
- await build_project({ app, build_script });
13
+ await build_project({ build_script });
14
14
  // Bundle project inside a docker image
15
15
  await bundle_docker({
16
16
  app,
package/dist/config.js CHANGED
@@ -2,9 +2,9 @@ import fs from 'fs-extra';
2
2
  import path__default from 'path';
3
3
  import { fileURLToPath } from 'url';
4
4
 
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = path__default.dirname(__filename);
7
- const pkg = fs.readJSONSync(path__default.join(__dirname, "..", "package.json"));
5
+ const __filename$1 = fileURLToPath(import.meta.url);
6
+ const __dirname$1 = path__default.dirname(__filename$1);
7
+ const pkg = fs.readJSONSync(path__default.join(__dirname$1, "..", "package.json"));
8
8
  const version = pkg.version;
9
9
 
10
10
  export { version };
package/package.json CHANGED
@@ -2,19 +2,19 @@
2
2
  "name": "@faable/faable",
3
3
  "main": "dist/index.js",
4
4
  "dependencies": {
5
- "axios": "^1.2.3",
6
- "fs-extra": "^11.1.0",
7
- "handlebars": "^4.7.7",
8
- "pino": "^8.11.0",
9
- "pino-pretty": "^9.4.0",
10
- "promisify-child-process": "^4.1.1",
5
+ "axios": "^1.13.2",
6
+ "fs-extra": "^11.3.2",
7
+ "handlebars": "^4.7.8",
8
+ "pino": "^10.1.0",
9
+ "pino-pretty": "^13.1.3",
10
+ "promisify-child-process": "^4.1.2",
11
11
  "prompts": "^2.4.2",
12
- "ramda": "^0.29.0",
13
- "tslib": "^2.4.1",
14
- "yaml": "^2.2.2",
15
- "yargs": "^17.6.2"
12
+ "ramda": "^0.32.0",
13
+ "tslib": "^2.8.1",
14
+ "yaml": "^2.8.2",
15
+ "yargs": "^18.0.0"
16
16
  },
17
- "version": "1.5.0",
17
+ "version": "1.5.3",
18
18
  "bin": {
19
19
  "faable": "bin/faable.js"
20
20
  },
@@ -26,7 +26,12 @@
26
26
  "url": "https://github.com/faablecloud/faable/issues"
27
27
  },
28
28
  "publishConfig": {
29
+ "registry": "https://registry.npmjs.org/",
29
30
  "access": "public"
30
31
  },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/faablecloud/faable.git"
35
+ },
31
36
  "homepage": "https://github.com/faablecloud/faable#readme"
32
37
  }