@nguniversal/common
Advanced tools
Comparing version 11.0.0-next.0 to 11.0.0-next.1
@@ -43,3 +43,3 @@ (function (global, factory) { | ||
function (d, b) { for (var p in b) | ||
if (b.hasOwnProperty(p)) | ||
if (Object.prototype.hasOwnProperty.call(b, p)) | ||
d[p] = b[p]; }; | ||
@@ -191,6 +191,6 @@ return extendStatics(d, b); | ||
}); | ||
function __exportStar(m, exports) { | ||
function __exportStar(m, o) { | ||
for (var p in m) | ||
if (p !== "default" && !exports.hasOwnProperty(p)) | ||
__createBinding(exports, m, p); | ||
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) | ||
__createBinding(o, m, p); | ||
} | ||
@@ -305,3 +305,3 @@ function __values(o) { | ||
for (var k in mod) | ||
if (Object.hasOwnProperty.call(mod, k)) | ||
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) | ||
__createBinding(result, mod, k); | ||
@@ -308,0 +308,0 @@ __setModuleDefault(result, mod); |
@@ -26,3 +26,3 @@ (function (global, factory) { | ||
function (d, b) { for (var p in b) | ||
if (b.hasOwnProperty(p)) | ||
if (Object.prototype.hasOwnProperty.call(b, p)) | ||
d[p] = b[p]; }; | ||
@@ -174,6 +174,6 @@ return extendStatics(d, b); | ||
}); | ||
function __exportStar(m, exports) { | ||
function __exportStar(m, o) { | ||
for (var p in m) | ||
if (p !== "default" && !exports.hasOwnProperty(p)) | ||
__createBinding(exports, m, p); | ||
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) | ||
__createBinding(o, m, p); | ||
} | ||
@@ -288,3 +288,3 @@ function __values(o) { | ||
for (var k in mod) | ||
if (Object.hasOwnProperty.call(mod, k)) | ||
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) | ||
__createBinding(result, mod, k); | ||
@@ -291,0 +291,0 @@ __setModuleDefault(result, mod); |
{ | ||
"name": "@nguniversal/common", | ||
"version": "11.0.0-next.0", | ||
"version": "11.0.0-next.1", | ||
"description": "Angular Universal common utilities", | ||
@@ -17,4 +17,4 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@angular/common": "^11.0.0-next.0", | ||
"@angular/core": "^11.0.0-next.0" | ||
"@angular/common": "^11.0.0-next.3", | ||
"@angular/core": "^11.0.0-next.3" | ||
}, | ||
@@ -21,0 +21,0 @@ "ng-update": { |
@@ -16,3 +16,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@nguniversal/common/schematics/add/index", ["require", "exports", "@angular-devkit/core", "@angular-devkit/schematics", "@schematics/angular/utility/dependencies", "@schematics/angular/utility/json-utils", "@schematics/angular/utility/workspace", "typescript", "@nguniversal/common/schematics/utils/index"], factory); | ||
define("@nguniversal/common/schematics/add/index", ["require", "exports", "@angular-devkit/core", "@angular-devkit/schematics", "@schematics/angular/utility/dependencies", "@schematics/angular/utility/json-file", "@schematics/angular/utility/workspace", "typescript", "@nguniversal/common/schematics/utils/index"], factory); | ||
} | ||
@@ -33,3 +33,3 @@ })(function (require, exports) { | ||
const dependencies_1 = require("@schematics/angular/utility/dependencies"); | ||
const json_utils_1 = require("@schematics/angular/utility/json-utils"); | ||
const json_file_1 = require("@schematics/angular/utility/json-file"); | ||
const workspace_1 = require("@schematics/angular/utility/workspace"); | ||
@@ -129,19 +129,10 @@ const ts = require("typescript"); | ||
} | ||
const configBuffer = host.read(tsConfigPath); | ||
if (!configBuffer) { | ||
throw new schematics_1.SchematicsException(`Could not find (${tsConfigPath})`); | ||
} | ||
const content = configBuffer.toString(); | ||
const tsConfigAst = core_1.parseJsonAst(content, core_1.JsonParseMode.Loose); | ||
if (!tsConfigAst || tsConfigAst.kind !== 'object') { | ||
throw new schematics_1.SchematicsException(`Invalid JSON AST Object (${tsConfigPath})`); | ||
} | ||
const filesAstNode = json_utils_1.findPropertyInAstObject(tsConfigAst, 'files'); | ||
const tsConfig = new json_file_1.JSONFile(host, tsConfigPath); | ||
const filesAstNode = tsConfig.get(['files']); | ||
const serverFilePath = utils_1.stripTsExtension(options.serverFileName) + '.ts'; | ||
if (filesAstNode && | ||
filesAstNode.kind === 'array' && | ||
!filesAstNode.elements.some(({ text }) => text === serverFilePath)) { | ||
const recorder = host.beginUpdate(tsConfigPath); | ||
json_utils_1.appendValueInAstArray(recorder, filesAstNode, utils_1.stripTsExtension(options.serverFileName) + '.ts'); | ||
host.commitUpdate(recorder); | ||
if (Array.isArray(filesAstNode) && !filesAstNode.some(({ text }) => text === serverFilePath)) { | ||
tsConfig.modify(['files'], [ | ||
...filesAstNode, | ||
serverFilePath | ||
]); | ||
} | ||
@@ -237,3 +228,3 @@ }); | ||
type: dependencies_1.NodeDependencyType.Dev, | ||
version: '^11.0.0-next.0', | ||
version: '^11.0.0-next.1', | ||
}); | ||
@@ -244,2 +235,2 @@ return host; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbW1vbi9zY2hlbWF0aWNzL2FkZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUFBQTs7Ozs7O09BTUc7SUFDSCwrQ0FBNkY7SUFDN0YsMkRBTW9DO0lBRXBDLDJFQUF3RztJQUN4Ryx1RUFHZ0Q7SUFDaEQscUVBQXdFO0lBQ3hFLGlDQUFpQztJQUVqQyxzRUFPa0I7SUFFbEIsTUFBTSxxQkFBcUIsR0FBRyxXQUFXLENBQUM7SUFDMUMsTUFBTSxxQkFBcUIsR0FBRyxXQUFXLENBQUM7SUFNMUMsU0FBZ0Isc0JBQXNCLENBQUMsT0FBNEI7UUFDakUsT0FBTyxDQUFNLElBQUksRUFBQyxFQUFFO1lBQ2xCLE1BQU0sYUFBYSxHQUFHLE1BQU0sa0JBQVUsQ0FBQyxJQUFJLE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W1lLnRleHQgPT09ICdmb3JSb290Jykge1xuICAgICAgICAgIGNvbnN0IGltcCA9IGdldEltcG9ydE9mSWRlbnRpZmllcih0eXBlQ2hlY2tlciwgbm9kZS5leHByZXNzaW9uLmV4cHJlc3Npb24pO1xuXG4gICAgICAgICAgaWYgKGltcCAmJiBpbXAubmFtZSA9PT0gcm91dGVyTW9kdWxlICYmIGltcC5pbXBvcnRNb2R1bGUgPT09IHJvdXRlclNvdXJjZSkge1xuICAgICAgICAgICAgcm91dGVyTW9kdWxlTm9kZSA9IG5vZGU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdHMuZm9yRWFjaENoaWxkKG5vZGUsIHZpc2l0Tm9kZSk7XG4gICAgICB9KTtcblxuICAgICAgaWYgKHJvdXRlck1vZHVsZU5vZGUpIHtcbiAgICAgICAgY29uc3QgcHJpbnQgPSBwcmludGVyLnByaW50Tm9kZShcbiAgICAgICAgICB0cy5FbWl0SGludC5VbnNwZWNpZmllZCwgYWRkSW5pdGlhbE5hdmlnYXRpb24ocm91dGVyTW9kdWxlTm9kZSksXG4gICAgICAgICAgc291cmNlRmlsZSk7XG5cbiAgICAgICAgY29uc3QgcmVjb3JkZXIgPSBob3N0LmJlZ2luVXBkYXRlKHNvdXJjZUZpbGUuZmlsZU5hbWUpO1xuICAgICAgICByZWNvcmRlci5yZW1vdmUocm91dGVyTW9kdWxlTm9kZS5nZXRTdGFydCgpLCByb3V0ZXJNb2R1bGVOb2RlLmdldFdpZHRoKCkpO1xuICAgICAgICByZWNvcmRlci5pbnNlcnRSaWdodChyb3V0ZXJNb2R1bGVOb2RlLmdldFN0YXJ0KCksIHByaW50KTtcbiAgICAgICAgaG9zdC5jb21taXRVcGRhdGUocmVjb3JkZXIpO1xuICAgICAgfVxuICAgIH0pO1xuICB9O1xufVxuXG5mdW5jdGlvbiBhZGREZXBlbmRlbmNpZXMoKTogUnVsZSB7XG4gIHJldHVybiBob3N0ID0+IHtcbiAgICBhZGRQYW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ZGRJbml0aWFsTmF2aWdhdGlvbihyb3V0ZXJNb2R1bGVOb2RlKSxcbiAgICAgICAgICBzb3VyY2VGaWxlKTtcblxuICAgICAgICBjb25zdCByZWNvcmRlciA9IGhvc3QuYmVnaW5VcGRhdGUoc291cmNlRmlsZS5maWxlTmFtZSk7XG4gICAgICAgIHJlY29yZGVyLnJlbW92ZShyb3V0ZXJNb2R1bGVOb2RlLmdldFN0YXJ0KCksIHJvdXRlck1vZHVsZU5vZGUuZ2V0V2lkdGgoKSk7XG4gICAgICAgIHJlY29yZGVyLmluc2VydFJpZ2h0KHJvdXRlck1vZHVsZU5vZGUuZ2V0U3RhcnQoKSwgcHJpbnQpO1xuICAgICAgICBob3N0LmNvbW1pdFVwZGF0ZShyZWNvcmRlcik7XG4gICAgICB9XG4gICAgfSk7XG4gIH07XG59XG5cbmZ1bmN0aW9uIGFkZERlcGVuZGVuY2llcygpOiBSdWxlIHtcbiAgcmV0dXJuIGhvc3QgPT4ge1xuICAgIGFkZFBhY2thZ2VKc29uRGVwZW5kZW5jeShob3N0LCB7XG4gICAgICBuYW1lOiAnQG5ndW5pdmVyc2FsL2J1aWxkZXJzJyxcbiAgICAgIHR5cGU6IE5vZGVEZXBlbmRlbmN5VHlwZS5EZXYsXG4gICAgICB2ZXJzaW9uOiAnXjAuMC4wLVBMQUNFSE9MREVSJyxcbiAgICB9KTtcblxuICAgIHJldHVybiBob3N0O1xuICB9O1xufVxuIl19 |
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
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
350968
2509