❯ DEBUG=* npx @practica/create-node-app interactive
npx: installed 368 in 14.066s
(node:25262) UnhandledPromiseRejectionWarning: Error: Command failed: npx turbo run build
WARNING cannot find a .git folder. Falling back to manual file hashing (which may be slower). If you are running this build in a pruned directory, you can ignore this message. Otherwise, please initialize a git repository in the root of your monorepo
@practica/jwt-token-verifier:build: ERROR: command finished with error: command (libraries/jwt-token-verifier) npm run build exited (1)
command (libraries/jwt-token-verifier) npm run build exited (1)
• Packages in scope: @practica/configuration-provider, @practica/error-handling, @practica/jwt-token-verifier, @practica/logger, @practica/validation, order-service
Added the logs of the commands by adding to execa
options this:
await execa("npm", ["install"], {
cwd: targetDirectory,
stdout: process.stdout,
stderr: process.stderr,
});
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If in AMD than use the regular image | |
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.23 as AMD | |
COPY elasticsearch.yml /usr/share/elasticsearch/config/ | |
COPY jvm.options /usr/share/elasticsearch/config/ | |
RUN mkdir -p /usr/share/elasticsearch-data-and-logs/data /usr/share/elasticsearch-data-and-logs/logs | |
RUN chmod 777 /usr/share/elasticsearch-data-and-logs/data /usr/share/elasticsearch-data-and-logs/logs | |
# If on ARM we build it ourselves |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SchemaOptions, TEnum, Type } from '@sinclair/typebox'; | |
import { EnumValues } from 'enum-values'; | |
function getEnumDescription(e: any, name?: string): string | undefined { | |
const enumValuesDesc = EnumValues.getNamesAndValues(e) | |
.map(({ name, value }) => `\`${value}\` - ${name}`) | |
.join('\n'); | |
if (!name) { | |
return enumValuesDesc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nock from 'nock'; | |
import { Server } from 'http'; | |
const kHttpServerListen = Symbol('kHttpServerListen'); | |
const openServerPorts = new Set<number>(); | |
function allowRemoteHttpRequestsOnlyToOurServer() { | |
nock.disableNetConnect(); | |
nock.enableNetConnect(host => { |
❯ jest --coverage=true
console.log
test
at log (index.js:12:21)
PASS ./index.test.js
work
This is a zx
script that fix bundle install
How to run:
The
bundle-install
file should be without extension (but not required) added the extension to make GitHub syntax highlighting workSo from now we just gonna use
bundle-install
instead ofbundle-install.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ts from 'typescript'; | |
import path from 'node:path'; | |
import Debug from 'debug'; | |
const debug = Debug('type-check-only-project-files'); | |
// ---------------------------------------------------------------- | |
// This file is a helper file that can be used to run type check | |
// only for the files that in the project and not for any other file |
OlderNewer