@platformatic/runtime 2.68.0 → 2.69.0

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/config.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
- export type HttpsSchemasPlatformaticDevPlatformaticRuntime2680Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime2690Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
@@ -1,10 +1,8 @@
1
1
  'use strict'
2
2
 
3
3
  const { join } = require('node:path')
4
-
4
+ const { createRequire } = require('node:module')
5
5
  const ConfigManager = require('@platformatic/config')
6
- const { createRequire } = require('@platformatic/utils')
7
-
8
6
  const { platformaticRuntime } = require('./config')
9
7
  const { buildRuntime } = require('./start')
10
8
  const { loadConfig } = require('./utils')
package/lib/compile.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- const { createRequire } = require('@platformatic/utils')
3
+ const { createRequire } = require('node:module')
4
4
  const { dirname, join } = require('node:path')
5
5
  const { isatty } = require('node:tty')
6
6
  const { pathToFileURL } = require('node:url')
package/lib/config.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict'
2
2
 
3
3
  const { readdir } = require('node:fs/promises')
4
+ const { createRequire } = require('node:module')
4
5
  const { join, resolve: pathResolve, isAbsolute } = require('node:path')
5
6
  const {
6
- createRequire,
7
7
  loadModule,
8
8
  omitProperties,
9
9
  schemaComponents: { runtimeUnwrappablePropertiesList }
@@ -12,7 +12,8 @@ const { getServiceTemplateFromSchemaUrl } = require('@platformatic/generators/li
12
12
  const { DotEnvTool } = require('dotenv-tool')
13
13
  const { getArrayDifference } = require('../utils')
14
14
  const { pathToFileURL } = require('node:url')
15
- const { createRequire, safeRemove, generateDashedName } = require('@platformatic/utils')
15
+ const { safeRemove, generateDashedName } = require('@platformatic/utils')
16
+ const { createRequire } = require('node:module')
16
17
 
17
18
  const wrappableProperties = {
18
19
  logger: {
@@ -1,8 +1,9 @@
1
1
  'use strict'
2
2
 
3
3
  const { join } = require('node:path')
4
- const { createRequire, loadModule } = require('@platformatic/utils')
4
+ const { loadModule } = require('@platformatic/utils')
5
5
  const MemoryCacheStore = require('@platformatic/undici-cache-memory')
6
+ const { createRequire } = require('node:module')
6
7
 
7
8
  async function createSharedStore (projectDir, httpCacheConfig = {}) {
8
9
  const runtimeRequire = createRequire(join(projectDir, 'file'))
@@ -3,7 +3,7 @@
3
3
  const { join } = require('node:path')
4
4
  const { workerData, parentPort } = require('node:worker_threads')
5
5
  const { pathToFileURL } = require('node:url')
6
- const { createRequire } = require('@platformatic/utils')
6
+ const { createRequire } = require('node:module')
7
7
  const { setGlobalDispatcher, Client, Pool, Agent } = require('undici')
8
8
  const { wire } = require('undici-thread-interceptor')
9
9
  const { createTelemetryThreadInterceptorHooks } = require('@platformatic/telemetry')
@@ -28,13 +28,7 @@ async function setDispatcher (runtimeConfig) {
28
28
  const dispatcherOpts = await getDispatcherOpts(runtimeConfig.undici)
29
29
 
30
30
  setGlobalDispatcher(
31
- new Agent(dispatcherOpts).compose(
32
- [
33
- threadInterceptor,
34
- ...userInterceptors,
35
- cacheInterceptor
36
- ].filter(Boolean)
37
- )
31
+ new Agent(dispatcherOpts).compose([threadInterceptor, ...userInterceptors, cacheInterceptor].filter(Boolean))
38
32
  )
39
33
 
40
34
  return { threadDispatcher }
@@ -94,7 +88,7 @@ function createUpdatableInterceptor (originInterceptor) {
94
88
 
95
89
  async function loadInterceptors (_require, interceptorsConfigs, key) {
96
90
  return Promise.all(
97
- interceptorsConfigs.map(async (interceptorConfig) => {
91
+ interceptorsConfigs.map(async interceptorConfig => {
98
92
  return loadInterceptor(_require, interceptorConfig, key)
99
93
  })
100
94
  )
@@ -113,10 +107,7 @@ async function loadInterceptor (_require, interceptorConfig, key) {
113
107
  const createInterceptor = (await import(url)).default
114
108
  const interceptor = createInterceptor(options)
115
109
 
116
- const {
117
- updatableInterceptor,
118
- updateInterceptor
119
- } = createUpdatableInterceptor(interceptor)
110
+ const { updatableInterceptor, updateInterceptor } = createUpdatableInterceptor(interceptor)
120
111
 
121
112
  const interceptorCtx = { createInterceptor, updateInterceptor }
122
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.68.0",
3
+ "version": "2.69.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -37,12 +37,12 @@
37
37
  "typescript": "^5.5.4",
38
38
  "undici-oidc-interceptor": "^0.5.0",
39
39
  "why-is-node-running": "^2.2.2",
40
- "@platformatic/composer": "2.68.0",
41
- "@platformatic/node": "2.68.0",
42
- "@platformatic/service": "2.68.0",
43
- "@platformatic/sql-graphql": "2.68.0",
44
- "@platformatic/sql-mapper": "2.68.0",
45
- "@platformatic/db": "2.68.0"
40
+ "@platformatic/composer": "2.69.0",
41
+ "@platformatic/db": "2.69.0",
42
+ "@platformatic/node": "2.69.0",
43
+ "@platformatic/service": "2.69.0",
44
+ "@platformatic/sql-graphql": "2.69.0",
45
+ "@platformatic/sql-mapper": "2.69.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "@fastify/accepts": "^5.0.0",
@@ -77,13 +77,13 @@
77
77
  "undici": "^7.0.0",
78
78
  "undici-thread-interceptor": "^0.13.1",
79
79
  "ws": "^8.16.0",
80
- "@platformatic/basic": "2.68.0",
81
- "@platformatic/config": "2.68.0",
82
- "@platformatic/generators": "2.68.0",
83
- "@platformatic/itc": "2.68.0",
84
- "@platformatic/telemetry": "2.68.0",
85
- "@platformatic/ts-compiler": "2.68.0",
86
- "@platformatic/utils": "2.68.0"
80
+ "@platformatic/basic": "2.69.0",
81
+ "@platformatic/config": "2.69.0",
82
+ "@platformatic/generators": "2.69.0",
83
+ "@platformatic/itc": "2.69.0",
84
+ "@platformatic/telemetry": "2.69.0",
85
+ "@platformatic/ts-compiler": "2.69.0",
86
+ "@platformatic/utils": "2.69.0"
87
87
  },
88
88
  "scripts": {
89
89
  "test": "pnpm run lint && borp --concurrency=1 --timeout=600000 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.68.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.69.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {