##// END OF EJS Templates
migrating tests to the new project structure
cin -
r89:441fae622bca ts-plugin
parent child
Show More
@@ -0,0 +1,17
1 <?xml version="1.0" encoding="UTF-8"?>
2 <projectDescription>
3 <name>core</name>
4 <comment>Project implabjs-core created by Buildship.</comment>
5 <projects>
6 </projects>
7 <buildSpec>
8 <buildCommand>
9 <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10 <arguments>
11 </arguments>
12 </buildCommand>
13 </buildSpec>
14 <natures>
15 <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16 </natures>
17 </projectDescription>
@@ -0,0 +1,54
1 import { MockActivationController } from "../mock/MockActivationController";
2 import { SimpleActivatable } from "../mock/SimpleActivatable";
3 import { test } from "./TestTraits";
4
5 test("simple activation", async t => {
6
7 const a = new SimpleActivatable();
8 t.false(a.isActive());
9
10 await a.activate();
11 t.true(a.isActive());
12
13 await a.deactivate();
14 t.false(a.isActive());
15 });
16
17 test("controller activation", async t => {
18
19 const a = new SimpleActivatable();
20 const c = new MockActivationController();
21
22 t.false(a.isActive(), "the component is not active by default");
23 t.assert(c.getActive() == null, "the activation controller doesn't have an active component by default");
24 t.assert(a.getActivationController() == null, "the component doesn't have an activation controller by default");
25
26 t.comment("Active the component through the controller");
27 await c.activate(a);
28 t.true(a.isActive(), "The component should successfully activate");
29 t.equal(c.getActive(), a, "The controller should point to the activated component");
30 t.equal(a.getActivationController(), c, "The component should point to the controller");
31
32 t.comment("Deactive the component throug the controller");
33 await c.deactivate();
34
35 t.false(a.isActive(), "The component should successfully deactivate");
36 t.equal(c.getActive(), null, "The controller shouldn't point to any component");
37 t.equal(a.getActivationController(), c, "The componet should point to it's controller");
38 });
39
40 test("handle error in onActivating", async t => {
41 const a = new SimpleActivatable();
42
43 a.onActivating = async () => {
44 throw new Error("Should fail");
45 };
46
47 try {
48 await a.activate();
49 t.fail("activation should fail");
50 } catch {
51 }
52
53 t.false(a.isActive(), "the component should remain inactive");
54 });
@@ -0,0 +1,88
1 import { Cancellation } from "../Cancellation";
2 import { delay } from "../safe";
3 import { test } from "./TestTraits";
4
5 test("standalone cancellation", async t => {
6
7 let doCancel: (e) => void;
8
9 const ct = new Cancellation(cancel => {
10 doCancel = cancel;
11 });
12
13 let counter = 0;
14 const reason = "BILL";
15
16 t.true(ct.isSupported(), "Cancellation must be supported");
17 t.false(ct.isRequested(), "Cancellation shouldn't be requested");
18 ct.throwIfRequested();
19 t.pass("The exception shouldn't be thrown unless the cancellation is requested");
20
21 ct.register(() => counter++);
22 t.equals(counter, 0, "counter should be zero");
23
24 ct.register(() => counter++).destroy();
25
26 doCancel(reason);
27
28 t.true(ct.isRequested(), "Cancellation should be requested");
29 t.equals(counter, 1, "The registered callback should be triggered");
30
31 ct.register(() => counter++);
32 t.equals(counter, 2, "The callback should be triggered immediately");
33
34 let msg;
35 ct.register(e => msg = e);
36 t.equals(msg, reason, "The cancellation reason should be passed to callback");
37
38 try {
39 msg = null;
40 ct.throwIfRequested();
41 t.fail("The exception should be thrown");
42 } catch (e) {
43 msg = e;
44 }
45 t.equals(msg, reason, "The cancellation reason should be catched");
46 });
47
48 test("async cancellation", async t => {
49
50 const ct = new Cancellation(cancel => {
51 cancel("STOP!");
52 });
53
54 try {
55 await delay(0, ct);
56 t.fail("Should thow the exception");
57 } catch (e) {
58 t.equals(e, "STOP!", "Should throw the cancellation reason");
59 }
60 });
61
62 test("cancel with external event", async t => {
63 const ct = new Cancellation(cancel => {
64 setTimeout(x => cancel("STOP!"), 0);
65 });
66
67 try {
68 await delay(10000, ct);
69 t.fail("Should thow the exception");
70 } catch (e) {
71 t.equals(e, "STOP!", "Should throw the cancellation reason");
72 }
73 });
74
75 test("operation normal flow", async t => {
76
77 let htimeout;
78 const ct = new Cancellation(cancel => {
79 htimeout = setTimeout(() => cancel("STOP!"), 1000);
80 });
81
82 try {
83 await delay(0, ct);
84 t.pass("Should pass");
85 } finally {
86 clearTimeout(htimeout);
87 }
88 });
@@ -0,0 +1,93
1 import { test } from "./TestTraits";
2 import { Container } from "../di/Container";
3 import { ReferenceDescriptor } from "../di/ReferenceDescriptor";
4 import { AggregateDescriptor } from "../di/AggregateDescriptor";
5 import { ValueDescriptor } from "../di/ValueDescriptor";
6 import { Foo } from "../mock/Foo";
7 import { Bar } from "../mock/Bar";
8 import { isNull } from "../safe";
9
10 test("Container register/resolve tests", async t => {
11 const container = new Container();
12
13 const connection1 = "db://localhost";
14
15 t.throws(
16 () => container.register("bla-bla", "bla-bla"),
17 "Do not allow to register anything other than descriptors"
18 );
19
20 t.doesNotThrow(
21 () => container.register("connection", new ValueDescriptor(connection1)),
22 "register ValueDescriptor"
23 );
24
25 t.equals(container.resolve("connection"), connection1, "resolve string value");
26
27 t.doesNotThrow(
28 () => container.register(
29 "dbParams",
30 new AggregateDescriptor({
31 timeout: 10,
32 connection: new ReferenceDescriptor({ name: "connection" })
33 })
34 ),
35 "register AggregateDescriptor"
36 );
37
38 const dbParams = container.resolve("dbParams");
39 t.equals(dbParams.connection, connection1, "should get string value 'dbParams.connection'");
40 });
41
42 test("Container configure/resolve tests", async t => {
43
44 const container = new Container();
45
46 await container.configure({
47 foo: {
48 $type: Foo
49 },
50
51 box: {
52 $type: Bar,
53 params: {
54 $dependency: "foo"
55 }
56 },
57
58 bar: {
59 $type: Bar,
60 params: {
61 db: {
62 provider: {
63 $dependency: "db"
64 }
65 }
66 }
67 }
68 });
69 t.pass("should configure from js object");
70
71 const f1 = container.resolve("foo");
72
73 t.assert(!isNull(f1), "foo should be not null");
74
75 t.throws(() => container.resolve("bar"), "should not resolve dependency 'db'");
76
77 });
78
79 test("Load configuration from module", async t => {
80 const container = new Container();
81
82 await container.configure("./mock/config1", { contextRequire: require });
83 t.pass("The configuration should load");
84
85 const f1 = container.resolve("foo");
86
87 t.assert(!isNull(f1), "foo should be not null");
88
89 const b1 = container.resolve("bar") as Bar;
90
91 t.assert(!isNull(b1), "bar should not be null");
92 t.assert(!isNull(b1.foo), "bar.foo should not be null");
93 });
@@ -0,0 +1,69
1 import { TraceSource } from "../log/TraceSource";
2 import { Observable } from "../Observable";
3 import { IObservable } from "../interfaces";
4 import { delay } from "../safe";
5 import { test } from "./TestTraits";
6
7 const trace = TraceSource.get("ObservableTests");
8
9 test("events sequence example", async t => {
10
11 let events: IObservable<number>;
12
13 const done = new Promise<void>(resolve => {
14 events = new Observable<number>(async (notify, fail, finish) => {
15 for (let i = 0; i < 10; i++) {
16 await delay(0);
17 notify(i);
18 }
19 finish();
20 resolve();
21 });
22 });
23
24 let count = 0;
25 let complete = false;
26 events.on(x => count = count + x, null, () => complete = true);
27
28 const first = await events.next();
29
30 t.equals(first, 0, "the first event");
31 t.false(complete, "the sequence is not complete");
32
33 await done;
34
35 t.equals(count, 45, "the summ of the evetns");
36 t.true(complete, "the sequence is complete");
37 });
38
39 test("event sequence termination", async t => {
40 let events: IObservable<number>;
41
42 const done = new Promise<void>(resolve => {
43 events = new Observable<number>(async (notify, fail, complete) => {
44 await delay(0);
45 notify(1);
46 complete();
47 notify(2);
48 complete();
49 fail("Sequence terminated");
50 resolve();
51 });
52 });
53
54 let count = 0;
55 events.on(() => {}, e => count++, () => count++);
56
57 const first = await events.next();
58 t.equals(first, 1, "the first message");
59 try {
60 await events.next();
61 t.fail("shoud throw an exception");
62 } catch (e) {
63 t.pass("the sequence is terminated");
64 }
65
66 await done;
67
68 t.equals(count, 1, "the sequence must be terminated once");
69 });
@@ -0,0 +1,95
1 import { Cancellation } from "../Cancellation";
2 import { first, isPromise, firstWhere, delay, nowait } from "../safe";
3 import { test } from "./TestTraits";
4
5 test("await delay test", async t => {
6 // schedule delay
7 let resolved = false;
8 let res = delay(0).then(() => resolved = true);
9
10 t.false(resolved, "the delay should be async");
11
12 await res;
13 t.pass("await delay");
14
15 // create cancellation token
16 let cancel: (e?: any) => void;
17 const ct = new Cancellation(c => cancel = c);
18
19 // schedule delay
20 resolved = false;
21 res = delay(0, ct).then(() => resolved = true);
22
23 t.false(resolved, "created delay with ct");
24
25 // cancel
26 cancel();
27
28 try {
29 await res;
30 t.fail("the delay should fail when it is cancelled");
31 } catch {
32 t.pass("the delay is cancelled");
33 }
34
35 t.throws(() => {
36 // try schedule delay after the cancellation is requested
37 nowait(delay(0, ct));
38 }, "Should throw if cancelled before start");
39 });
40
41 test("sequemce test", async t => {
42 const sequence = ["a", "b", "c"];
43 const empty = [];
44
45 // synchronous tests
46 t.equals(first(sequence), "a", "Should return the first element");
47 t.equals(firstWhere(sequence, x => x === "b"), "b", "Should get the second element");
48
49 let v: string;
50 let e: Error;
51 first(sequence, x => v = x);
52 t.equal(v, "a", "The callback should be called for the first element");
53 firstWhere(sequence, x => x === "b", x => v = x);
54 t.equal(v, "b", "The callback should be called for the second element");
55
56 t.throws(() => {
57 first(empty);
58 }, "Should throw when the sequence is empty");
59
60 t.throws(() => {
61 firstWhere(empty, x => x === "b");
62 }, "Should throw when the sequence is empty");
63
64 t.throws(() => {
65 first(empty, x => v = x);
66 }, "Should throw when the sequence is empty");
67
68 t.throws(() => {
69 firstWhere(empty, x => x === "b", x => v = x);
70 }, "Should throw when the sequence is empty");
71
72 t.throws(() => {
73 firstWhere(sequence, x => x === "z");
74 }, "Should throw when the element isn't found");
75
76 t.throws(() => {
77 firstWhere(sequence, x => x === "z", x => v = x);
78 }, "Should throw when the element isn't found");
79
80 first(empty, null, x => e = x);
81 t.true(e, "The errorback should be called for the empty sequence");
82
83 // async tests
84 const asyncSequence = Promise.resolve(sequence);
85 const asyncEmptySequence = Promise.resolve(empty);
86
87 const promise = first(asyncSequence);
88 t.true(isPromise(promise), "Should return promise");
89
90 v = await promise;
91 t.equal(v, "a", "Should return the first element");
92
93 v = await new Promise(resolve => first(asyncSequence, resolve));
94 t.equal(v, "a", "The callback should be called for the first element");
95 });
@@ -0,0 +1,74
1 import { IObservable, ICancellation, IDestroyable } from "../interfaces";
2 import { Cancellation } from "../Cancellation";
3 import { TraceEvent, LogLevel, WarnLevel, DebugLevel, TraceSource } from "../log/TraceSource";
4 import * as tape from "tape";
5 import { argumentNotNull, destroy } from "../safe";
6
7 export class TapeWriter implements IDestroyable {
8 private readonly _tape: tape.Test;
9
10 private readonly _subscriptions = new Array<IDestroyable>();
11 private _destroyed;
12
13 constructor(t: tape.Test) {
14 argumentNotNull(t, "tape");
15 this._tape = t;
16 }
17
18 writeEvents(source: IObservable<TraceEvent>, ct: ICancellation = Cancellation.none) {
19 if (!this._destroyed) {
20 const subscription = source.on(this.writeEvent.bind(this));
21 if (ct.isSupported()) {
22 ct.register(subscription.destroy.bind(subscription));
23 }
24 this._subscriptions.push(subscription);
25 }
26 }
27
28 writeEvent(next: TraceEvent) {
29 if (next.level >= DebugLevel) {
30 this._tape.comment(`DEBUG ${next.source.id} ${next}`);
31 } else if (next.level >= LogLevel) {
32 this._tape.comment(`LOG ${next.source.id} ${next}`);
33 } else if (next.level >= WarnLevel) {
34 this._tape.comment(`WARN ${next.source.id} ${next}`);
35 } else {
36 this._tape.comment(`ERROR ${next.source.id} ${next}`);
37 }
38 }
39
40 destroy() {
41 this._subscriptions.forEach(destroy);
42 }
43 }
44
45 export function test(name: string, cb: (t: tape.Test, trace: TraceSource) => any) {
46 tape(name, async t => {
47 const writer = new TapeWriter(t);
48
49 // this trace is not announced through the TraceSource global registry
50 const trace = new TraceSource(name);
51 trace.level = DebugLevel;
52 writer.writeEvents(trace.events);
53
54 const h = TraceSource.on(ts => {
55 ts.level = DebugLevel;
56 writer.writeEvents(ts.events);
57 });
58
59 try {
60 await cb(t, trace);
61 } catch (e) {
62
63 // verbose error information
64 // tslint:disable-next-line
65 console.error(e);
66 t.fail(e);
67
68 } finally {
69 t.end();
70 destroy(writer);
71 destroy(h);
72 }
73 });
74 }
@@ -0,0 +1,86
1 import { StringBuilder } from "../text/StringBuilder";
2 import { test } from "./TestTraits";
3 import { MockConsole } from "../mock/MockConsole";
4 import { ConsoleWriter } from "../log/ConsoleWriter";
5
6 test("String builder", async t => {
7 const sb = new StringBuilder();
8
9 sb.write("hello");
10 t.equals(sb.toString(), "hello", "Write simple text");
11
12 sb.write(", ");
13 sb.write("world!");
14 t.equals(sb.toString(), "hello, world!", "Append text");
15
16 sb.clear();
17 t.equals(sb.toString(), "", "Clear");
18
19 sb.write(1);
20 t.equals(sb.toString(), "1", "Write number");
21
22 sb.clear();
23 sb.writeValue(0.123);
24 t.equals(sb.toString(), "0.123", "Format number");
25
26 sb.clear();
27 sb.writeValue(new Date("2019-01-02T00:00:00.000Z"));
28 t.equals(sb.toString(), "2019-01-02T00:00:00.000Z", "Format date (ISO)");
29
30 sb.clear();
31 sb.write("{0}", "hello");
32 t.equals(sb.toString(), "hello", "Simple format text");
33
34 sb.write(", {0}!", "world");
35 t.equals(sb.toString(), "hello, world!", "Append formatted text");
36
37 sb.clear();
38 sb.write("abc: {0:json}; {0.length}; {0.1} {{olo}}", ["a", "b", "c"]);
39 t.equals(sb.toString(), 'abc: [\n "a",\n "b",\n "c"\n]; 3; b {olo}', "Format string with spec");
40
41 sb.clear();
42 t.throws(() => sb.write("}", 0), "Should die on bad format: '}'");
43 t.throws(() => sb.write("{", 0), "Should die on bad format: '{'");
44 t.throws(() => sb.write("{}", 0), "Should die on bad format: '{}'");
45 t.throws(() => sb.write("{:}", 0), "Should die on bad format: '{:}'");
46 t.throws(() => sb.write("{{0}", 0), "Should die on bad format: '{{0}'");
47
48 });
49
50 test("ConsoleWriter", t => {
51 const mockConsole = new MockConsole();
52 const writer = new ConsoleWriter(mockConsole);
53
54 writer.setLogLevel("log");
55
56 writer.writeLine("Hello, world!");
57
58 t.equals(mockConsole.getBuffer().length, 1, "One line should be written");
59 t.equals(mockConsole.getBuffer()[0].level, "log", "LogLevel should be 'log'");
60 t.deepEqual(mockConsole.getBuffer()[0].data, ["Hello, world!"], "The buffer should contain single string");
61
62 mockConsole.clear();
63 writer.setLogLevel("debug");
64 writer.write("Bring ");
65 writer.write("the {0}!", "light");
66 t.equals(mockConsole.getBuffer().length, 0, "No line should be written");
67 writer.writeLine();
68
69 t.equals(mockConsole.getBuffer().length, 1, "One line should be written");
70 t.equals(mockConsole.getBuffer()[0].level, "debug", "LogLevel should be 'log'");
71 t.deepEqual(mockConsole.getBuffer()[0].data, ["Bring the light!"], "Should concatenate string parts together");
72
73 mockConsole.clear();
74 writer.writeLine("It's {0} o'clock, lets have some {1}!", { h: 5}, { title: "tee" });
75
76 t.deepEqual(mockConsole.getBuffer()[0].data, ["It's ", { h: 5}, " o'clock, lets have some ", { title: "tee" }, "!"], "Non string parts should be psassed as is");
77
78 mockConsole.clear();
79 writer.writeLine("{0} or {1} to {2}", {i: 25}, 6, 4);
80 t.deepEqual(mockConsole.getBuffer()[0].data, [{i: 25}, " or 6 to 4"], "25 or 6 to 4");
81
82 mockConsole.clear();
83 writer.writeLine("{0} or {1} to {2}! Let's have some {3}", 25, 6, 4, { product: "tee" } );
84 t.deepEqual(mockConsole.getBuffer()[0].data, ["25 or 6 to 4! Let's have some ", { product: "tee" }], "Should handle many text chunks and object at the end");
85
86 });
@@ -0,0 +1,89
1 import { TraceSource, DebugLevel } from "../log/TraceSource";
2 import * as tape from "tape";
3 import { TapeWriter, test } from "./TestTraits";
4 import { MockConsole } from "../mock/MockConsole";
5 import { ConsoleLogger } from "../log/writers/ConsoleLogger";
6 import { ConsoleWriter } from "../log/ConsoleWriter";
7
8 const sourceId = "test/TraceSourceTests";
9
10 tape("trace message", t => {
11 const trace = TraceSource.get(sourceId);
12
13 trace.level = DebugLevel;
14
15 const h = trace.events.on(ev => {
16 t.equal(ev.source, trace, "sender should be the current trace source");
17 t.equal(ev.level, DebugLevel, "level should be debug level");
18 t.equal(ev.toString(), "Hello, World!", "The message should be a formatted message");
19
20 t.end();
21 });
22
23 trace.debug("Hello, {0}!", "World");
24
25 h.destroy();
26 });
27
28 tape("trace event", t => {
29 const trace = TraceSource.get(sourceId);
30
31 trace.level = DebugLevel;
32
33 const event = {
34 name: "custom event"
35 };
36
37 const h = trace.events.on(ev => {
38 t.equal(ev.source, trace, "sender should be the current trace source");
39 t.equal(ev.level, DebugLevel, "level should be debug level");
40 t.equal(ev.message, event, "The message should be the specified object");
41
42 t.end();
43 });
44
45 trace.traceEvent(DebugLevel, event);
46
47 h.destroy();
48 });
49
50 tape("tape comment writer", async t => {
51 const writer = new TapeWriter(t);
52
53 TraceSource.on(ts => {
54 writer.writeEvents(ts.events);
55 });
56
57 const trace = TraceSource.get(sourceId);
58 trace.level = DebugLevel;
59
60 trace.log("Hello, {0}!", "World");
61 trace.log("Multi\n line");
62 trace.warn("Look at me!");
63 trace.error("DIE!");
64
65 writer.destroy();
66
67 trace.log("You shouldn't see it!");
68
69 t.comment("DONE");
70
71 t.end();
72 });
73
74 test("console writer", (t, trace) => {
75
76 const mockConsole = new MockConsole();
77 const writer = new ConsoleWriter(mockConsole);
78 const consoleLog = new ConsoleLogger(writer);
79 consoleLog.writeEvents(trace.events);
80
81 trace.log("Hello, world!");
82 t.deepEqual(mockConsole.getLine(0), ["console writer: Hello, world!"], "Log one string");
83
84 trace.log({ foo: "bar" });
85 t.deepEqual(mockConsole.getLine(1), ["console writer: ", { foo: "bar" }], "Log an object");
86
87 trace.log("json: {0:json}", { foo: "bar" });
88 t.deepEqual(mockConsole.getLine(2), ['console writer: json: {\n "foo": "bar"\n}'], "should convert to string substitutions with spec");
89 });
@@ -0,0 +1,13
1 import * as tape from "tape";
2 import { Uuid } from "../Uuid";
3
4 tape("simple", t => {
5 t.pass("sync assert");
6 setTimeout(() => {
7 t.pass("async assert");
8 t.comment(Uuid());
9 t.ok(Uuid() !== Uuid());
10 // end should be called after the last assertion
11 t.end();
12 }, 100);
13 });
@@ -1,105 +1,110
1 plugins {
1 plugins {
2 id "org.implab.gradle-typescript" version "1.0.1-rc1"
2 id "org.implab.gradle-typescript" version "1.0.1-rc1"
3 }
3 }
4
4
5 // если версия явно не заданы вычисляем ее из тэга ревизии v.{num}***
5 // если версия явно не заданы вычисляем ее из тэга ревизии v.{num}***
6 // результатом будет версия '{num}.{distance}' где distance - расстояние от
6 // результатом будет версия '{num}.{distance}' где distance - расстояние от
7 // текущей ревизии до ревизии с тэгом
7 // текущей ревизии до ревизии с тэгом
8 def tagDistance = 0;
8 def tagDistance = 0;
9 def isRelease = false;
10
9
11 if (!version) {
10 if (!version) {
12
11
13 def rev = ["hg", "log", "-r", ".", "--template", "{latesttag('re:^v') % '{tag}-{distance}'}"].execute().text.trim();
12 def rev = ["hg", "log", "-r", ".", "--template", "{latesttag('re:^v') % '{tag}-{distance}'}"].execute().text.trim();
14
13
15 def tagVersion;
14 def tagVersion;
16
15
17 def match = (rev =~ /^v(\d+\.\d+\.\d+).*-(\d+)$/);
16 def match = (rev =~ /^v(\d+\.\d+\.\d+).*-(\d+)$/);
18
17
19 if (match.size()) {
18 if (match.size()) {
20 tagVersion = match[0][1];
19 tagVersion = match[0][1];
21 tagDistance = match[0][2].toInteger();
20 tagDistance = match[0][2].toInteger();
22 } else {
21 } else {
23 throw new Exception("A version must be specied");
22 throw new Exception("A version must be specied");
24 }
23 }
25
24
26 version = tagVersion;
25 version = tagVersion;
27
26
28 if (tagDistance > 0)
27 if (tagDistance > 0)
29 version++;
28 version++;
30 } else {
29 } else {
31 println "explicit version: $version";
30 println "explicit version: $version";
32 }
31 }
33
32
34 if (hasProperty('versionSuffix') && versionSuffix) {
33 if (hasProperty('versionSuffix') && versionSuffix) {
35 version += "-$versionSuffix"
34 version += "-$versionSuffix"
36 }
35 }
37
36
38 if(!npmName)
37 if(! jsmodule in ["amd", "commonjs", "system", "umd", "es6", "esnext"])
39 npmName = name;
40
41 if (hasProperty('release')) {
42 isRelease = (release != 'false')
43 } else {
44 isRelease = (tagDistance == 0);
45 }
46
47 if(!["amd", "commonjs", "system", "umd", "es6", "esnext"].contains(jsmodule))
48 throw new Exception("Invalid jsmodule specified: $jsmodule");
38 throw new Exception("Invalid jsmodule specified: $jsmodule");
49 if(!["es3", "es5", "es6", "es2016", "es2017", "esnext"].contains(target))
39 if(! target in ["es3", "es5", "es6", "es2016", "es2017", "esnext"])
50 throw new Exception("Invalid target specified: $target")
40 throw new Exception("Invalid target specified: $target")
51
41
52 def targetLibs = [
53 "es3" : ["es5", "es2015.promise", "es2015.symbol", "dom", "scripthost"],
54 "es5" : ["es5", "es2015.promise", "es2015.symbol", "dom", "scripthost"]
55 ];
56
57 ext {
42 ext {
58 packageName = "@$npmScope/$npmName"
43 packageName = "@$npmScope/$npmName"
59 }
44 }
60
45
61 def jstarget = target;
46 def jstarget = target;
62
47
63 sources {
48 sources {
49 amd {
64
50
65 }
51 }
66
52
53 cjs {
54
55 }
56 }
57
67 typescript {
58 typescript {
68 compilerOptions {
59 compilerOptions {
69 lib = targetLibs[target] ?: [target, "dom"]
60 lib = [target, "dom", "scripthost"]
61 if (jstarget in ["es5", "es3"])
62 lib += ["es2015.promise"]
63
70 target = jstarget
64 target = jstarget
71 module = jsmodule
65 module = jsmodule
72 types = []
66 types = []
67 declaration = true
68 listFiles = true
69
73 }
70 }
74 tsLintCmd = "tslint"
71 tsLintCmd = "tslint"
75 esLintCmd = "eslint"
72 esLintCmd = "eslint"
76 npmCmd = "npm"
73 npmCmd = "npm"
77 }
74 }
78
75
76 configureTsMain {
77 compilerOptions {
78 if (jstarget in ["es5", "es3"])
79 lib += ["es2015.symbol", "es2015.iterable"]
80 }
81 }
82
83 configureTsTest {
84 compilerOptions {
85 types += [ "node" ]
86 }
87 }
88
79 task printVersion {
89 task printVersion {
80 doLast {
90 doLast {
81 println "version: $version";
91 println "version: $version";
82 println "isRelease: $isRelease, tagDistance: $tagDistance";
92 println "tagDistance: $tagDistance";
83 println "packageName: $packageName";
93 println "packageName: $packageName";
84 println "bundle: ${npmPack.outputs.files.join(',')}";
94 println "bundle: ${npmPack.outputs.files.join(',')}";
85 println "target: $jstarget";
95 println "target: $jstarget";
86 println "module: $jsmodule";
96 println "module: $jsmodule";
87 }
97 }
88 }
98 }
89
99
90 task clean {
100 task clean {
91 doLast {
101 doLast {
92 delete buildDir
102 delete buildDir
93 }
103 }
94 }
104 }
95
105
96 npmPackMeta {
106 npmPackMeta {
97 meta {
107 meta {
98 name = "@$npmScope/$npmName"
108 name = packageName
99 }
109 }
100 }
110 }
101
102 task markRelease(type: Exec) {
103 onlyIf { tagDistance > 1 }
104 commandLine "hg", "tag", "v$version";
105 } No newline at end of file
@@ -1,471 +1,471
1 {
1 {
2 "name": "@implab/core",
2 "name": "@implab/core",
3 "version": "0.0.1-dev",
3 "version": "0.0.1-dev",
4 "lockfileVersion": 1,
4 "lockfileVersion": 1,
5 "requires": true,
5 "requires": true,
6 "dependencies": {
6 "dependencies": {
7 "@types/node": {
7 "@types/node": {
8 "version": "10.12.18",
8 "version": "8.10.55",
9 "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
9 "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.55.tgz",
10 "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==",
10 "integrity": "sha512-iZeh1EgupfmAAOASk580R1SL5lWF3CsBVgVH0395qyNF8fhO16xy1UwAav2PdGxIIsYRn7RzJgMGjdsvam6YYg==",
11 "dev": true
11 "dev": true
12 },
12 },
13 "@types/requirejs": {
13 "@types/requirejs": {
14 "version": "2.1.31",
14 "version": "2.1.31",
15 "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz",
15 "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz",
16 "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==",
16 "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==",
17 "dev": true
17 "dev": true
18 },
18 },
19 "@types/tape": {
19 "@types/tape": {
20 "version": "4.2.33",
20 "version": "4.2.33",
21 "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.2.33.tgz",
21 "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.2.33.tgz",
22 "integrity": "sha512-ltfyuY5BIkYlGuQfwqzTDT8f0q8Z5DGppvUnWGs39oqDmMd6/UWhNpX3ZMh/VYvfxs3rFGHMrLC/eGRdLiDGuw==",
22 "integrity": "sha512-ltfyuY5BIkYlGuQfwqzTDT8f0q8Z5DGppvUnWGs39oqDmMd6/UWhNpX3ZMh/VYvfxs3rFGHMrLC/eGRdLiDGuw==",
23 "dev": true,
23 "dev": true,
24 "requires": {
24 "requires": {
25 "@types/node": "*"
25 "@types/node": "*"
26 }
26 }
27 },
27 },
28 "balanced-match": {
28 "balanced-match": {
29 "version": "1.0.0",
29 "version": "1.0.0",
30 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
30 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
31 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
31 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
32 "dev": true
32 "dev": true
33 },
33 },
34 "brace-expansion": {
34 "brace-expansion": {
35 "version": "1.1.11",
35 "version": "1.1.11",
36 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
36 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
37 "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
37 "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
38 "dev": true,
38 "dev": true,
39 "requires": {
39 "requires": {
40 "balanced-match": "^1.0.0",
40 "balanced-match": "^1.0.0",
41 "concat-map": "0.0.1"
41 "concat-map": "0.0.1"
42 }
42 }
43 },
43 },
44 "concat-map": {
44 "concat-map": {
45 "version": "0.0.1",
45 "version": "0.0.1",
46 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
46 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
47 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
47 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
48 "dev": true
48 "dev": true
49 },
49 },
50 "core-util-is": {
50 "core-util-is": {
51 "version": "1.0.2",
51 "version": "1.0.2",
52 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
52 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
53 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
53 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
54 "dev": true
54 "dev": true
55 },
55 },
56 "deep-equal": {
56 "deep-equal": {
57 "version": "0.1.2",
57 "version": "0.1.2",
58 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz",
58 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz",
59 "integrity": "sha1-skbCuApXCkfBG+HZvRBw7IeLh84=",
59 "integrity": "sha1-skbCuApXCkfBG+HZvRBw7IeLh84=",
60 "dev": true
60 "dev": true
61 },
61 },
62 "define-properties": {
62 "define-properties": {
63 "version": "1.1.3",
63 "version": "1.1.3",
64 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
64 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
65 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
65 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
66 "dev": true,
66 "dev": true,
67 "requires": {
67 "requires": {
68 "object-keys": "^1.0.12"
68 "object-keys": "^1.0.12"
69 },
69 },
70 "dependencies": {
70 "dependencies": {
71 "object-keys": {
71 "object-keys": {
72 "version": "1.0.12",
72 "version": "1.0.12",
73 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
73 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
74 "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
74 "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
75 "dev": true
75 "dev": true
76 }
76 }
77 }
77 }
78 },
78 },
79 "defined": {
79 "defined": {
80 "version": "0.0.0",
80 "version": "0.0.0",
81 "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz",
81 "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz",
82 "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=",
82 "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=",
83 "dev": true
83 "dev": true
84 },
84 },
85 "dojo": {
85 "dojo": {
86 "version": "1.14.2",
86 "version": "1.14.2",
87 "resolved": "https://registry.npmjs.org/dojo/-/dojo-1.14.2.tgz",
87 "resolved": "https://registry.npmjs.org/dojo/-/dojo-1.14.2.tgz",
88 "integrity": "sha512-TI+Ytgfh/VfmHWERp45Jte6NFMdoJTPsvUP/uzJUvAXET8FP2h442LePWWJ/q/xZ4V0V8OtdJhx8It/GB+Zbxg==",
88 "integrity": "sha512-TI+Ytgfh/VfmHWERp45Jte6NFMdoJTPsvUP/uzJUvAXET8FP2h442LePWWJ/q/xZ4V0V8OtdJhx8It/GB+Zbxg==",
89 "dev": true
89 "dev": true
90 },
90 },
91 "duplexer": {
91 "duplexer": {
92 "version": "0.1.1",
92 "version": "0.1.1",
93 "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
93 "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
94 "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
94 "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
95 "dev": true
95 "dev": true
96 },
96 },
97 "es-abstract": {
97 "es-abstract": {
98 "version": "1.13.0",
98 "version": "1.13.0",
99 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
99 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
100 "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
100 "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
101 "dev": true,
101 "dev": true,
102 "requires": {
102 "requires": {
103 "es-to-primitive": "^1.2.0",
103 "es-to-primitive": "^1.2.0",
104 "function-bind": "^1.1.1",
104 "function-bind": "^1.1.1",
105 "has": "^1.0.3",
105 "has": "^1.0.3",
106 "is-callable": "^1.1.4",
106 "is-callable": "^1.1.4",
107 "is-regex": "^1.0.4",
107 "is-regex": "^1.0.4",
108 "object-keys": "^1.0.12"
108 "object-keys": "^1.0.12"
109 },
109 },
110 "dependencies": {
110 "dependencies": {
111 "object-keys": {
111 "object-keys": {
112 "version": "1.0.12",
112 "version": "1.0.12",
113 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
113 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
114 "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
114 "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
115 "dev": true
115 "dev": true
116 }
116 }
117 }
117 }
118 },
118 },
119 "es-to-primitive": {
119 "es-to-primitive": {
120 "version": "1.2.0",
120 "version": "1.2.0",
121 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
121 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
122 "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
122 "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
123 "dev": true,
123 "dev": true,
124 "requires": {
124 "requires": {
125 "is-callable": "^1.1.4",
125 "is-callable": "^1.1.4",
126 "is-date-object": "^1.0.1",
126 "is-date-object": "^1.0.1",
127 "is-symbol": "^1.0.2"
127 "is-symbol": "^1.0.2"
128 }
128 }
129 },
129 },
130 "faucet": {
130 "faucet": {
131 "version": "0.0.1",
131 "version": "0.0.1",
132 "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz",
132 "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz",
133 "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=",
133 "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=",
134 "dev": true,
134 "dev": true,
135 "requires": {
135 "requires": {
136 "defined": "0.0.0",
136 "defined": "0.0.0",
137 "duplexer": "~0.1.1",
137 "duplexer": "~0.1.1",
138 "minimist": "0.0.5",
138 "minimist": "0.0.5",
139 "sprintf": "~0.1.3",
139 "sprintf": "~0.1.3",
140 "tap-parser": "~0.4.0",
140 "tap-parser": "~0.4.0",
141 "tape": "~2.3.2",
141 "tape": "~2.3.2",
142 "through2": "~0.2.3"
142 "through2": "~0.2.3"
143 },
143 },
144 "dependencies": {
144 "dependencies": {
145 "tape": {
145 "tape": {
146 "version": "2.3.3",
146 "version": "2.3.3",
147 "resolved": "http://registry.npmjs.org/tape/-/tape-2.3.3.tgz",
147 "resolved": "http://registry.npmjs.org/tape/-/tape-2.3.3.tgz",
148 "integrity": "sha1-Lnzgox3wn41oUWZKcYQuDKUFevc=",
148 "integrity": "sha1-Lnzgox3wn41oUWZKcYQuDKUFevc=",
149 "dev": true,
149 "dev": true,
150 "requires": {
150 "requires": {
151 "deep-equal": "~0.1.0",
151 "deep-equal": "~0.1.0",
152 "defined": "~0.0.0",
152 "defined": "~0.0.0",
153 "inherits": "~2.0.1",
153 "inherits": "~2.0.1",
154 "jsonify": "~0.0.0",
154 "jsonify": "~0.0.0",
155 "resumer": "~0.0.0",
155 "resumer": "~0.0.0",
156 "through": "~2.3.4"
156 "through": "~2.3.4"
157 }
157 }
158 }
158 }
159 }
159 }
160 },
160 },
161 "for-each": {
161 "for-each": {
162 "version": "0.3.3",
162 "version": "0.3.3",
163 "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
163 "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
164 "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
164 "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
165 "dev": true,
165 "dev": true,
166 "requires": {
166 "requires": {
167 "is-callable": "^1.1.3"
167 "is-callable": "^1.1.3"
168 }
168 }
169 },
169 },
170 "fs.realpath": {
170 "fs.realpath": {
171 "version": "1.0.0",
171 "version": "1.0.0",
172 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
172 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
173 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
173 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
174 "dev": true
174 "dev": true
175 },
175 },
176 "function-bind": {
176 "function-bind": {
177 "version": "1.1.1",
177 "version": "1.1.1",
178 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
178 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
179 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
179 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
180 "dev": true
180 "dev": true
181 },
181 },
182 "glob": {
182 "glob": {
183 "version": "7.1.3",
183 "version": "7.1.3",
184 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
184 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
185 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
185 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
186 "dev": true,
186 "dev": true,
187 "requires": {
187 "requires": {
188 "fs.realpath": "^1.0.0",
188 "fs.realpath": "^1.0.0",
189 "inflight": "^1.0.4",
189 "inflight": "^1.0.4",
190 "inherits": "2",
190 "inherits": "2",
191 "minimatch": "^3.0.4",
191 "minimatch": "^3.0.4",
192 "once": "^1.3.0",
192 "once": "^1.3.0",
193 "path-is-absolute": "^1.0.0"
193 "path-is-absolute": "^1.0.0"
194 }
194 }
195 },
195 },
196 "has": {
196 "has": {
197 "version": "1.0.3",
197 "version": "1.0.3",
198 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
198 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
199 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
199 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
200 "dev": true,
200 "dev": true,
201 "requires": {
201 "requires": {
202 "function-bind": "^1.1.1"
202 "function-bind": "^1.1.1"
203 }
203 }
204 },
204 },
205 "has-symbols": {
205 "has-symbols": {
206 "version": "1.0.0",
206 "version": "1.0.0",
207 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
207 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
208 "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
208 "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
209 "dev": true
209 "dev": true
210 },
210 },
211 "inflight": {
211 "inflight": {
212 "version": "1.0.6",
212 "version": "1.0.6",
213 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
213 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
214 "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
214 "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
215 "dev": true,
215 "dev": true,
216 "requires": {
216 "requires": {
217 "once": "^1.3.0",
217 "once": "^1.3.0",
218 "wrappy": "1"
218 "wrappy": "1"
219 }
219 }
220 },
220 },
221 "inherits": {
221 "inherits": {
222 "version": "2.0.3",
222 "version": "2.0.3",
223 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
223 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
224 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
224 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
225 "dev": true
225 "dev": true
226 },
226 },
227 "is-callable": {
227 "is-callable": {
228 "version": "1.1.4",
228 "version": "1.1.4",
229 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
229 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
230 "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
230 "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
231 "dev": true
231 "dev": true
232 },
232 },
233 "is-date-object": {
233 "is-date-object": {
234 "version": "1.0.1",
234 "version": "1.0.1",
235 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
235 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
236 "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
236 "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
237 "dev": true
237 "dev": true
238 },
238 },
239 "is-regex": {
239 "is-regex": {
240 "version": "1.0.4",
240 "version": "1.0.4",
241 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
241 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
242 "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
242 "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
243 "dev": true,
243 "dev": true,
244 "requires": {
244 "requires": {
245 "has": "^1.0.1"
245 "has": "^1.0.1"
246 }
246 }
247 },
247 },
248 "is-symbol": {
248 "is-symbol": {
249 "version": "1.0.2",
249 "version": "1.0.2",
250 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
250 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
251 "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
251 "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
252 "dev": true,
252 "dev": true,
253 "requires": {
253 "requires": {
254 "has-symbols": "^1.0.0"
254 "has-symbols": "^1.0.0"
255 }
255 }
256 },
256 },
257 "isarray": {
257 "isarray": {
258 "version": "0.0.1",
258 "version": "0.0.1",
259 "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
259 "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
260 "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
260 "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
261 "dev": true
261 "dev": true
262 },
262 },
263 "jsonify": {
263 "jsonify": {
264 "version": "0.0.0",
264 "version": "0.0.0",
265 "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
265 "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
266 "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
266 "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
267 "dev": true
267 "dev": true
268 },
268 },
269 "minimatch": {
269 "minimatch": {
270 "version": "3.0.4",
270 "version": "3.0.4",
271 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
271 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
272 "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
272 "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
273 "dev": true,
273 "dev": true,
274 "requires": {
274 "requires": {
275 "brace-expansion": "^1.1.7"
275 "brace-expansion": "^1.1.7"
276 }
276 }
277 },
277 },
278 "minimist": {
278 "minimist": {
279 "version": "0.0.5",
279 "version": "0.0.5",
280 "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz",
280 "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz",
281 "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=",
281 "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=",
282 "dev": true
282 "dev": true
283 },
283 },
284 "object-inspect": {
284 "object-inspect": {
285 "version": "1.6.0",
285 "version": "1.6.0",
286 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
286 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
287 "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==",
287 "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==",
288 "dev": true
288 "dev": true
289 },
289 },
290 "object-keys": {
290 "object-keys": {
291 "version": "0.4.0",
291 "version": "0.4.0",
292 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
292 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
293 "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
293 "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
294 "dev": true
294 "dev": true
295 },
295 },
296 "once": {
296 "once": {
297 "version": "1.4.0",
297 "version": "1.4.0",
298 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
298 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
299 "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
299 "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
300 "dev": true,
300 "dev": true,
301 "requires": {
301 "requires": {
302 "wrappy": "1"
302 "wrappy": "1"
303 }
303 }
304 },
304 },
305 "path-is-absolute": {
305 "path-is-absolute": {
306 "version": "1.0.1",
306 "version": "1.0.1",
307 "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
307 "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
308 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
308 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
309 "dev": true
309 "dev": true
310 },
310 },
311 "path-parse": {
311 "path-parse": {
312 "version": "1.0.6",
312 "version": "1.0.6",
313 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
313 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
314 "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
314 "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
315 "dev": true
315 "dev": true
316 },
316 },
317 "readable-stream": {
317 "readable-stream": {
318 "version": "1.1.14",
318 "version": "1.1.14",
319 "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
319 "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
320 "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
320 "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
321 "dev": true,
321 "dev": true,
322 "requires": {
322 "requires": {
323 "core-util-is": "~1.0.0",
323 "core-util-is": "~1.0.0",
324 "inherits": "~2.0.1",
324 "inherits": "~2.0.1",
325 "isarray": "0.0.1",
325 "isarray": "0.0.1",
326 "string_decoder": "~0.10.x"
326 "string_decoder": "~0.10.x"
327 }
327 }
328 },
328 },
329 "requirejs": {
329 "requirejs": {
330 "version": "2.3.6",
330 "version": "2.3.6",
331 "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
331 "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
332 "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
332 "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
333 "dev": true
333 "dev": true
334 },
334 },
335 "resolve": {
335 "resolve": {
336 "version": "1.7.1",
336 "version": "1.7.1",
337 "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
337 "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
338 "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
338 "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
339 "dev": true,
339 "dev": true,
340 "requires": {
340 "requires": {
341 "path-parse": "^1.0.5"
341 "path-parse": "^1.0.5"
342 }
342 }
343 },
343 },
344 "resumer": {
344 "resumer": {
345 "version": "0.0.0",
345 "version": "0.0.0",
346 "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz",
346 "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz",
347 "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=",
347 "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=",
348 "dev": true,
348 "dev": true,
349 "requires": {
349 "requires": {
350 "through": "~2.3.4"
350 "through": "~2.3.4"
351 }
351 }
352 },
352 },
353 "sprintf": {
353 "sprintf": {
354 "version": "0.1.5",
354 "version": "0.1.5",
355 "resolved": "https://registry.npmjs.org/sprintf/-/sprintf-0.1.5.tgz",
355 "resolved": "https://registry.npmjs.org/sprintf/-/sprintf-0.1.5.tgz",
356 "integrity": "sha1-j4PjmpMXwaUCy324BQ5Rxnn27c8=",
356 "integrity": "sha1-j4PjmpMXwaUCy324BQ5Rxnn27c8=",
357 "dev": true
357 "dev": true
358 },
358 },
359 "string.prototype.trim": {
359 "string.prototype.trim": {
360 "version": "1.1.2",
360 "version": "1.1.2",
361 "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz",
361 "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz",
362 "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=",
362 "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=",
363 "dev": true,
363 "dev": true,
364 "requires": {
364 "requires": {
365 "define-properties": "^1.1.2",
365 "define-properties": "^1.1.2",
366 "es-abstract": "^1.5.0",
366 "es-abstract": "^1.5.0",
367 "function-bind": "^1.0.2"
367 "function-bind": "^1.0.2"
368 }
368 }
369 },
369 },
370 "string_decoder": {
370 "string_decoder": {
371 "version": "0.10.31",
371 "version": "0.10.31",
372 "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
372 "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
373 "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
373 "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
374 "dev": true
374 "dev": true
375 },
375 },
376 "tap-parser": {
376 "tap-parser": {
377 "version": "0.4.3",
377 "version": "0.4.3",
378 "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-0.4.3.tgz",
378 "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-0.4.3.tgz",
379 "integrity": "sha1-pOrhkMENdsehEZIf84u+TVjwnuo=",
379 "integrity": "sha1-pOrhkMENdsehEZIf84u+TVjwnuo=",
380 "dev": true,
380 "dev": true,
381 "requires": {
381 "requires": {
382 "inherits": "~2.0.1",
382 "inherits": "~2.0.1",
383 "readable-stream": "~1.1.11"
383 "readable-stream": "~1.1.11"
384 }
384 }
385 },
385 },
386 "tape": {
386 "tape": {
387 "version": "4.9.2",
387 "version": "4.9.2",
388 "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.2.tgz",
388 "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.2.tgz",
389 "integrity": "sha512-lPXKRKILZ1kZaUy5ynWKs8ATGSUO7HAFHCFnBam6FaGSqPdOwMWbxXHq4EXFLE8WRTleo/YOMXkaUTRmTB1Fiw==",
389 "integrity": "sha512-lPXKRKILZ1kZaUy5ynWKs8ATGSUO7HAFHCFnBam6FaGSqPdOwMWbxXHq4EXFLE8WRTleo/YOMXkaUTRmTB1Fiw==",
390 "dev": true,
390 "dev": true,
391 "requires": {
391 "requires": {
392 "deep-equal": "~1.0.1",
392 "deep-equal": "~1.0.1",
393 "defined": "~1.0.0",
393 "defined": "~1.0.0",
394 "for-each": "~0.3.3",
394 "for-each": "~0.3.3",
395 "function-bind": "~1.1.1",
395 "function-bind": "~1.1.1",
396 "glob": "~7.1.2",
396 "glob": "~7.1.2",
397 "has": "~1.0.3",
397 "has": "~1.0.3",
398 "inherits": "~2.0.3",
398 "inherits": "~2.0.3",
399 "minimist": "~1.2.0",
399 "minimist": "~1.2.0",
400 "object-inspect": "~1.6.0",
400 "object-inspect": "~1.6.0",
401 "resolve": "~1.7.1",
401 "resolve": "~1.7.1",
402 "resumer": "~0.0.0",
402 "resumer": "~0.0.0",
403 "string.prototype.trim": "~1.1.2",
403 "string.prototype.trim": "~1.1.2",
404 "through": "~2.3.8"
404 "through": "~2.3.8"
405 },
405 },
406 "dependencies": {
406 "dependencies": {
407 "deep-equal": {
407 "deep-equal": {
408 "version": "1.0.1",
408 "version": "1.0.1",
409 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
409 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
410 "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
410 "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
411 "dev": true
411 "dev": true
412 },
412 },
413 "defined": {
413 "defined": {
414 "version": "1.0.0",
414 "version": "1.0.0",
415 "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
415 "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
416 "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
416 "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
417 "dev": true
417 "dev": true
418 },
418 },
419 "minimist": {
419 "minimist": {
420 "version": "1.2.0",
420 "version": "1.2.0",
421 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
421 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
422 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
422 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
423 "dev": true
423 "dev": true
424 }
424 }
425 }
425 }
426 },
426 },
427 "through": {
427 "through": {
428 "version": "2.3.8",
428 "version": "2.3.8",
429 "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
429 "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
430 "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
430 "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
431 "dev": true
431 "dev": true
432 },
432 },
433 "through2": {
433 "through2": {
434 "version": "0.2.3",
434 "version": "0.2.3",
435 "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
435 "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
436 "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
436 "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
437 "dev": true,
437 "dev": true,
438 "requires": {
438 "requires": {
439 "readable-stream": "~1.1.9",
439 "readable-stream": "~1.1.9",
440 "xtend": "~2.1.1"
440 "xtend": "~2.1.1"
441 }
441 }
442 },
442 },
443 "tslib": {
443 "tslib": {
444 "version": "1.9.3",
444 "version": "1.9.3",
445 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
445 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
446 "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
446 "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
447 "dev": true
447 "dev": true
448 },
448 },
449 "typescript": {
449 "typescript": {
450 "version": "3.2.2",
450 "version": "3.2.2",
451 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz",
451 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz",
452 "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==",
452 "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==",
453 "dev": true
453 "dev": true
454 },
454 },
455 "wrappy": {
455 "wrappy": {
456 "version": "1.0.2",
456 "version": "1.0.2",
457 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
457 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
458 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
458 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
459 "dev": true
459 "dev": true
460 },
460 },
461 "xtend": {
461 "xtend": {
462 "version": "2.1.2",
462 "version": "2.1.2",
463 "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
463 "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
464 "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
464 "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
465 "dev": true,
465 "dev": true,
466 "requires": {
466 "requires": {
467 "object-keys": "~0.4.0"
467 "object-keys": "~0.4.0"
468 }
468 }
469 }
469 }
470 }
470 }
471 }
471 }
@@ -1,35 +1,35
1 {
1 {
2 "name": "@implab/core",
2 "name": "@implab/core",
3 "version": "0.0.1-dev",
3 "version": "0.0.1-dev",
4 "description": "Dependency injection, logging, simple and fast text template engine",
4 "description": "Dependency injection, logging, simple and fast text template engine",
5 "main": "main.js",
5 "main": "main.js",
6 "keywords": [
6 "keywords": [
7 "di",
7 "di",
8 "ioc",
8 "ioc",
9 "logging",
9 "logging",
10 "template engine",
10 "template engine",
11 "dependency injection"
11 "dependency injection"
12 ],
12 ],
13 "author": "Implab team",
13 "author": "Implab team",
14 "license": "BSD-2-Clause",
14 "license": "BSD-2-Clause",
15 "repository": "https://bitbucket.org/implab/implabjs",
15 "repository": "https://bitbucket.org/implab/implabjs",
16 "publishConfig": {
16 "publishConfig": {
17 "access": "public"
17 "access": "public"
18 },
18 },
19 "peerDependencies": {
19 "peerDependencies": {
20 "dojo": "^1.10.0",
20 "dojo": "^1.10.0",
21 "tslib": "latest"
21 "tslib": "latest"
22 },
22 },
23 "devDependencies": {
23 "devDependencies": {
24 "@types/node": "latest",
24 "@types/node": "^8.0.0",
25 "@types/requirejs": "latest",
25 "@types/requirejs": "latest",
26 "@types/tape": "latest",
26 "@types/tape": "latest",
27 "dojo": "^1.10.0",
27 "dojo": "^1.10.0",
28 "faucet": "latest",
28 "faucet": "latest",
29 "requirejs": "latest",
29 "requirejs": "latest",
30 "tape": "^4.9.2",
30 "tape": "^4.9.2",
31 "tslib": "latest",
31 "tslib": "latest",
32 "typescript": "latest"
32 "typescript": "latest"
33 },
33 },
34 "types": "main.d.ts"
34 "types": "main.d.ts"
35 }
35 }
@@ -1,43 +1,43
1 import { IActivatable, ICancellation, IActivationController } from "@implab/core/interfaces";
1 import { IActivatable, ICancellation, IActivationController } from "../interfaces";
2 import { Cancellation } from "@implab/core/Cancellation";
2 import { Cancellation } from "../Cancellation";
3
3
4 export class MockActivationController implements IActivationController {
4 export class MockActivationController implements IActivationController {
5
5
6 _active: IActivatable = null;
6 _active: IActivatable = null;
7
7
8 getActive(): IActivatable {
8 getActive(): IActivatable {
9 return this._active;
9 return this._active;
10 }
10 }
11
11
12 async deactivate() {
12 async deactivate() {
13 if (this._active)
13 if (this._active)
14 await this._active.deactivate();
14 await this._active.deactivate();
15 this._active = null;
15 this._active = null;
16 }
16 }
17
17
18 async activate(component: IActivatable) {
18 async activate(component: IActivatable) {
19 if (!component || component.isActive())
19 if (!component || component.isActive())
20 return;
20 return;
21 component.setActivationController(this);
21 component.setActivationController(this);
22
22
23 await component.activate();
23 await component.activate();
24 }
24 }
25
25
26 async activating(component: IActivatable, ct: ICancellation = Cancellation.none) {
26 async activating(component: IActivatable, ct: ICancellation = Cancellation.none) {
27 if (component !== this._active)
27 if (component !== this._active)
28 await this.deactivate();
28 await this.deactivate();
29 }
29 }
30
30
31 async activated(component: IActivatable, ct: ICancellation = Cancellation.none) {
31 async activated(component: IActivatable, ct: ICancellation = Cancellation.none) {
32 this._active = component;
32 this._active = component;
33 }
33 }
34
34
35 async deactivating(component: IActivatable, ct: ICancellation = Cancellation.none) {
35 async deactivating(component: IActivatable, ct: ICancellation = Cancellation.none) {
36
36
37 }
37 }
38
38
39 async deactivated(component: IActivatable, ct: ICancellation = Cancellation.none) {
39 async deactivated(component: IActivatable, ct: ICancellation = Cancellation.none) {
40 if (this._active === component)
40 if (this._active === component)
41 this._active = null;
41 this._active = null;
42 }
42 }
43 }
43 }
@@ -1,52 +1,52
1 import {NullConsole} from "@implab/core/log/NullConsole";
1 import {NullConsole} from "../log/NullConsole";
2
2
3 interface ConsoleLineData {
3 interface ConsoleLineData {
4 level: string;
4 level: string;
5 data: any[];
5 data: any[];
6 }
6 }
7
7
8 export class MockConsole extends NullConsole {
8 export class MockConsole extends NullConsole {
9 _buffer: ConsoleLineData[] = [];
9 _buffer: ConsoleLineData[] = [];
10
10
11 debug(...args: any[]) {
11 debug(...args: any[]) {
12 this._buffer.push({
12 this._buffer.push({
13 level: "debug",
13 level: "debug",
14 data: args
14 data: args
15 });
15 });
16 }
16 }
17
17
18 log(...args: any[]) {
18 log(...args: any[]) {
19 this._buffer.push({
19 this._buffer.push({
20 level: "log",
20 level: "log",
21 data: args
21 data: args
22 });
22 });
23 }
23 }
24
24
25 warn(...args: any[]) {
25 warn(...args: any[]) {
26 this._buffer.push({
26 this._buffer.push({
27 level: "warn",
27 level: "warn",
28 data: args
28 data: args
29 });
29 });
30 }
30 }
31
31
32 error(...args: any[]) {
32 error(...args: any[]) {
33 this._buffer.push({
33 this._buffer.push({
34 level: "error",
34 level: "error",
35 data: args
35 data: args
36 });
36 });
37 }
37 }
38
38
39 getBuffer() {
39 getBuffer() {
40 return this._buffer;
40 return this._buffer;
41 }
41 }
42
42
43 getLine(i: number) {
43 getLine(i: number) {
44 if (i >= this._buffer.length)
44 if (i >= this._buffer.length)
45 throw new Error(`Line number ${i} is out of range, buffer.length = ${this._buffer.length}`);
45 throw new Error(`Line number ${i} is out of range, buffer.length = ${this._buffer.length}`);
46 return this._buffer[i].data;
46 return this._buffer[i].data;
47 }
47 }
48
48
49 clear() {
49 clear() {
50 this._buffer = [];
50 this._buffer = [];
51 }
51 }
52 }
52 }
@@ -1,6 +1,6
1 import { AsyncComponent } from "@implab/core/components/AsyncComponent";
1 import { AsyncComponent } from "../components/AsyncComponent";
2 import { ActivatableMixin } from "@implab/core/components/ActivatableMixin";
2 import { ActivatableMixin } from "../components/ActivatableMixin";
3
3
4 export class SimpleActivatable extends ActivatableMixin(AsyncComponent) {
4 export class SimpleActivatable extends ActivatableMixin(AsyncComponent) {
5
5
6 }
6 }
@@ -1,15 +1,14
1 {
1 {
2 "extends": "../tsconfig",
2 "extends": "../tsconfig",
3 "compilerOptions": {
3 "compilerOptions": {
4 "rootDir": "ts",
4 "rootDir": "ts",
5 "baseUrl": ".",
5 "baseUrl": ".",
6 "paths": {
6 "rootDirs": [
7 "@implab/core/*": [
7 "ts",
8 "../../build/dist/*"
8 "../main/ts"
9 ]
9 ]
10 }
11 },
10 },
12 "include" : [
11 "include" : [
13 "ts/**/*.ts"
12 "ts/**/*.ts"
14 ]
13 ]
15 } No newline at end of file
14 }
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now