You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

angular-server-side-configuration

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-server-side-configuration - npm Package Compare versions

Comparing version

to
17.0.0-next.1

2

builders/browser/schema.json

@@ -219,3 +219,3 @@ {

"type": "string",
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
"description": "The full path for the new output directory, relative to the current workspace."
},

@@ -222,0 +222,0 @@ "resourcesOutputPath": {

@@ -10,2 +10,8 @@ {

"description": "A browser 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]+)?$",
"x-deprecated": "Use 'buildTarget' instead."
},
"buildTarget": {
"type": "string",
"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]+)?$"

@@ -100,2 +106,7 @@ },

},
"forceEsbuild": {
"type": "boolean",
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
"default": false
},
"additionalEnvironmentVariables": {

@@ -117,5 +128,14 @@ "type": "array",

"additionalProperties": false,
"required": [
"browserTarget"
"anyOf": [
{
"required": [
"buildTarget"
]
},
{
"required": [
"browserTarget"
]
}
]
}

@@ -22,11 +22,11 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const browserTarget = (0, architect_1.targetFromTargetString)(options.browserTarget);
const rawBrowserOptions = yield context.getTargetOptions(browserTarget);
const browserName = yield context.getBuilderNameForTarget(browserTarget);
const buildTarget = (0, architect_1.targetFromTargetString)(options.buildTarget || options.browserTarget);
const rawBrowserOptions = yield context.getTargetOptions(buildTarget);
const browserName = yield context.getBuilderNameForTarget(buildTarget);
const browserOptions = yield context.validateOptions(rawBrowserOptions, browserName);
const scheduledTarget = yield context.scheduleTarget(browserTarget);
const scheduledTarget = yield context.scheduleTarget(buildTarget);
const result = yield scheduledTarget.result;
if (!result.success) {
const buildConfig = browserTarget.configuration ? `:${browserTarget.configuration}` : '';
context.logger.warn(`ngssc: Failed build of ${browserTarget.app}:${browserTarget.target}${buildConfig}. Skipping ngssc build.`);
const buildConfig = buildTarget.configuration ? `:${buildTarget.configuration}` : '';
context.logger.warn(`ngssc: Failed build of ${buildTarget.app}:${buildTarget.target}${buildConfig}. Skipping ngssc build.`);
return result;

@@ -33,0 +33,0 @@ }

export interface Schema {
additionalEnvironmentVariables: string[];
/** @deprecated Use buildTarget instead. */
browserTarget: string;
buildTarget: string;
filePattern: string | null;
searchPattern?: string | null;
}

@@ -11,4 +11,11 @@ {

"type": "string",
"description": "The build target to execute"
"description": "A browser builder target to build in the format of `project:target[:configuration]`.",
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
"x-deprecated": "Use 'buildTarget' instead."
},
"buildTarget": {
"type": "string",
"description": "A build builder target to build in the format of `project:target[:configuration]`.",
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
},
"filePattern": {

@@ -24,3 +31,4 @@ "type": "string",

}
}
},
"anyOf": [{ "required": ["buildTarget"] }, { "required": ["browserTarget"] }]
}
{
"name": "angular-server-side-configuration",
"version": "16.0.0",
"version": "17.0.0-next.1",
"description": "Configure an angular application on the server",

@@ -30,4 +30,4 @@ "repository": {

"peerDependencies": {
"@angular/common": "^16.0.0",
"@angular/core": "^16.0.0"
"@angular/common": "^17.0.0",
"@angular/core": "^17.0.0"
},

@@ -34,0 +34,0 @@ "dependencies": {

@@ -87,3 +87,3 @@ # angular-server-side-configuration

used environment variables and generate an [ngssc.json](#ngsscjson) in the defined
`outputPath` in the referenced `browserTarget`.
`outputPath` in the referenced `buildTarget` (previously `browserTargeet`).

@@ -102,3 +102,3 @@ ```json

"additionalEnvironmentVariables": ["MANUAL_ENTRIES"],
"browserTarget": "your-project-name:build",
"buildTarget": "your-project-name:build",
// Optional

@@ -112,3 +112,3 @@ // (Defaults to the basename of the index option of the browser target)

"production": {
"browserTarget": "your-project-name:build:production"
"buildTarget": "your-project-name:build:production"
}

@@ -171,3 +171,3 @@ }

```html
<!DOCTYPE html>
<!doctype html>
<html lang="en">

@@ -260,3 +260,3 @@ <head>

# Install ngssc binary
ADD https://github.com/kyubisation/angular-server-side-configuration/releases/download/v16.0.0/ngssc_64bit /usr/sbin/ngssc
ADD https://github.com/kyubisation/angular-server-side-configuration/releases/download/v17.0.0-next.1/ngssc_64bit /usr/sbin/ngssc
RUN chmod +x /usr/sbin/ngssc

@@ -263,0 +263,0 @@

@@ -9,4 +9,9 @@ {

},
"migration-v17": {
"version": "17-next",
"description": "Updates angular-server-side-configuration to v17",
"factory": "./ng-update/index#updateToV17"
},
"dockerfile": {
"version": "16.0.0",
"version": "17.0.0-next.1",
"description": "Updates the download url for ngssc",

@@ -13,0 +18,0 @@ "factory": "./ng-update/index#dockerfile"

@@ -57,6 +57,6 @@ "use strict";

builder: 'angular-server-side-configuration:ngsscbuild',
options: Object.assign(Object.assign({}, ngsscOptions), { browserTarget: `${options.project}:build` }),
options: Object.assign(Object.assign({}, ngsscOptions), { buildTarget: `${options.project}:build` }),
configurations: {
production: {
browserTarget: `${options.project}:build:production`,
buildTarget: `${options.project}:build:production`,
},

@@ -70,6 +70,6 @@ },

return (host, context) => __awaiter(this, void 0, void 0, function* () {
var _a, _b;
var _a, _b, _c, _d;
const { project } = yield resolveWorkspace(options, host);
const buildTarget = project.targets.get('build');
const mainFile = (0, core_1.normalize)((_b = (_a = buildTarget === null || buildTarget === void 0 ? void 0 : buildTarget.options) === null || _a === void 0 ? void 0 : _a['main']) !== null && _b !== void 0 ? _b : '');
const mainFile = (0, core_1.normalize)((_d = (_b = (_a = buildTarget === null || buildTarget === void 0 ? void 0 : buildTarget.options) === null || _a === void 0 ? void 0 : _a['main']) !== null && _b !== void 0 ? _b : (_c = buildTarget === null || buildTarget === void 0 ? void 0 : buildTarget.options) === null || _c === void 0 ? void 0 : _c['browser']) !== null && _d !== void 0 ? _d : '');
if (!mainFile) {

@@ -82,2 +82,3 @@ context.logger.warn(noAppropriateInsertFileWarning);

(0, core_1.join)((0, core_1.dirname)(mainFile), 'environments/environment.ts'),
(0, core_1.join)((0, core_1.dirname)(mainFile), 'app/app.config.ts'),
(0, core_1.join)((0, core_1.dirname)(mainFile), 'app/app.module.ts'),

@@ -114,3 +115,3 @@ (0, core_1.join)((0, core_1.dirname)(mainFile), 'app/app.component.ts'),

* const complexValue = JSON.parse(process.env['COMPLEX_JSON_VALUE]);
*
*
* Please note that process.env[variable] cannot be resolved. Please directly use strings.

@@ -117,0 +118,0 @@ */

import { Rule } from '@angular-devkit/schematics';
export declare function updateToV15(): Rule;
export declare function updateToV17(): Rule;
export declare function dockerfile(): Rule;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dockerfile = exports.updateToV15 = void 0;
exports.dockerfile = exports.updateToV17 = exports.updateToV15 = void 0;
const core_1 = require("@angular-devkit/core");

@@ -30,2 +30,27 @@ const workspace_1 = require("@schematics/angular/utility/workspace");

exports.updateToV15 = updateToV15;
function updateToV17() {
return (_tree, context) => {
return (0, workspace_1.updateWorkspace)((workspace) => {
context.logger.info(`Renaming 'browserTarget' to 'buildTarget'.`);
workspace.projects.forEach((project, name) => {
const ngsscbuild = project.targets.get('ngsscbuild');
if (!ngsscbuild || !ngsscbuild.options) {
return;
}
if ('browserTarget' in ngsscbuild.options) {
ngsscbuild.options['buildTarget'] = ngsscbuild.options['browserTarget'];
delete ngsscbuild.options['browserTarget'];
}
Object.keys(ngsscbuild.configurations || {})
.filter((c) => 'browserTarget' in ngsscbuild.configurations[c])
.forEach((c) => {
ngsscbuild.configurations[c]['buildTarget'] =
ngsscbuild.configurations[c]['browserTarget'];
delete ngsscbuild.configurations[c]['browserTarget'];
});
});
});
};
}
exports.updateToV17 = updateToV17;
function dockerfile() {

@@ -32,0 +57,0 @@ return (tree) => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet