angular2-universal
Advanced tools
Comparing version 2.0.11 to 2.1.0-rc.1
@@ -1,1 +0,1 @@ | ||
export * from './browser'; | ||
export * from './browser/index'; |
@@ -5,2 +5,3 @@ "use strict"; | ||
} | ||
__export(require('./browser')); | ||
__export(require('./browser/index')); | ||
//# sourceMappingURL=browser.js.map |
@@ -8,1 +8,2 @@ "use strict"; | ||
__export(require('../common')); | ||
//# sourceMappingURL=browser.js.map |
"use strict"; | ||
exports.isBrowser = true; | ||
exports.isNode = false; | ||
//# sourceMappingURL=env.js.map |
@@ -9,1 +9,2 @@ "use strict"; | ||
exports.default = browserUniversal; | ||
//# sourceMappingURL=index.js.map |
@@ -1,11 +0,11 @@ | ||
import { PlatformRef } from '@angular/core'; | ||
export declare class OpaqueToken { | ||
private _desc; | ||
constructor(_desc: string); | ||
toString(): string; | ||
} | ||
import { PlatformRef, OpaqueToken } from '@angular/core'; | ||
export declare const UNIVERSAL_CACHE: OpaqueToken; | ||
export declare const AUTO_PREBOOT: OpaqueToken; | ||
export declare function universalCacheFactory(): any; | ||
export declare function appIdFactory(): any; | ||
export declare function appBootstrapListenerFactory(autoPreboot: boolean): typeof prebootComplete; | ||
export declare function prebootComplete(value?: any): any; | ||
export declare class UniversalModule { | ||
constructor(sharedStylesHost: any); | ||
static withConfig(config?: {}): { | ||
static withConfig(_config?: any): { | ||
ngModule: UniversalModule; | ||
@@ -12,0 +12,0 @@ providers: any[]; |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
var core_1 = require('@angular/core'); | ||
@@ -30,16 +18,37 @@ var http_1 = require('@angular/http'); | ||
} | ||
var OpaqueToken = (function () { | ||
function OpaqueToken(_desc) { | ||
this._desc = _desc; | ||
var SharedStylesHost = platform_browser_1.__platform_browser_private__.SharedStylesHost; | ||
exports.UNIVERSAL_CACHE = new core_1.OpaqueToken('UNIVERSAL_CACHE'); | ||
exports.AUTO_PREBOOT = new core_1.OpaqueToken('AUTO_PREBOOT'); | ||
function universalCacheFactory() { | ||
var _win = window; | ||
var CACHE = Object.assign({}, _win.UNIVERSAL_CACHE || {}); | ||
delete _win.UNIVERSAL_CACHE; | ||
return CACHE; | ||
} | ||
exports.universalCacheFactory = universalCacheFactory; | ||
function appIdFactory() { | ||
var _win = window; | ||
var CACHE = _win.UNIVERSAL_CACHE || {}; | ||
var appId = null; | ||
if (CACHE.APP_ID) { | ||
appId = CACHE.APP_ID; | ||
} | ||
OpaqueToken.prototype.toString = function () { return "Token " + this._desc; }; | ||
OpaqueToken = __decorate([ | ||
core_1.Injectable(), | ||
__metadata('design:paramtypes', [String]) | ||
], OpaqueToken); | ||
return OpaqueToken; | ||
}()); | ||
exports.OpaqueToken = OpaqueToken; | ||
var SharedStylesHost = platform_browser_1.__platform_browser_private__.SharedStylesHost; | ||
exports.UNIVERSAL_CACHE = new OpaqueToken('UNIVERSAL_CACHE'); | ||
else { | ||
appId = _appIdRandomProviderFactory(); | ||
} | ||
return appId; | ||
} | ||
exports.appIdFactory = appIdFactory; | ||
function appBootstrapListenerFactory(autoPreboot) { | ||
return autoPreboot ? prebootComplete : function () { }; | ||
} | ||
exports.appBootstrapListenerFactory = appBootstrapListenerFactory; | ||
function prebootComplete(value) { | ||
var _win = window; | ||
if (_win && prebootClient) { | ||
setTimeout(function () { return prebootClient().complete(); }); | ||
} | ||
return value; | ||
} | ||
exports.prebootComplete = prebootComplete; | ||
var UniversalModule = (function () { | ||
@@ -49,4 +58,4 @@ function UniversalModule(sharedStylesHost) { | ||
var styles = Array.prototype.slice.call(domStyles) | ||
.filter(function (style) { return style.innerText.indexOf('_ng') !== -1; }) | ||
.map(function (style) { return style.innerText; }); | ||
.filter(function (style) { return (style.innerText || style.textContent).indexOf('_ng') !== -1; }) | ||
.map(function (style) { return (style.innerText || style.textContent); }); | ||
styles.forEach(function (style) { | ||
@@ -57,58 +66,50 @@ sharedStylesHost._stylesSet.add(style); | ||
} | ||
UniversalModule.withConfig = function (config) { | ||
if (config === void 0) { config = {}; } | ||
UniversalModule.withConfig = function (_config) { | ||
if (_config === void 0) { _config = {}; } | ||
var providers = []; | ||
if (typeof _config.autoPreboot === 'boolean') { | ||
providers.push({ | ||
provide: exports.AUTO_PREBOOT, | ||
useValue: _config.autoPreboot, | ||
}); | ||
} | ||
return { | ||
ngModule: UniversalModule, | ||
providers: [] | ||
providers: providers, | ||
}; | ||
}; | ||
UniversalModule = __decorate([ | ||
core_1.NgModule({ | ||
imports: [], | ||
exports: [ | ||
platform_browser_1.BrowserModule, | ||
http_1.HttpModule, | ||
http_1.JsonpModule | ||
], | ||
providers: [ | ||
{ | ||
provide: exports.UNIVERSAL_CACHE, | ||
useFactory: function () { | ||
var _win = window; | ||
var CACHE = Object.assign({}, _win.UNIVERSAL_CACHE || {}); | ||
delete _win.UNIVERSAL_CACHE; | ||
return CACHE; | ||
} | ||
}, | ||
{ | ||
provide: core_1.APP_ID, | ||
useFactory: function () { | ||
var _win = window; | ||
var CACHE = _win.UNIVERSAL_CACHE || {}; | ||
var appId = null; | ||
if (CACHE.APP_ID) { | ||
appId = CACHE.APP_ID; | ||
} | ||
else { | ||
appId = _appIdRandomProviderFactory(); | ||
} | ||
return appId; | ||
}, | ||
deps: [] | ||
}, | ||
{ | ||
multi: true, | ||
provide: core_1.APP_BOOTSTRAP_LISTENER, | ||
useValue: function () { | ||
var _win = window; | ||
if (_win && prebootClient) { | ||
setTimeout(function () { return prebootClient().complete(); }); | ||
} | ||
} | ||
} | ||
] | ||
}), | ||
__param(0, core_1.Inject(SharedStylesHost)), | ||
__metadata('design:paramtypes', [Object]) | ||
], UniversalModule); | ||
UniversalModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
imports: [], | ||
exports: [ | ||
platform_browser_1.BrowserModule, | ||
http_1.HttpModule, | ||
http_1.JsonpModule | ||
], | ||
providers: [ | ||
{ | ||
provide: exports.UNIVERSAL_CACHE, | ||
useFactory: universalCacheFactory, | ||
}, | ||
{ | ||
provide: core_1.APP_ID, | ||
useFactory: appIdFactory, | ||
deps: [] | ||
}, | ||
{ | ||
provide: exports.AUTO_PREBOOT, | ||
useValue: true | ||
}, | ||
{ | ||
multi: true, | ||
provide: core_1.APP_BOOTSTRAP_LISTENER, | ||
useFactory: appBootstrapListenerFactory, | ||
deps: [exports.AUTO_PREBOOT], | ||
}, | ||
] | ||
},] }, | ||
]; | ||
UniversalModule.ctorParameters = [ | ||
{ type: undefined, decorators: [{ type: core_1.Inject, args: [SharedStylesHost,] },] }, | ||
]; | ||
return UniversalModule; | ||
@@ -123,1 +124,2 @@ }()); | ||
; | ||
//# sourceMappingURL=universal-module.js.map |
@@ -36,2 +36,3 @@ "use strict"; | ||
} | ||
return null; | ||
}; | ||
@@ -44,2 +45,3 @@ ZoneStore.prototype.set = function (key, value) { | ||
} | ||
return null; | ||
}; | ||
@@ -53,1 +55,2 @@ ZoneStore.prototype.has = function (key) { | ||
exports.ZoneStore = ZoneStore; | ||
//# sourceMappingURL=index.js.map |
@@ -6,1 +6,2 @@ "use strict"; | ||
__export(require('angular2-platform-node')); | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
export * from './node'; | ||
export * from './node/index'; |
@@ -5,2 +5,3 @@ "use strict"; | ||
} | ||
__export(require('./node')); | ||
__export(require('./node/index')); | ||
//# sourceMappingURL=node.js.map |
"use strict"; | ||
exports.isBrowser = false; | ||
exports.isNode = true; | ||
//# sourceMappingURL=env.js.map |
@@ -9,1 +9,2 @@ "use strict"; | ||
exports.default = universalNode; | ||
//# sourceMappingURL=index.js.map |
@@ -10,1 +10,2 @@ "use strict"; | ||
__export(require('../lib')); | ||
//# sourceMappingURL=node.js.map |
export declare class ProxyElement { | ||
private __zone?; | ||
private __zone; | ||
readonly _zone: any; | ||
@@ -18,3 +18,3 @@ constructor(__zone?: any); | ||
export declare class ProxyDocument { | ||
private __zone?; | ||
private __zone; | ||
readonly _zone: any; | ||
@@ -29,2 +29,2 @@ constructor(__zone?: any); | ||
export declare function createDocumentProxy(): ProxyDocument; | ||
export declare function createGlobalProxy(): any; | ||
export declare function createGlobalProxy(): ProxyDocument; |
@@ -197,5 +197,6 @@ "use strict"; | ||
}, | ||
set: function (newValue) { | ||
set: function (_newValue) { | ||
} | ||
}); | ||
return document; | ||
} | ||
@@ -223,1 +224,2 @@ exports.createGlobalProxy = createGlobalProxy; | ||
} | ||
//# sourceMappingURL=proxy-document.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require('@angular/core'); | ||
@@ -30,14 +21,15 @@ var lib_1 = require('../lib'); | ||
}; | ||
UniversalModule = __decorate([ | ||
core_1.NgModule({ | ||
exports: [ | ||
lib_1.NodeModule, | ||
lib_1.NodeHttpModule, | ||
lib_1.NodeJsonpModule | ||
] | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], UniversalModule); | ||
UniversalModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
exports: [ | ||
lib_1.NodeModule, | ||
lib_1.NodeHttpModule, | ||
lib_1.NodeJsonpModule | ||
] | ||
},] }, | ||
]; | ||
UniversalModule.ctorParameters = []; | ||
return UniversalModule; | ||
}()); | ||
exports.UniversalModule = UniversalModule; | ||
//# sourceMappingURL=universal-module.js.map |
@@ -15,4 +15,8 @@ { | ||
"browser.js", | ||
"browser.js.map", | ||
"browser.metadata.json", | ||
"browser.d.ts", | ||
"node.js", | ||
"node.js.map", | ||
"node.metadata.json", | ||
"node.d.ts", | ||
@@ -23,3 +27,3 @@ "LICENSE", | ||
"dependencies": { | ||
"angular2-platform-node": "~2.0.11", | ||
"angular2-platform-node": "~2.1.0-rc.1", | ||
"css": "^2.2.1", | ||
@@ -73,3 +77,3 @@ "js-beautify": "^1.6.4", | ||
], | ||
"version": "2.0.11", | ||
"version": "2.1.0-rc.1", | ||
"homepage": "https://github.com/angular/universal", | ||
@@ -76,0 +80,0 @@ "license": "MIT", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
52104
55
574
1
+ Addedangular2-platform-node@2.1.0-rc.1(transitive)
- Removedangular2-platform-node@2.0.11(transitive)