@adonisjs/assembler
Advanced tools
Comparing version 7.1.0 to 7.1.1
// src/bundler.ts | ||
import slash from "slash"; | ||
import dedent from "dedent"; | ||
import fs from "node:fs/promises"; | ||
import { relative as relative2 } from "node:path"; | ||
import { fileURLToPath as fileURLToPath2 } from "node:url"; | ||
import { join as join2, relative as relative2 } from "node:path"; | ||
import { cliui } from "@poppinss/cliui"; | ||
@@ -250,2 +251,24 @@ import { detectPackageManager } from "@antfu/install-pkg"; | ||
/** | ||
* Rewrite the ace file since the original one | ||
* is importing ts-node which is not installed | ||
* in a production environment. | ||
*/ | ||
async #createAceFile(outDir) { | ||
const aceFileLocation = join2(outDir, "ace.js"); | ||
const aceFileContent = dedent( | ||
/* JavaScript */ | ||
` | ||
/** | ||
* This file is auto-generated by the build process. | ||
* If you had any custom code inside this file, then | ||
* instead write it inside the "bin/console.js" file. | ||
*/ | ||
await import('./bin/console.js') | ||
` | ||
); | ||
await fs.writeFile(aceFileLocation, aceFileContent); | ||
this.#logger.info("rewrited ace file", { suffix: this.#getRelativeName(aceFileLocation) }); | ||
} | ||
/** | ||
* Set a custom CLI UI logger | ||
@@ -273,3 +296,3 @@ */ | ||
const buildCompleted = await this.#runTsc(outDir); | ||
await copyFiles(["ace.js"], this.#cwdPath, outDir); | ||
await this.#createAceFile(outDir); | ||
if (!buildCompleted && stopOnError) { | ||
@@ -276,0 +299,0 @@ await this.#cleanupBuildDirectory(outDir); |
{ | ||
"name": "@adonisjs/assembler", | ||
"description": "Provides utilities to run AdonisJS development server and build project for production", | ||
"version": "7.1.0", | ||
"version": "7.1.1", | ||
"engines": { | ||
@@ -37,13 +37,13 @@ "node": ">=18.16.0" | ||
"devDependencies": { | ||
"@adonisjs/application": "^8.0.0", | ||
"@adonisjs/application": "^8.0.2", | ||
"@adonisjs/eslint-config": "^1.2.1", | ||
"@adonisjs/prettier-config": "^1.2.1", | ||
"@adonisjs/tsconfig": "^1.2.1", | ||
"@commitlint/cli": "^18.4.4", | ||
"@commitlint/config-conventional": "^18.4.4", | ||
"@commitlint/cli": "^18.5.0", | ||
"@commitlint/config-conventional": "^18.5.0", | ||
"@japa/assert": "^2.1.0", | ||
"@japa/file-system": "^2.1.0", | ||
"@japa/file-system": "^2.2.0", | ||
"@japa/runner": "^3.1.1", | ||
"@japa/snapshot": "^2.0.4", | ||
"@swc/core": "^1.3.104", | ||
"@swc/core": "^1.3.105", | ||
"@types/node": "^20.11.5", | ||
@@ -54,3 +54,2 @@ "@types/picomatch": "^2.3.3", | ||
"cross-env": "^7.0.3", | ||
"dedent": "^1.5.1", | ||
"del-cli": "^5.0.0", | ||
@@ -68,3 +67,3 @@ "eslint": "^8.56.0", | ||
"dependencies": { | ||
"@adonisjs/env": "^5.0.0", | ||
"@adonisjs/env": "^5.0.1", | ||
"@antfu/install-pkg": "^0.3.1", | ||
@@ -74,2 +73,3 @@ "@poppinss/chokidar-ts": "^4.1.3", | ||
"cpy": "^11.0.0", | ||
"dedent": "^1.5.1", | ||
"execa": "^8.0.1", | ||
@@ -76,0 +76,0 @@ "fast-glob": "^3.3.2", |
Sorry, the diff of this file is not supported yet
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
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
170725
26
2007
15
+ Addeddedent@^1.5.1
+ Addeddedent@1.5.3(transitive)
Updated@adonisjs/env@^5.0.1