@angular/localize
Advanced tools
Comparing version 9.1.4 to 9.1.5
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v9.1.4 | ||
* @license Angular v9.1.5 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@angular/localize", | ||
"version": "9.1.4", | ||
"version": "9.1.5", | ||
"description": "Angular - library for localizing messages", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/localize.umd.js", |
@@ -16,3 +16,3 @@ /** | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/localize/schematics/ng-add", ["require", "exports", "tslib", "@angular-devkit/core", "@angular-devkit/schematics", "@schematics/angular/utility/config", "@schematics/angular/utility/project-targets", "@schematics/angular/utility/validation", "@schematics/angular/utility/workspace-models"], factory); | ||
define("@angular/localize/schematics/ng-add", ["require", "exports", "tslib", "@angular-devkit/core", "@angular-devkit/schematics", "@schematics/angular/utility/workspace", "@schematics/angular/utility/workspace-models"], factory); | ||
} | ||
@@ -25,29 +25,53 @@ })(function (require, exports) { | ||
var schematics_1 = require("@angular-devkit/schematics"); | ||
var config_1 = require("@schematics/angular/utility/config"); | ||
var project_targets_1 = require("@schematics/angular/utility/project-targets"); | ||
var validation_1 = require("@schematics/angular/utility/validation"); | ||
var workspace_1 = require("@schematics/angular/utility/workspace"); | ||
var workspace_models_1 = require("@schematics/angular/utility/workspace-models"); | ||
exports.localizePolyfill = "import '@angular/localize/init';"; | ||
function getAllOptionValues(host, projectName, builderName, optionName) { | ||
var targets = project_targets_1.getProjectTargets(host, projectName); | ||
// Find all targets of a specific build in a project. | ||
var builderTargets = Object.values(targets).filter(function (target) { return target.builder === builderName; }); | ||
// Get all options contained in target configuration partials. | ||
var configurationOptions = builderTargets.filter(function (t) { return t.configurations; }) | ||
.map(function (t) { return Object.values(t.configurations); }) | ||
.reduce(function (acc, cur) { return acc.concat.apply(acc, tslib_1.__spread(cur)); }, []); | ||
// Now we have all option sets. We can use it to find all references to a given property. | ||
var allOptions = tslib_1.__spread(builderTargets.map(function (t) { return t.options; }), configurationOptions); | ||
// Get all values for the option name and dedupe them. | ||
// Deduping will only work for primitives, but the keys we want here are strings so it's ok. | ||
var optionValues = allOptions.filter(function (o) { return o[optionName]; }) | ||
.map(function (o) { return o[optionName]; }) | ||
.reduce(function (acc, cur) { return !acc.includes(cur) ? acc.concat(cur) : acc; }, []); | ||
function getRelevantTargetDefinitions(project, builderName) { | ||
var definitions = []; | ||
project.targets.forEach(function (target) { | ||
if (target.builder === builderName) { | ||
definitions.push(target); | ||
} | ||
}); | ||
return definitions; | ||
} | ||
function getOptionValuesForTargetDefinition(definition, optionName) { | ||
var optionValues = []; | ||
if (definition.options && optionName in definition.options) { | ||
var optionValue = definition.options[optionName]; | ||
if (typeof optionValue === 'string') { | ||
optionValues.push(optionValue); | ||
} | ||
} | ||
if (!definition.configurations) { | ||
return optionValues; | ||
} | ||
Object.values(definition.configurations) | ||
.forEach(function (configuration) { | ||
if (configuration && optionName in configuration) { | ||
var optionValue = configuration[optionName]; | ||
if (typeof optionValue === 'string') { | ||
optionValues.push(optionValue); | ||
} | ||
} | ||
}); | ||
return optionValues; | ||
} | ||
function prendendToTargetOptionFile(projectName, builderName, optionName, str) { | ||
function getFileListForRelevantTargetDefinitions(project, builderName, optionName) { | ||
var fileList = []; | ||
var definitions = getRelevantTargetDefinitions(project, builderName); | ||
definitions.forEach(function (definition) { | ||
var optionValues = getOptionValuesForTargetDefinition(definition, optionName); | ||
optionValues.forEach(function (filePath) { | ||
if (fileList.indexOf(filePath) === -1) { | ||
fileList.push(filePath); | ||
} | ||
}); | ||
}); | ||
return fileList; | ||
} | ||
function prependToTargetFiles(project, builderName, optionName, str) { | ||
return function (host) { | ||
// Get all known polyfills for browser builders on this project. | ||
var optionValues = getAllOptionValues(host, projectName, builderName, optionName); | ||
optionValues.forEach(function (path) { | ||
var fileList = getFileListForRelevantTargetDefinitions(project, builderName, optionName); | ||
fileList.forEach(function (path) { | ||
var data = host.read(path); | ||
@@ -72,17 +96,29 @@ if (!data) { | ||
function default_1(options) { | ||
return function (host) { | ||
options.name = options.name || config_1.getWorkspace(host).defaultProject; | ||
if (!options.name) { | ||
throw new Error('Please specify a project using "--name project-name"'); | ||
} | ||
validation_1.validateProjectName(options.name); | ||
var localizeStr = "/***************************************************************************************************\n * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.\n */\n" + exports.localizePolyfill + "\n"; | ||
return schematics_1.chain([ | ||
prendendToTargetOptionFile(options.name, workspace_models_1.Builders.Browser, 'polyfills', localizeStr), | ||
prendendToTargetOptionFile(options.name, workspace_models_1.Builders.Server, 'main', localizeStr), | ||
]); | ||
}; | ||
var _this = this; | ||
return function (host) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var workspace, project, localizeStr; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
if (!options.name) { | ||
throw new schematics_1.SchematicsException('Option "name" is required.'); | ||
} | ||
return [4 /*yield*/, workspace_1.getWorkspace(host)]; | ||
case 1: | ||
workspace = _a.sent(); | ||
project = workspace.projects.get(options.name); | ||
if (!project) { | ||
throw new schematics_1.SchematicsException("Invalid project name (" + options.name + ")"); | ||
} | ||
localizeStr = "/***************************************************************************************************\n * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.\n */\n" + exports.localizePolyfill + "\n"; | ||
return [2 /*return*/, schematics_1.chain([ | ||
prependToTargetFiles(project, workspace_models_1.Builders.Browser, 'polyfills', localizeStr), | ||
prependToTargetFiles(project, workspace_models_1.Builders.Server, 'main', localizeStr), | ||
])]; | ||
} | ||
}); | ||
}); }; | ||
} | ||
exports.default = default_1; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zY2hlbWF0aWNzL25nLWFkZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7R0FRRzs7Ozs7Ozs7Ozs7OztJQUVILDZDQUErQztJQUMvQyx5REFBNkQ7SUFDN0QsNkRBQWdFO0lBQ2hFLCtFQUE4RTtJQUM5RSxxRUFBMkU7SUFDM0UsaUZBQWdIO0lBS25HLFFBQUEsZ0JBQWdCLEdBQUcsa0NBQWtDLENBQUM7SUFFbkUsU0FBUyxrQkFBa0IsQ0FDdkIsSUFBVSxFQUFFLFdBQ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B0aW9ucy5uYW1lIHx8IGdldFdvcmtzcGFjZShob3N0KS5kZWZhdWx0UHJvamVjdDtcbiAgICBpZiAoIW9wdGlvbnMubmFtZSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdQbGVhc2Ugc3BlY2lmeSBhIHByb2plY3QgdXNpbmcgXCItLW5hbWUgcHJvamVjdC1uYW1lXCInKTtcbiAgICB9XG4gICAgdmFsaWRhdGVQcm9qZWN0TmFtZShvcHRpb25zLm5hbWUpO1xuXG4gICAgY29uc3QgbG9jYWxpemVTdHIgPVxuICAgICAgICBgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuICogTG9hZCBcXGAkbG9jYWxpemVcXGAgb250byB0aGUgZ2xvYmFsIHNjb3BlIC0gdXNlZCBpZiBpMThuIHRhZ3MgYXBwZWFyIGluIEFuZ3VsYXIgdGVtcGxhdGVzLlxuICovXG4ke2xvY2FsaXplUG9seWZpbGx9XG5gO1xuXG4gICAgcmV0dXJuIGNoYWluKFtcbiAgICAgIHByZW5kZW5kVG9UYXJnZXRPcHRpb25GaWxlKG9wdGlvbnMubmFtZSwgQnVpbGRlcnMuQnJvd3NlciwgJ3BvbHlmaWxscycsIGxvY2FsaXplU3RyKSxcbiAgICAgIHByZW5kZW5kVG9UYXJnZXRPcHRpb25GaWxlKG9wdGlvbnMubmFtZSwgQnVpbGRlcnMuU2VydmVyLCAnbWFpbicsIGxvY2FsaXplU3RyKSxcbiAgICBdKTtcbiAgfTtcbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zY2hlbWF0aWNzL25nLWFkZC9pbmRleC50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2plY3QsIEJ1aWxkZXJzLlNlcnZlciwgJ21haW4nLCBsb2NhbGl6ZVN0ciksXG4gICAgXSk7XG4gIH07XG59XG4iXX0= |
@@ -338,3 +338,3 @@ (function (factory) { | ||
var location = path.node.loc; | ||
var file = path.hub.file.ops.fileName; | ||
var file = path.hub.file.opts.filename; | ||
if (!location || !file) { | ||
@@ -349,2 +349,2 @@ return undefined; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlX2ZpbGVfdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zcmMvdG9vbHMvc3JjL3RyYW5zbGF0ZS9zb3VyY2VfZmlsZXMvc291cmNlX2ZpbGVfdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0lBQUE7Ozs7OztPQU1HO0lBQ0gsOENBQW1JO0lBRW5JLGdDQUFrQztJQUlsQzs7Ozs7T0FLRztJQUNILFNBQWdCLFVBQVUsQ0FDdEIsVUFBb0IsRUFBRSxZQUFvQjtRQUM1QyxPQUFPLGlCQUFpQixDQUFDLFVBQVUsRUFBRSxZQUFZLENBQUMsSUFBSSxrQkFBa0IsQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUN2RixDQUFDO0lBSEQsZ0NBR0M7SUFFRDs7Ozs7T0FLRztJQUNILFNBQWdCLGlCQUFpQixDQUM3QixVQUFvQixFQUFFLElBQVk7UUFDcEMsT0FBTyxVQUFVLENBQUMsWUFBWSxFQUFFLElBQUksVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssSUFBSSxDQUFDO0lBQ3BFLENBQUM7SUFIRCw4Q0FHQztJQUVEOzs7T0FHRztJQUNILFNBQWdCLGtCQUFrQixDQUFDLFVBQWtDO1FBQ25FLE9BQU8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G91ciBjb2RlLlxuICByZXR1cm4ge3N0YXJ0OiB7Li4ubG9jYXRpb24uc3RhcnR9LCBlbmQ6IHsuLi5sb2NhdGlvbi5lbmR9LCBmaWxlfTtcbn1cbiJdfQ== |
Sorry, the diff of this file is not supported yet
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
823803
6894