@platformatic/service 1.13.1 → 1.13.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.
@@ -0,0 +1,31 @@
1
+ # Platformatic Service API
2
+
3
+ This is a generated [Platformatic Service](https://docs.platformatic.dev/docs/reference/service/introduction) application.
4
+
5
+ ## Requirements
6
+
7
+ Platformatic supports macOS, Linux and Windows ([WSL](https://docs.microsoft.com/windows/wsl/) recommended).
8
+ You'll need to have [Node.js](https://nodejs.org/) >= v18.8.0 or >= v20.6.0
9
+
10
+ ## Setup
11
+
12
+ Install dependencies:
13
+
14
+ ```bash
15
+ npm install
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ Run the API with:
21
+
22
+ ```bash
23
+ npm start
24
+ ```
25
+
26
+ ### Explore
27
+ - ⚡ The Platformatic DB server is running at http://localhost:3042/
28
+ - 📔 View the REST API's Swagger documentation at http://localhost:3042/documentation/
29
+ - 🔍 Try out the GraphiQL web UI at http://localhost:3042/graphiql
30
+
31
+
@@ -6,6 +6,6 @@ interface KeyValue {
6
6
 
7
7
  export namespace ServiceGenerator {
8
8
  export class ServiceGenerator extends BaseGenerator.BaseGenerator {
9
- constructor (opts?: BaseGenerator.BaseGeneratorOptions)
9
+ constructor (opts?: Omit<BaseGenerator.BaseGeneratorOptions, 'module'>)
10
10
  }
11
11
  }
@@ -2,11 +2,15 @@
2
2
 
3
3
  const { BaseGenerator } = require('@platformatic/generators')
4
4
  const { getPackageConfigurationObject } = require('@platformatic/generators/lib/utils')
5
+ const { readFile } = require('node:fs/promises')
6
+ const { join } = require('node:path')
5
7
 
6
8
  class ServiceGenerator extends BaseGenerator {
7
9
  constructor (opts = {}) {
8
- super(opts)
9
- this.type = 'service'
10
+ super({
11
+ ...opts,
12
+ module: '@platformatic/service'
13
+ })
10
14
  }
11
15
 
12
16
  async _beforePrepare () {
@@ -64,6 +68,8 @@ declare module 'fastify' {
64
68
  // remove env variables since they are all for the config.server property
65
69
  this.config.env = {}
66
70
  }
71
+
72
+ this.addFile({ path: '', file: 'README.md', contents: await readFile(join(__dirname, 'README.md')) })
67
73
  }
68
74
 
69
75
  async _getConfigFileContents () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/service",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -69,12 +69,12 @@
69
69
  "pino-pretty": "^10.2.0",
70
70
  "rfdc": "^1.3.0",
71
71
  "ua-parser-js": "^1.0.36",
72
- "@platformatic/client": "1.13.1",
73
- "@platformatic/config": "1.13.1",
74
- "@platformatic/generators": "1.13.1",
75
- "@platformatic/telemetry": "1.13.1",
76
- "@platformatic/swagger-ui-theme": "1.13.1",
77
- "@platformatic/utils": "1.13.1"
72
+ "@platformatic/config": "1.13.3",
73
+ "@platformatic/generators": "1.13.3",
74
+ "@platformatic/client": "1.13.3",
75
+ "@platformatic/swagger-ui-theme": "1.13.3",
76
+ "@platformatic/telemetry": "1.13.3",
77
+ "@platformatic/utils": "1.13.3"
78
78
  },
79
79
  "standard": {
80
80
  "ignore": [