Permalink
Browse files

Removing static routes

  • Loading branch information...
jakearchibald committed Jun 18, 2013
1 parent 788982f commit 5c26b561c5d737591a118a4db94135f5ac6e1ea7
Showing with 0 additions and 65 deletions.
  1. +0 −37 controller.js
  2. +0 −28 controller.ts
@@ -307,43 +307,6 @@ var ReadOnlyCacheList = (function () {
};
return ReadOnlyCacheList;
})();
var StaticRouter = (function (_super) {
__extends(StaticRouter, _super);
function StaticRouter() {
_super.apply(this, arguments);

}
StaticRouter.prototype.add = function (url, sources) {
};
StaticRouter.prototype.addCache = function (cache, fallbackSources) {
};
return StaticRouter;
})(Map);
var StaticRoute = (function () {
function StaticRoute() { }
return StaticRoute;
})();
var ResponseSource = (function () {
function ResponseSource() { }
ResponseSource.prototype.get = function () {
return acceptedResponse();
};
return ResponseSource;
})();
var CacheSource = (function (_super) {
__extends(CacheSource, _super);
function CacheSource(cacheName, url) {
_super.call(this);
}
return CacheSource;
})(ResponseSource);
var NetworkSource = (function (_super) {
__extends(NetworkSource, _super);
function NetworkSource(url) {
_super.call(this);
}
return NetworkSource;
})(ResponseSource);
var _URL = (function () {
function _URL(url, base) {
}
@@ -102,8 +102,6 @@ class ControllerScope extends SharedWorker {
// are replaceing (see InstalledEvent::previousVersion)
version: any = 0; // NOTE: versions must be structured-cloneable!

staticRoutes: StaticRouter;

//
// Events
//
@@ -464,32 +462,6 @@ class ReadOnlyCacheList {
}
}

class StaticRouter extends Map {
// when URL is a string & ends in *, it acts as a matching prefix
// sources can be ResponseSource, ResponsePromise, or Response, or String
// Strings can be 'network', which will fetch the current url from the network
add(url: any, sources: Array): void {};
// cache can be string name or cache object
// fallbackSources are tried if cache extraction fails
addCache(cache: any, fallbackSources: Array): void {};
}

class StaticRoute {
sources: Array;
}

class ResponseSource {
get(): ResponsePromise { return acceptedResponse() };
}

class CacheSource extends ResponseSource {
constructor(cacheName: String, url: any) { super(); };
}

class NetworkSource extends ResponseSource {
constructor(url: any) { super(); };
}

////////////////////////////////////////////////////////////////////////////////
// Utility Decls to make the TypeScript compiler happy
////////////////////////////////////////////////////////////////////////////////

0 comments on commit 5c26b56

Please sign in to comment.