@platformatic/utils
Advanced tools
Comparing version 2.22.0 to 2.23.0
@@ -15,3 +15,3 @@ 'use strict' | ||
const schemaComponents = require('./lib/schema') | ||
const { createDirectory, safeRemove } = require('./lib/directory') | ||
const { createDirectory, safeRemove, generateDashedName } = require('./lib/directory') | ||
const { withResolvers } = require('./lib/promises') | ||
@@ -22,2 +22,3 @@ const { DestinationWritable } = require('./lib/streams/destination-writable') | ||
const { checkNodeVersionForServices } = require('./lib/check-node-version') | ||
const { createRequire, loadModule } = require('./lib/modules') | ||
@@ -43,2 +44,3 @@ module.exports.FileWatcher = FileWatcher | ||
module.exports.safeRemove = safeRemove | ||
module.exports.generateDashedName = generateDashedName | ||
module.exports.withResolvers = withResolvers | ||
@@ -50,1 +52,3 @@ module.exports.DestinationWritable = DestinationWritable | ||
module.exports.checkNodeVersionForServices = checkNodeVersionForServices | ||
module.exports.createRequire = createRequire | ||
module.exports.loadModule = loadModule |
'use strict' | ||
const generateName = require('boring-name-generator') | ||
const { existsSync } = require('node:fs') | ||
@@ -7,2 +8,6 @@ const { rm, mkdir } = require('node:fs/promises') | ||
function generateDashedName () { | ||
return generateName().dashed.replace(/\s+/g, '') | ||
} | ||
async function createDirectory (path, empty = false) { | ||
@@ -36,3 +41,4 @@ if (empty) { | ||
createDirectory, | ||
safeRemove | ||
safeRemove, | ||
generateDashedName | ||
} |
'use strict' | ||
const { Writable } = require('node:stream') | ||
const { Transform } = require('node:stream') | ||
const { inspect } = require('node:util') | ||
class PinoWritable extends Writable { | ||
// PinoWritable extends from Transform to appease Yarn | ||
// https://github.com/yarnpkg/berry/blob/8bfe2d545e986993e4450072bac8b1044e5ebed7/packages/yarnpkg-shell/sources/pipe.ts#L43-L59 | ||
class PinoWritable extends Transform { | ||
#write | ||
@@ -36,2 +38,6 @@ #ignoreEmpty | ||
_read () { | ||
throw new Error('PinoWritable cannot be read') | ||
} | ||
// We don't define _writev as we have to serialize messages one by one so batching wouldn't make any sense. | ||
@@ -38,0 +44,0 @@ } |
{ | ||
"name": "@platformatic/utils", | ||
"version": "2.22.0", | ||
"version": "2.23.0", | ||
"description": "Platformatic Utils", | ||
@@ -21,3 +21,5 @@ "main": "index.js", | ||
"fastify": "^5.0.0", | ||
"neostandard": "^0.11.1", | ||
"neostandard": "^0.12.0", | ||
"pino": "^9.5.0", | ||
"pino-test": "^1.0.1", | ||
"typescript": "^5.5.4" | ||
@@ -29,2 +31,3 @@ }, | ||
"@watchable/unpromise": "^1.0.2", | ||
"boring-name-generator": "^1.0.3", | ||
"leven": "~3.1.0", | ||
@@ -31,0 +34,0 @@ "minimatch": "^8.0.4", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44890
24
1118
8
8
5
+ Addedboring-name-generator@^1.0.3
+ Addedboring-name-generator@1.0.3(transitive)
+ Addedcommander@6.2.1(transitive)
+ Addedlodash@4.17.21(transitive)