aurelia-json
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,2 +0,9 @@ | ||
export { NotificationManager } from "./notification-manager"; | ||
export { BrowserNotificationManager } from "./browser-notification-manager"; | ||
import { FrameworkConfiguration } from "aurelia-framework"; | ||
import { JsonSchema } from "./schema"; | ||
import { JsonPatch } from "./patch"; | ||
import { JsonPointer } from "./pointer"; | ||
import { JsonEncoder } from "./json-encoder"; | ||
import { JsonDecoder } from "./json-decoder"; | ||
import { JsonMessageInterceptor } from "./message-interceptor"; | ||
export declare function configure(frameworkConfiguration: FrameworkConfiguration, pluginConfiguration: Function): void; | ||
export { JsonSchema, JsonPatch, JsonPointer, JsonEncoder, JsonDecoder, JsonMessageInterceptor }; |
"use strict"; | ||
var notification_manager_1 = require("./notification-manager"); | ||
exports.NotificationManager = notification_manager_1.NotificationManager; | ||
var browser_notification_manager_1 = require("./browser-notification-manager"); | ||
exports.BrowserNotificationManager = browser_notification_manager_1.BrowserNotificationManager; | ||
var aurelia_http_client_1 = require("aurelia-http-client"); | ||
var schema_1 = require("./schema"); | ||
exports.JsonSchema = schema_1.JsonSchema; | ||
var patch_1 = require("./patch"); | ||
exports.JsonPatch = patch_1.JsonPatch; | ||
var pointer_1 = require("./pointer"); | ||
exports.JsonPointer = pointer_1.JsonPointer; | ||
var json_encoder_1 = require("./json-encoder"); | ||
exports.JsonEncoder = json_encoder_1.JsonEncoder; | ||
var json_decoder_1 = require("./json-decoder"); | ||
exports.JsonDecoder = json_decoder_1.JsonDecoder; | ||
var message_interceptor_1 = require("./message-interceptor"); | ||
exports.JsonMessageInterceptor = message_interceptor_1.JsonMessageInterceptor; | ||
function configure(frameworkConfiguration, pluginConfiguration) { | ||
var container = frameworkConfiguration.container; | ||
var httpClient = container.get(aurelia_http_client_1.HttpClient); | ||
var jsonDecoder = new json_decoder_1.JsonDecoder(); | ||
container.registerTransient(json_encoder_1.JsonEncoder); | ||
container.registerInstance(json_decoder_1.JsonDecoder, jsonDecoder); | ||
httpClient.configure(function (requestBuilder) { | ||
requestBuilder.withInterceptor(new message_interceptor_1.JsonMessageInterceptor(jsonDecoder)); | ||
}); | ||
if (pluginConfiguration) { | ||
pluginConfiguration(jsonDecoder); | ||
} | ||
} | ||
exports.configure = configure; | ||
//# sourceMappingURL=index.js.map |
@@ -18,3 +18,3 @@ import gulp from "gulp"; | ||
gulp.task("build", [ "clean" ], done => gulp.src(typescriptSources).pipe(tsc()).pipe(gulp.dest(typescriptOutput))); | ||
gulp.task("test", done => gulp.src(testSuites).pipe(jasmine())); | ||
gulp.task("test", [ "build" ], done => gulp.src(testSuites).pipe(jasmine())); | ||
gulp.task("default", () => run("build", "test")); |
{ | ||
"name": "aurelia-json", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A JSON plugin for Aurelia based projects.", | ||
@@ -27,3 +27,5 @@ "keywords": [ | ||
"aurelia-dependency-injection": "^1.0.0-beta.2.1.1", | ||
"aurelia-event-aggregator": "^1.0.0-beta.2.0.1" | ||
"aurelia-framework": "^1.0.0-beta.2.0.1", | ||
"aurelia-http-client": "^1.0.0-beta.2.0.1", | ||
"aurelia-http-utils": "^0.1.4" | ||
}, | ||
@@ -30,0 +32,0 @@ "devDependencies": { |
@@ -1,2 +0,25 @@ | ||
export {NotificationManager} from "./notification-manager"; | ||
export {BrowserNotificationManager} from "./browser-notification-manager"; | ||
import {FrameworkConfiguration} from "aurelia-framework"; | ||
import {Container} from "aurelia-dependency-injection"; | ||
import {HttpClient} from "aurelia-http-client"; | ||
import {JsonSchema} from "./schema"; | ||
import {JsonPatch} from "./patch"; | ||
import {JsonPointer} from "./pointer"; | ||
import {JsonEncoder} from "./json-encoder"; | ||
import {JsonDecoder} from "./json-decoder"; | ||
import {JsonMessageInterceptor} from "./message-interceptor"; | ||
export function configure(frameworkConfiguration: FrameworkConfiguration, pluginConfiguration: Function) { | ||
let container: Container = frameworkConfiguration.container; | ||
let httpClient: HttpClient = container.get(HttpClient); | ||
let jsonDecoder = new JsonDecoder(); | ||
container.registerTransient(JsonEncoder); | ||
container.registerInstance(JsonDecoder, jsonDecoder); | ||
httpClient.configure(requestBuilder => { | ||
requestBuilder.withInterceptor(new JsonMessageInterceptor(jsonDecoder)); | ||
}); | ||
if (pluginConfiguration) { | ||
pluginConfiguration(jsonDecoder); | ||
} | ||
} | ||
export {JsonSchema, JsonPatch, JsonPointer, JsonEncoder, JsonDecoder, JsonMessageInterceptor}; |
@@ -5,2 +5,3 @@ { | ||
"outDir": "dist", | ||
"target": "es5", | ||
"lib": ["es2015", "dom"], | ||
@@ -7,0 +8,0 @@ "noImplicitAny": false, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
51697
36
774
4
+ Addedaurelia-http-utils@^0.1.4
+ Addedaurelia-binding@2.5.4(transitive)
+ Addedaurelia-framework@1.4.1(transitive)
+ Addedaurelia-http-client@1.3.1(transitive)
+ Addedaurelia-http-utils@0.1.4(transitive)
+ Addedaurelia-loader@1.0.2(transitive)
+ Addedaurelia-path@1.1.8(transitive)
+ Addedaurelia-task-queue@1.3.3(transitive)
+ Addedaurelia-templating@1.11.1(transitive)
- Removedaurelia-event-aggregator@1.0.3(transitive)