@ngx-env/builder
Advanced tools
Comparing version 17.3.0 to 18.0.0
@@ -1,6 +0,7 @@ | ||
import { BuilderContext } from "@angular-devkit/architect"; | ||
import { BuilderContext, BuilderOutput } from "@angular-devkit/architect"; | ||
import { ApplicationBuilderOptions } from "@angular-devkit/build-angular"; | ||
import { Observable } from "rxjs"; | ||
import { NgxEnvSchema } from "../ngx-env/ngx-env-schema"; | ||
export declare const buildWithPlugin: (options: ApplicationBuilderOptions & NgxEnvSchema, context: BuilderContext) => import("rxjs").Observable<import("@angular-devkit/build-angular/src/builders/application").ApplicationBuilderOutput>; | ||
declare const _default: import("@angular-devkit/architect/src/internal").Builder<ApplicationBuilderOptions & import("@angular-devkit/core").JsonObject>; | ||
export declare const buildWithPlugin: (options: ApplicationBuilderOptions & NgxEnvSchema, context: BuilderContext) => Observable<BuilderOutput>; | ||
declare const _default: import("@angular-devkit/architect/src/internal").Builder<any>; | ||
export default _default; |
@@ -5,3 +5,3 @@ import { BuilderContext } from "@angular-devkit/architect"; | ||
export declare const buildWithPlugin: (options: BrowserBuilderOptions & NgxEnvSchema, context: BuilderContext) => import("rxjs").Observable<import("@angular-devkit/core").JsonObject & import("@angular-devkit/architect/src/output-schema").Schema & { | ||
outputFiles?: import("@angular-devkit/build-angular/src/tools/esbuild/bundler-context").BuildOutputFile[]; | ||
outputFiles?: BuildOutputFile[]; | ||
assetFiles?: { | ||
@@ -8,0 +8,0 @@ source: string; |
@@ -40,3 +40,3 @@ "use strict"; | ||
} | ||
return (0, rxjs_1.combineLatest)([setup(), builderName(), (0, project_1.getProjectCwd)(context)]).pipe((0, rxjs_1.switchMap)(([_options, builderName, cwd]) => { | ||
return (0, rxjs_1.combineLatest)([setup(), builderName(), (0, project_1.getProjectCwd)(context)]).pipe((0, rxjs_1.switchMap)((_b) => __awaiter(void 0, [_b], void 0, function* ([_options, builderName, cwd]) { | ||
const dotenvRunOptions = Object.assign(Object.assign(Object.assign({}, options.ngxEnv), _options.ngxEnv), { global: "_NGX_ENV_", cwd }); | ||
@@ -46,5 +46,5 @@ if (builderName === "@ngx-env/builder:application") { | ||
const { full, raw } = (0, core_1.env)(Object.assign(Object.assign({}, dotenvRunOptions), { global: "_NGX_ENV_", environment: (0, get_environment_1.getEnvironment)(buildTarget.configuration) })); | ||
delete _options.ngxEnv; | ||
context.getTargetOptions = () => __awaiter(void 0, void 0, void 0, function* () { return _options; }); | ||
return (0, build_angular_1.executeDevServerBuilder)(options, context, { | ||
context.validateOptions = () => __awaiter(void 0, void 0, void 0, function* () { return _options; }); | ||
const result = (0, build_angular_1.executeDevServerBuilder)(options, context, { | ||
indexHtml: (content) => __awaiter(void 0, void 0, void 0, function* () { return (0, esbuild_index_html_1.devServerIndexHtml)(content, raw, dotenvRunOptions.runtime); }), | ||
@@ -55,2 +55,3 @@ }, { | ||
}); | ||
return result.pipe((0, rxjs_1.tap)((res) => { })); | ||
} | ||
@@ -60,5 +61,5 @@ else { | ||
} | ||
})); | ||
}))); | ||
}; | ||
exports.buildWithPlugin = buildWithPlugin; | ||
exports.default = (0, architect_1.createBuilder)(exports.buildWithPlugin); |
@@ -36,2 +36,6 @@ { | ||
}, | ||
"deployUrl": { | ||
"type": "string", | ||
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations." | ||
}, | ||
"scripts": { | ||
@@ -146,2 +150,7 @@ "description": "Global scripts to be included in the build.", | ||
}, | ||
"clearScreen": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Automatically clear the terminal screen during rebuilds." | ||
}, | ||
"optimization": { | ||
@@ -232,2 +241,9 @@ "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.", | ||
}, | ||
"define": { | ||
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"fileReplacements": { | ||
@@ -637,2 +653,3 @@ "description": "Replace compilation source files with other compilation source files in the build.", | ||
"type": "string", | ||
"default": "", | ||
"description": "Absolute path within the output." | ||
@@ -644,4 +661,3 @@ } | ||
"glob", | ||
"input", | ||
"output" | ||
"input" | ||
] | ||
@@ -659,7 +675,7 @@ }, | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
}, | ||
"with": { | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
} | ||
@@ -666,0 +682,0 @@ }, |
@@ -289,4 +289,3 @@ { | ||
"type": "string", | ||
"description": "URL where files will be deployed.", | ||
"x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." | ||
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations." | ||
}, | ||
@@ -549,2 +548,3 @@ "verbose": { | ||
"type": "string", | ||
"default": "", | ||
"description": "Absolute path within the output." | ||
@@ -556,4 +556,3 @@ } | ||
"glob", | ||
"input", | ||
"output" | ||
"input" | ||
] | ||
@@ -571,7 +570,7 @@ }, | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
}, | ||
"with": { | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
} | ||
@@ -578,0 +577,0 @@ }, |
@@ -282,4 +282,3 @@ { | ||
"type": "string", | ||
"description": "URL where files will be deployed.", | ||
"x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." | ||
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations." | ||
}, | ||
@@ -537,2 +536,3 @@ "verbose": { | ||
"type": "string", | ||
"default": "", | ||
"description": "Absolute path within the output." | ||
@@ -544,4 +544,3 @@ } | ||
"glob", | ||
"input", | ||
"output" | ||
"input" | ||
] | ||
@@ -561,7 +560,7 @@ }, | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
}, | ||
"replaceWith": { | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
} | ||
@@ -580,7 +579,7 @@ }, | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
}, | ||
"with": { | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
} | ||
@@ -587,0 +586,0 @@ }, |
@@ -16,3 +16,3 @@ { | ||
"description": "A build builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", | ||
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" | ||
"pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$" | ||
}, | ||
@@ -73,7 +73,7 @@ "port": { | ||
"type": "string", | ||
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." | ||
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders." | ||
}, | ||
"allowedHosts": { | ||
"type": "array", | ||
"description": "List of hosts that are allowed to access the dev server.", | ||
"description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders.", | ||
"default": [], | ||
@@ -90,3 +90,3 @@ "items": { | ||
"type": "boolean", | ||
"description": "Don't verify connected clients are part of allowed hosts.", | ||
"description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders.", | ||
"default": false | ||
@@ -113,2 +113,26 @@ }, | ||
}, | ||
"prebundle": { | ||
"description": "Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled. This option has no effect when using the 'browser' or other Webpack-based builders.", | ||
"oneOf": [ | ||
{ | ||
"type": "boolean" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"exclude": { | ||
"description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"exclude" | ||
] | ||
} | ||
] | ||
}, | ||
"ngxEnv": { | ||
@@ -115,0 +139,0 @@ "type": "object", |
@@ -16,3 +16,3 @@ { | ||
"description": "A builder target to extract i18n messages in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", | ||
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" | ||
"pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$" | ||
}, | ||
@@ -94,15 +94,3 @@ "format": { | ||
}, | ||
"additionalProperties": false, | ||
"anyOf": [ | ||
{ | ||
"required": [ | ||
"buildTarget" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"browserTarget" | ||
] | ||
} | ||
] | ||
"additionalProperties": false | ||
} |
@@ -357,2 +357,3 @@ { | ||
"type": "string", | ||
"default": "", | ||
"description": "Absolute path within the output." | ||
@@ -371,4 +372,3 @@ }, | ||
"glob", | ||
"input", | ||
"output" | ||
"input" | ||
] | ||
@@ -375,0 +375,0 @@ }, |
@@ -129,4 +129,3 @@ { | ||
"type": "string", | ||
"description": "URL where files will be deployed.", | ||
"x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." | ||
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations." | ||
}, | ||
@@ -323,2 +322,3 @@ "vendorChunk": { | ||
"type": "string", | ||
"default": "", | ||
"description": "Absolute path within the output." | ||
@@ -330,4 +330,3 @@ } | ||
"glob", | ||
"input", | ||
"output" | ||
"input" | ||
] | ||
@@ -347,7 +346,7 @@ }, | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
}, | ||
"replaceWith": { | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
} | ||
@@ -366,7 +365,7 @@ }, | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
}, | ||
"with": { | ||
"type": "string", | ||
"pattern": "\\.(([cm]?j|t)sx?|json)$" | ||
"pattern": "\\.(([cm]?[jt])sx?|json)$" | ||
} | ||
@@ -373,0 +372,0 @@ }, |
@@ -1,6 +0,6 @@ | ||
import { BuilderContext } from "@angular-devkit/architect"; | ||
import { executeServerBuilder, ServerBuilderOptions } from "@angular-devkit/build-angular"; | ||
import { NgxEnvSchema } from "../ngx-env/ngx-env-schema"; | ||
import { type BuilderContext } from "@angular-devkit/architect"; | ||
import { ServerBuilderOptions, executeServerBuilder } from "@angular-devkit/build-angular"; | ||
import { type NgxEnvSchema } from "../ngx-env/ngx-env-schema"; | ||
export declare const buildWithPlugin: (options: ServerBuilderOptions & NgxEnvSchema, context: BuilderContext) => ReturnType<typeof executeServerBuilder>; | ||
declare const _default: import("@angular-devkit/architect/src/internal").Builder<ServerBuilderOptions & import("@angular-devkit/core").JsonObject>; | ||
export default _default; |
@@ -6,6 +6,6 @@ "use strict"; | ||
const build_angular_1 = require("@angular-devkit/build-angular"); | ||
const webpack_plugin_1 = require("../utils/webpack-plugin"); | ||
const rxjs_1 = require("rxjs"); | ||
const get_environment_1 = require("../utils/get-environment"); | ||
const project_1 = require("../utils/project"); | ||
const get_environment_1 = require("../utils/get-environment"); | ||
const webpack_plugin_1 = require("../utils/webpack-plugin"); | ||
const buildWithPlugin = (options, context) => { | ||
@@ -12,0 +12,0 @@ return (0, rxjs_1.from)((0, project_1.getProjectCwd)(context)).pipe((0, rxjs_1.switchMap)((cwd) => (0, build_angular_1.executeServerBuilder)(options, context, (0, webpack_plugin_1.plugin)(Object.assign(Object.assign({}, options.ngxEnv), { cwd, environment: (0, get_environment_1.getEnvironment)(context.target.configuration) }), true)))); |
{ | ||
"name": "@ngx-env/builder", | ||
"version": "17.3.0", | ||
"version": "18.0.0", | ||
"description": "Easily inject environment variables into your Angular applications", | ||
@@ -28,13 +28,13 @@ "author": "chihab <chihab@gmail.com>", | ||
"dependencies": { | ||
"@dotenv-run/esbuild": "^1.3.5", | ||
"@dotenv-run/webpack": "^1.3.4", | ||
"@dotenv-run/esbuild": "^1.4.0", | ||
"@dotenv-run/webpack": "^1.4.0", | ||
"glob": "^10.3.10" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "^17.2.0", | ||
"@angular-devkit/schematics": "^17.2.0", | ||
"@angular-devkit/schematics-cli": "^17.2.0", | ||
"@angular-devkit/architect": "^0.1702.0", | ||
"@angular-devkit/core": "^17.2.0", | ||
"@angular/compiler": "^17.2.0", | ||
"@angular-devkit/build-angular": "^18.0.0", | ||
"@angular-devkit/schematics": "^18.0.0", | ||
"@angular-devkit/schematics-cli": "^18.0.0", | ||
"@angular-devkit/architect": "^0.1800.0", | ||
"@angular-devkit/core": "^18.0.0", | ||
"@angular/compiler": "^18.0.0", | ||
"@dotenv-run/core": "^1.3.4", | ||
@@ -44,11 +44,9 @@ "cpy": "^8.1.2", | ||
"ts-node": "^10.8.0", | ||
"typescript": "~5.2.2", | ||
"typescript": "^5.4.0", | ||
"rxjs": "^7.0.0", | ||
"webpack": "5.90.1" | ||
"webpack": "5.91.0" | ||
}, | ||
"peerDpendencies": { | ||
"@angular-devkit/architect": "^17.2.0", | ||
"@angular-devkit/schematics-cli": ">=12.0.0", | ||
"rxjs": "^7.0.0", | ||
"webpack": "5.90.1" | ||
"webpack": "5.91.0" | ||
}, | ||
@@ -55,0 +53,0 @@ "scripts": { |
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
175457
3700
Updated@dotenv-run/esbuild@^1.4.0
Updated@dotenv-run/webpack@^1.4.0