repackaging: all the repackaging changes squashed
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {global} from 'angular2/src/facade/lang';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {global} from '../../src/facade/lang';
|
||||
|
||||
let _nextRequestId = 0;
|
||||
export const JSONP_HOME = '__ng_jsonp__';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
/**
|
||||
* A backend for http that uses the `XMLHttpRequest` browser API.
|
||||
|
@ -3,10 +3,10 @@ import {ReadyState, RequestMethod, ResponseType} from '../enums';
|
||||
import {Request} from '../static_request';
|
||||
import {Response} from '../static_response';
|
||||
import {ResponseOptions, BaseResponseOptions} from '../base_response_options';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {BrowserJsonp} from './browser_jsonp';
|
||||
import {makeTypeError} from 'angular2/src/facade/exceptions';
|
||||
import {StringWrapper, isPresent} from 'angular2/src/facade/lang';
|
||||
import {makeTypeError} from '../../src/facade/exceptions';
|
||||
import {StringWrapper, isPresent} from '../../src/facade/lang';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observer} from 'rxjs/Observer';
|
||||
|
||||
|
@ -3,10 +3,10 @@ import {ReadyState, RequestMethod, ResponseType} from '../enums';
|
||||
import {Request} from '../static_request';
|
||||
import {Response} from '../static_response';
|
||||
import {Headers} from '../headers';
|
||||
import {ResponseOptions, BaseResponseOptions} from '../base_response_options';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {ResponseOptions} from '../base_response_options';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {BrowserXhr} from './browser_xhr';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observer} from 'rxjs/Observer';
|
||||
import {isSuccess, getResponseURL} from '../http_utils';
|
||||
@ -102,7 +102,7 @@ export class XHRConnection implements Connection {
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
* import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from 'angular2/http';
|
||||
* import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from '@angular/http';
|
||||
* @Component({
|
||||
* viewProviders: [
|
||||
* HTTP_PROVIDERS,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {isPresent, isString} from 'angular2/src/facade/lang';
|
||||
import {isPresent, isString} from '../src/facade/lang';
|
||||
import {Headers} from './headers';
|
||||
import {RequestMethod} from './enums';
|
||||
import {RequestOptionsArgs} from './interfaces';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {URLSearchParams} from './url_search_params';
|
||||
import {normalizeMethodName} from './http_utils';
|
||||
|
||||
@ -19,7 +19,7 @@ import {normalizeMethodName} from './http_utils';
|
||||
* ### Example ([live demo](http://plnkr.co/edit/7Wvi3lfLq41aQPKlxB4O?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* import {RequestOptions, Request, RequestMethod} from 'angular2/http';
|
||||
* import {RequestOptions, Request, RequestMethod} from '@angular/http';
|
||||
*
|
||||
* var options = new RequestOptions({
|
||||
* method: RequestMethod.Post,
|
||||
@ -75,7 +75,7 @@ export class RequestOptions {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/6w8XA8YTkDRcPYpdB9dk?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* import {RequestOptions, Request, RequestMethod} from 'angular2/http';
|
||||
* import {RequestOptions, Request, RequestMethod} from '@angular/http';
|
||||
*
|
||||
* var options = new RequestOptions({
|
||||
* method: RequestMethod.Post
|
||||
@ -117,9 +117,9 @@ export class RequestOptions {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/LEKVSx?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* import {provide} from 'angular2/core';
|
||||
* import {bootstrap} from 'angular2/platform/browser';
|
||||
* import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from 'angular2/http';
|
||||
* import {provide} from '@angular/core';
|
||||
* import {bootstrap} from '@angular/platform-browser/browser';
|
||||
* import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from '@angular/http';
|
||||
* import {App} from './myapp';
|
||||
*
|
||||
* class MyOptions extends BaseRequestOptions {
|
||||
@ -135,7 +135,7 @@ export class RequestOptions {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/oyBoEvNtDhOSfi9YxaVb?p=preview))
|
||||
*
|
||||
* ```
|
||||
* import {BaseRequestOptions, Request, RequestMethod} from 'angular2/http';
|
||||
* import {BaseRequestOptions, Request, RequestMethod} from '@angular/http';
|
||||
*
|
||||
* var options = new BaseRequestOptions();
|
||||
* var req = new Request(options.merge({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {isPresent, isJsObject} from 'angular2/src/facade/lang';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {isPresent, isJsObject} from '../src/facade/lang';
|
||||
import {Headers} from './headers';
|
||||
import {ResponseType} from './enums';
|
||||
import {ResponseOptionsArgs} from './interfaces';
|
||||
@ -20,7 +20,7 @@ import {ResponseOptionsArgs} from './interfaces';
|
||||
* ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* import {ResponseOptions, Response} from 'angular2/http';
|
||||
* import {ResponseOptions, Response} from '@angular/http';
|
||||
*
|
||||
* var options = new ResponseOptions({
|
||||
* body: '{"name":"Jeff"}'
|
||||
@ -75,7 +75,7 @@ export class ResponseOptions {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* import {ResponseOptions, Response} from 'angular2/http';
|
||||
* import {ResponseOptions, Response} from '@angular/http';
|
||||
*
|
||||
* var options = new ResponseOptions({
|
||||
* body: {name: 'Jeff'}
|
||||
@ -115,10 +115,10 @@ export class ResponseOptions {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* import {provide} from 'angular2/core';
|
||||
* import {bootstrap} from 'angular2/platform/browser';
|
||||
* import {provide} from '@angular/core';
|
||||
* import {bootstrap} from '@angular/platform-browser/browser';
|
||||
* import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from
|
||||
* 'angular2/http';
|
||||
* '@angular/http';
|
||||
* import {App} from './myapp';
|
||||
*
|
||||
* class MyOptions extends BaseResponseOptions {
|
||||
@ -134,15 +134,15 @@ export class ResponseOptions {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/VngosOWiaExEtbstDoix?p=preview))
|
||||
*
|
||||
* ```
|
||||
* import {BaseResponseOptions, Response} from 'angular2/http';
|
||||
* import {BaseResponseOptions, Response} from '@angular/http';
|
||||
*
|
||||
* var options = new BaseResponseOptions();
|
||||
* var res = new Response(options.merge({
|
||||
* body: 'Angular2',
|
||||
* body: 'Angular',
|
||||
* headers: new Headers({framework: 'angular'})
|
||||
* }));
|
||||
* console.log('res.headers.get("framework"):', res.headers.get('framework')); // angular
|
||||
* console.log('res.text():', res.text()); // Angular2;
|
||||
* console.log('res.text():', res.text()); // Angular;
|
||||
* ```
|
||||
*/
|
||||
@Injectable()
|
||||
|
@ -1,5 +1,3 @@
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
/**
|
||||
* Supported http methods.
|
||||
*/
|
||||
|
1
modules/@angular/http/src/facade
Symbolic link
1
modules/@angular/http/src/facade
Symbolic link
@ -0,0 +1 @@
|
||||
../../facade/src
|
@ -1,12 +1,5 @@
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
isJsObject,
|
||||
isType,
|
||||
StringWrapper,
|
||||
Json
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {isBlank} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {
|
||||
isListLikeIterable,
|
||||
iterateListLike,
|
||||
@ -14,7 +7,7 @@ import {
|
||||
MapWrapper,
|
||||
StringMapWrapper,
|
||||
ListWrapper,
|
||||
} from 'angular2/src/facade/collection';
|
||||
} from '../src/facade/collection';
|
||||
|
||||
/**
|
||||
* Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as
|
||||
@ -26,7 +19,7 @@ import {
|
||||
* ### Example ([live demo](http://plnkr.co/edit/MTdwT6?p=preview))
|
||||
*
|
||||
* ```
|
||||
* import {Headers} from 'angular2/http';
|
||||
* import {Headers} from '@angular/http';
|
||||
*
|
||||
* var firstHeaders = new Headers();
|
||||
* firstHeaders.append('Content-Type', 'image/jpeg');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {isString, isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {makeTypeError} from 'angular2/src/facade/exceptions';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {RequestOptionsArgs, Connection, ConnectionBackend} from './interfaces';
|
||||
import {isString, isPresent} from '../src/facade/lang';
|
||||
import {makeTypeError} from '../src/facade/exceptions';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {RequestOptionsArgs, ConnectionBackend} from './interfaces';
|
||||
import {Request} from './static_request';
|
||||
import {Response} from './static_response';
|
||||
import {BaseRequestOptions, RequestOptions} from './base_request_options';
|
||||
@ -42,7 +42,7 @@ function mergeOptions(defaultOpts: BaseRequestOptions, providedOpts: RequestOpti
|
||||
* ### Example
|
||||
*
|
||||
* ```typescript
|
||||
* import {Http, HTTP_PROVIDERS} from 'angular2/http';
|
||||
* import {Http, HTTP_PROVIDERS} from '@angular/http';
|
||||
* @Component({
|
||||
* selector: 'http-app',
|
||||
* viewProviders: [HTTP_PROVIDERS],
|
||||
@ -74,8 +74,8 @@ function mergeOptions(defaultOpts: BaseRequestOptions, providedOpts: RequestOpti
|
||||
* ### Example
|
||||
*
|
||||
* ```typescript
|
||||
* import {BaseRequestOptions, Http} from 'angular2/http';
|
||||
* import {MockBackend} from 'angular2/http/testing';
|
||||
* import {BaseRequestOptions, Http} from '@angular/http';
|
||||
* import {MockBackend} from '@angular/http/testing';
|
||||
* var injector = Injector.resolveAndCreate([
|
||||
* BaseRequestOptions,
|
||||
* MockBackend,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import {isString} from 'angular2/src/facade/lang';
|
||||
import {isString} from '../src/facade/lang';
|
||||
import {RequestMethod} from './enums';
|
||||
import {makeTypeError} from 'angular2/src/facade/exceptions';
|
||||
import {Response} from './static_response';
|
||||
import {makeTypeError} from '../src/facade/exceptions';
|
||||
|
||||
export function normalizeMethodName(method: string | RequestMethod): RequestMethod {
|
||||
if (isString(method)) {
|
||||
@ -29,4 +28,4 @@ export function getResponseURL(xhr: any): string {
|
||||
return;
|
||||
}
|
||||
|
||||
export {isJsObject} from 'angular2/src/facade/lang';
|
||||
export {isJsObject} from '../src/facade/lang';
|
||||
|
@ -2,12 +2,12 @@
|
||||
// require('reflect-metadata');
|
||||
// require('es6-shim');
|
||||
// import {HTTP_PROVIDERS, JSONP_PROVIDERS, Http, Jsonp} from './http';
|
||||
// import {Injector} from 'angular2/core';
|
||||
// import {Injector} from '@angular/core';
|
||||
// export * from './http';
|
||||
|
||||
// /**
|
||||
// * TODO(jeffbcross): export each as their own top-level file, to require as:
|
||||
// * require('angular2/http'); require('http/jsonp');
|
||||
// * require('@angular/http'); require('http/jsonp');
|
||||
// */
|
||||
// export var http = Injector.resolveAndCreate([HTTP_PROVIDERS]).get(Http);
|
||||
// export var jsonp = Injector.resolveAndCreate([JSONP_PROVIDERS]).get(Jsonp);
|
||||
|
@ -1,7 +1,5 @@
|
||||
import {ReadyState, RequestMethod, ResponseType} from './enums';
|
||||
import {Headers} from './headers';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {EventEmitter} from 'angular2/src/facade/async';
|
||||
import {Request} from './static_request';
|
||||
import {URLSearchParams} from './url_search_params';
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
"repository": <%= JSON.stringify(packageJson.repository) %>,
|
||||
"devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>,
|
||||
"peerDependencies": {
|
||||
"angular2": "<%= packageJson.version %>",
|
||||
"@angular/core": "<%= packageJson.version %>",
|
||||
"rxjs": "<%= packageJson.dependencies['rxjs'] %>"
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import {RequestMethod} from './enums';
|
||||
import {RequestArgs} from './interfaces';
|
||||
import {Headers} from './headers';
|
||||
import {normalizeMethodName} from './http_utils';
|
||||
import {RegExpWrapper, isPresent, isJsObject, StringWrapper} from 'angular2/src/facade/lang';
|
||||
import {isPresent, StringWrapper} from '../src/facade/lang';
|
||||
|
||||
// TODO(jeffbcross): properly implement body accessors
|
||||
/**
|
||||
@ -19,8 +19,8 @@ import {RegExpWrapper, isPresent, isJsObject, StringWrapper} from 'angular2/src/
|
||||
* where it may be useful to generate a `Request` with arbitrary headers and search params.
|
||||
*
|
||||
* ```typescript
|
||||
* import {Injectable, Injector} from 'angular2/core';
|
||||
* import {HTTP_PROVIDERS, Http, Request, RequestMethod} from 'angular2/http';
|
||||
* import {Injectable, Injector} from '@angular/core';
|
||||
* import {HTTP_PROVIDERS, Http, Request, RequestMethod} from '@angular/http';
|
||||
*
|
||||
* @Injectable()
|
||||
* class AutoAuthenticator {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {ResponseType} from './enums';
|
||||
import {isString, isPresent, Json} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {isString, Json} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {Headers} from './headers';
|
||||
import {ResponseOptions} from './base_response_options';
|
||||
import {isJsObject} from './http_utils';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {Map, MapWrapper, ListWrapper, isListLikeIterable} from 'angular2/src/facade/collection';
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
import {Map, ListWrapper, isListLikeIterable} from '../src/facade/collection';
|
||||
|
||||
function paramParser(rawParams: string = ''): Map<string, string[]> {
|
||||
var map = new Map<string, string[]>();
|
||||
|
Reference in New Issue
Block a user