@schukai/monster 1.30.1 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +17 -1
- package/README.md +55 -58
- package/example/constraints/andoperator.mjs +17 -0
- package/example/constraints/invalid.mjs +6 -0
- package/example/constraints/isarray.mjs +11 -0
- package/example/constraints/isobject.mjs +12 -0
- package/example/constraints/oroperator.mjs +15 -0
- package/example/constraints/valid.mjs +6 -0
- package/example/data/buildmap.mjs +67 -0
- package/example/data/datasource.mjs +7 -0
- package/example/data/diff.mjs +39 -0
- package/example/data/pathfinder-1.mjs +23 -0
- package/example/data/pathfinder-2.mjs +19 -0
- package/example/data/pipe.mjs +14 -0
- package/example/data/storage/restapi.mjs +11 -0
- package/example/data/transformer.mjs +9 -0
- package/example/dom/customelement.mjs +13 -0
- package/example/dom/theme.mjs +5 -0
- package/example/dom/updater.mjs +23 -0
- package/example/i18n/formatter.mjs +10 -0
- package/example/i18n/providers/fetch.mjs +5 -0
- package/example/i18n/translations.mjs +20 -0
- package/example/types/basewithoptions.mjs +10 -0
- package/example/types/is-1.mjs +5 -0
- package/example/types/is-10.mjs +6 -0
- package/example/types/is-2.mjs +4 -0
- package/example/types/is-3.mjs +4 -0
- package/example/types/is-4.mjs +5 -0
- package/example/types/is-5.mjs +4 -0
- package/example/types/is-6.mjs +4 -0
- package/example/types/is-7.mjs +4 -0
- package/example/types/is-8.mjs +4 -0
- package/example/types/is-9.mjs +6 -0
- package/example/types/noderecursiveiterator.mjs +32 -0
- package/example/types/observer.mjs +9 -0
- package/example/types/proxyobserver.mjs +25 -0
- package/example/types/queue.mjs +20 -0
- package/example/types/tokenlist-1.mjs +4 -0
- package/example/types/tokenlist-2.mjs +7 -0
- package/example/types/tokenlist-3.mjs +5 -0
- package/example/types/tokenlist-4.mjs +5 -0
- package/example/types/tokenlist-5.mjs +5 -0
- package/example/types/typeof.mjs +9 -0
- package/example/types/version-1.mjs +6 -0
- package/example/types/version-2.mjs +3 -0
- package/example/util/comparator.mjs +10 -0
- package/example/util/deadmansswitch.mjs +9 -0
- package/example/util/processing.mjs +17 -0
- package/package.json +5 -59
- package/source/{constants.js → constants.mjs} +7 -10
- package/source/constraints/{abstract.js → abstract.mjs} +8 -9
- package/source/constraints/{abstractoperator.js → abstractoperator.mjs} +11 -8
- package/source/constraints/andoperator.mjs +38 -0
- package/source/constraints/invalid.mjs +38 -0
- package/source/constraints/isarray.mjs +41 -0
- package/source/constraints/isobject.mjs +41 -0
- package/source/constraints/{namespace.js → namespace.mjs} +3 -8
- package/source/constraints/{oroperator.js → oroperator.mjs} +10 -42
- package/source/constraints/valid.mjs +38 -0
- package/source/data/{buildmap.js → buildmap.mjs} +18 -104
- package/source/data/{buildtree.js → buildtree.mjs} +11 -31
- package/source/data/datasource/{namespace.js → namespace.mjs} +1 -9
- package/source/data/datasource/restapi/namespace.mjs +8 -0
- package/source/data/datasource/restapi/{writeerror.js → writeerror.mjs} +8 -9
- package/source/data/datasource/{restapi.js → restapi.mjs} +15 -45
- package/source/data/datasource/storage/localstorage.mjs +45 -0
- package/source/data/datasource/storage/{namespace.js → namespace.mjs} +1 -9
- package/source/data/datasource/storage/sessionstorage.mjs +45 -0
- package/source/data/datasource/{storage.js → storage.mjs} +12 -35
- package/source/data/{datasource.js → datasource.mjs} +17 -45
- package/source/data/{diff.js → diff.mjs} +10 -69
- package/source/data/{extend.js → extend.mjs} +10 -28
- package/source/data/{namespace.js → namespace.mjs} +2 -8
- package/source/data/{pathfinder.js → pathfinder.mjs} +18 -77
- package/source/data/{pipe.js → pipe.mjs} +14 -46
- package/source/data/{transformer.js → transformer.mjs} +18 -43
- package/source/dom/{assembler.js → assembler.mjs} +12 -28
- package/source/dom/{attributes.js → attributes.mjs} +42 -253
- package/source/dom/{constants.js → constants.mjs} +110 -61
- package/source/dom/{customcontrol.js → customcontrol.mjs} +10 -17
- package/source/dom/{customelement.js → customelement.mjs} +30 -53
- package/source/dom/{events.js → events.mjs} +15 -64
- package/source/dom/{focusmanager.js → focusmanager.mjs} +13 -34
- package/source/dom/{locale.js → locale.mjs} +11 -26
- package/source/dom/{namespace.js → namespace.mjs} +1 -8
- package/source/dom/ready.mjs +63 -0
- package/source/dom/resource/{data.js → data.mjs} +11 -31
- package/source/dom/resource/link/namespace.mjs +10 -0
- package/source/dom/resource/link/stylesheet.mjs +35 -0
- package/source/dom/resource/{link.js → link.mjs} +9 -29
- package/source/dom/resource/namespace.mjs +8 -0
- package/source/dom/resource/{script.js → script.mjs} +9 -29
- package/source/dom/{resource.js → resource.mjs} +19 -39
- package/source/dom/{resourcemanager.js → resourcemanager.mjs} +17 -35
- package/source/dom/{template.js → template.mjs} +18 -43
- package/source/dom/{theme.js → theme.mjs} +14 -36
- package/source/dom/{updater.js → updater.mjs} +34 -68
- package/source/dom/{util.js → util.mjs} +17 -66
- package/source/dom/worker/{factory.js → factory.mjs} +13 -34
- package/source/dom/worker/namespace.mjs +8 -0
- package/source/i18n/{formatter.js → formatter.mjs} +14 -45
- package/source/i18n/{locale.js → locale.mjs} +15 -30
- package/source/i18n/{namespace.js → namespace.mjs} +1 -9
- package/source/i18n/provider.mjs +40 -0
- package/source/i18n/providers/{fetch.js → fetch.mjs} +18 -43
- package/source/i18n/providers/namespace.mjs +8 -0
- package/source/i18n/{translations.js → translations.mjs} +12 -52
- package/source/logging/handler/console.mjs +50 -0
- package/source/logging/handler/namespace.mjs +6 -0
- package/source/logging/{handler.js → handler.mjs} +13 -30
- package/source/logging/logentry.mjs +51 -0
- package/source/logging/{logger.js → logger.mjs} +12 -28
- package/source/logging/{namespace.js → namespace.mjs} +1 -9
- package/source/math/{namespace.js → namespace.mjs} +1 -9
- package/source/math/{random.js → random.mjs} +8 -34
- package/source/monster.mjs +114 -0
- package/source/text/{formatter.js → formatter.mjs} +17 -33
- package/source/text/{namespace.js → namespace.mjs} +1 -9
- package/source/types/base.mjs +31 -0
- package/source/types/{basewithoptions.js → basewithoptions.mjs} +17 -46
- package/source/types/{binary.js → binary.mjs} +10 -42
- package/source/types/{dataurl.js → dataurl.mjs} +12 -46
- package/source/types/{global.js → global.mjs} +20 -12
- package/source/types/{id.js → id.mjs} +10 -27
- package/source/types/is.mjs +225 -0
- package/source/types/{mediatype.js → mediatype.mjs} +13 -29
- package/source/types/{namespace.js → namespace.mjs} +1 -8
- package/source/types/{node.js → node.mjs} +11 -28
- package/source/types/{nodelist.js → nodelist.mjs} +17 -32
- package/source/types/{noderecursiveiterator.js → noderecursiveiterator.mjs} +14 -65
- package/source/types/{observer.js → observer.mjs} +15 -42
- package/source/types/{observerlist.js → observerlist.mjs} +12 -29
- package/source/types/{proxyobserver.js → proxyobserver.mjs} +19 -62
- package/source/types/{queue.js → queue.mjs} +10 -47
- package/source/types/randomid.mjs +45 -0
- package/source/types/regex.mjs +27 -0
- package/source/types/{stack.js → stack.mjs} +8 -24
- package/source/types/{tokenlist.js → tokenlist.mjs} +20 -64
- package/source/types/typeof.mjs +37 -0
- package/source/types/{uniquequeue.js → uniquequeue.mjs} +11 -27
- package/source/types/{uuid.js → uuid.mjs} +15 -33
- package/source/types/{validate.js → validate.mjs} +38 -155
- package/source/types/{version.js → version.mjs} +19 -62
- package/source/util/{clone.js → clone.mjs} +10 -28
- package/source/util/{comparator.js → comparator.mjs} +13 -43
- package/source/util/{deadmansswitch.js → deadmansswitch.mjs} +15 -40
- package/source/util/freeze.mjs +39 -0
- package/source/util/{namespace.js → namespace.mjs} +1 -9
- package/source/util/{processing.js → processing.mjs} +13 -51
- package/source/util/{trimspaces.js → trimspaces.mjs} +14 -21
- package/test/cases/constraint/{andoperator.js → andoperator.mjs} +3 -3
- package/test/cases/constraint/{invalid.js → invalid.mjs} +1 -1
- package/test/cases/constraint/{isarray.js → isarray.mjs} +1 -1
- package/test/cases/constraint/{isobject.js → isobject.mjs} +1 -1
- package/test/cases/constraint/{oroperator.js → oroperator.mjs} +3 -3
- package/test/cases/constraint/{valid.js → valid.mjs} +1 -1
- package/test/cases/data/{buildmap.js → buildmap.mjs} +1 -1
- package/test/cases/data/{buildtree.js → buildtree.mjs} +2 -2
- package/test/cases/data/datasource/{restapi.js → restapi.mjs} +5 -5
- package/test/cases/data/datasource/storage/{localstorage.js → localstorage.mjs} +5 -5
- package/test/cases/data/datasource/storage/{sessionstorage.js → sessionstorage.mjs} +5 -5
- package/test/cases/data/{datasource.js → datasource.mjs} +1 -1
- package/test/cases/data/{diff.js → diff.mjs} +2 -2
- package/test/cases/data/{extend.js → extend.mjs} +1 -1
- package/test/cases/data/{pathfinder.js → pathfinder.mjs} +1 -1
- package/test/cases/data/{pipe.js → pipe.mjs} +19 -5
- package/test/cases/data/{transformer.js → transformer.mjs} +14 -10
- package/test/cases/dom/{assembler.js → assembler.mjs} +2 -2
- package/test/cases/dom/{attributes.js → attributes.mjs} +2 -2
- package/test/cases/dom/{customcontrol.js → customcontrol.mjs} +6 -6
- package/test/cases/dom/{customelement.js → customelement.mjs} +6 -6
- package/test/cases/dom/{events.js → events.mjs} +2 -2
- package/test/cases/dom/{focusmanager.js → focusmanager.mjs} +3 -3
- package/test/cases/dom/{locale.js → locale.mjs} +2 -2
- package/test/cases/dom/ready.mjs +42 -0
- package/test/cases/dom/resource/{data.js → data.mjs} +9 -9
- package/test/cases/dom/resource/link/{stylesheet.js → stylesheet.mjs} +6 -6
- package/test/cases/dom/resource/{link.js → link.mjs} +6 -6
- package/test/cases/dom/resource/{script.js → script.mjs} +6 -6
- package/test/cases/dom/{resourcemanager.js → resourcemanager.mjs} +6 -6
- package/test/cases/dom/{template.js → template.mjs} +3 -3
- package/test/cases/dom/{theme.js → theme.mjs} +3 -3
- package/test/cases/dom/{updater.js → updater.mjs} +6 -6
- package/test/cases/dom/{util.js → util.mjs} +2 -2
- package/test/cases/dom/worker/{factory.js → factory.mjs} +4 -4
- package/test/cases/i18n/{formatter.js → formatter.mjs} +2 -2
- package/test/cases/i18n/{locale.js → locale.mjs} +1 -1
- package/test/cases/i18n/{provider.js → provider.mjs} +1 -1
- package/test/cases/i18n/providers/{fetch.js → fetch.mjs} +3 -3
- package/test/cases/i18n/{translations.js → translations.mjs} +2 -2
- package/test/cases/logging/handler/{console.js → console.mjs} +3 -3
- package/test/cases/logging/{handler.js → handler.mjs} +3 -3
- package/test/cases/logging/{logentry.js → logentry.mjs} +1 -1
- package/test/cases/logging/{logger.js → logger.mjs} +1 -1
- package/test/cases/math/random.mjs +101 -0
- package/test/cases/monster.mjs +20 -0
- package/test/cases/text/{formatter.js → formatter.mjs} +1 -1
- package/test/cases/types/{base.js → base.mjs} +1 -1
- package/test/cases/types/{basewithoptions.js → basewithoptions.mjs} +1 -1
- package/test/cases/types/{binary.js → binary.mjs} +1 -1
- package/test/cases/types/{dataurl.js → dataurl.mjs} +1 -1
- package/test/cases/types/{global.js → global.mjs} +1 -1
- package/test/cases/types/{id.js → id.mjs} +17 -6
- package/test/cases/types/{is.js → is.mjs} +20 -8
- package/test/cases/types/{mediatype.js → mediatype.mjs} +1 -1
- package/test/cases/types/{node.js → node.mjs} +3 -3
- package/test/cases/types/{nodelist.js → nodelist.mjs} +2 -2
- package/test/cases/types/{noderecursiveiterator.js → noderecursiveiterator.mjs} +3 -3
- package/test/cases/types/{observer.js → observer.mjs} +1 -1
- package/test/cases/types/{observerlist.js → observerlist.mjs} +2 -2
- package/test/cases/types/{proxyobserver.js → proxyobserver.mjs} +4 -4
- package/test/cases/types/{queue.js → queue.mjs} +1 -1
- package/test/cases/types/randomid.mjs +39 -0
- package/test/cases/types/regex.mjs +46 -0
- package/test/cases/types/{stack.js → stack.mjs} +1 -1
- package/test/cases/types/{tokenlist.js → tokenlist.mjs} +1 -1
- package/test/cases/types/{typeof.js → typeof.mjs} +3 -4
- package/test/cases/types/{uniquequeue.js → uniquequeue.mjs} +1 -1
- package/test/cases/types/{uuid.js → uuid.mjs} +30 -10
- package/test/cases/types/{validate.js → validate.mjs} +3 -4
- package/test/cases/types/{version.js → version.mjs} +1 -2
- package/test/cases/util/{clone.js → clone.mjs} +1 -1
- package/test/cases/util/{comparator.js → comparator.mjs} +1 -1
- package/test/cases/util/{deadmansswitch.js → deadmansswitch.mjs} +1 -1
- package/test/cases/util/{freeze.js → freeze.mjs} +1 -1
- package/test/cases/util/{processing.js → processing.mjs} +1 -1
- package/test/cases/util/{trimspaces.js → trimspaces.mjs} +1 -1
- package/test/util/{chai-dom.js → chai-dom.mjs} +0 -0
- package/test/util/{cleanupdom.js → cleanupdom.mjs} +0 -0
- package/test/util/{jsdom.js → jsdom.mjs} +2 -2
- package/test/util/{localstorage.js → localstorage.mjs} +0 -0
- package/test/web/import.js +77 -77
- package/test/web/prepare.js +0 -8
- package/test/web/test.html +5 -4
- package/test/web/tests.js +25731 -587
- package/dist/modules/constants.js +0 -2
- package/dist/modules/constraints/abstract.js +0 -2
- package/dist/modules/constraints/abstractoperator.js +0 -2
- package/dist/modules/constraints/andoperator.js +0 -2
- package/dist/modules/constraints/invalid.js +0 -2
- package/dist/modules/constraints/isarray.js +0 -2
- package/dist/modules/constraints/isobject.js +0 -2
- package/dist/modules/constraints/namespace.js +0 -2
- package/dist/modules/constraints/oroperator.js +0 -2
- package/dist/modules/constraints/valid.js +0 -2
- package/dist/modules/data/buildmap.js +0 -2
- package/dist/modules/data/buildtree.js +0 -2
- package/dist/modules/data/datasource/namespace.js +0 -2
- package/dist/modules/data/datasource/restapi/writeerror.js +0 -2
- package/dist/modules/data/datasource/restapi.js +0 -2
- package/dist/modules/data/datasource/storage/localstorage.js +0 -2
- package/dist/modules/data/datasource/storage/namespace.js +0 -2
- package/dist/modules/data/datasource/storage/sessionstorage.js +0 -2
- package/dist/modules/data/datasource/storage.js +0 -2
- package/dist/modules/data/datasource.js +0 -2
- package/dist/modules/data/diff.js +0 -2
- package/dist/modules/data/extend.js +0 -2
- package/dist/modules/data/namespace.js +0 -2
- package/dist/modules/data/pathfinder.js +0 -2
- package/dist/modules/data/pipe.js +0 -2
- package/dist/modules/data/transformer.js +0 -2
- package/dist/modules/dom/assembler.js +0 -2
- package/dist/modules/dom/attributes.js +0 -2
- package/dist/modules/dom/constants.js +0 -2
- package/dist/modules/dom/customcontrol.js +0 -2
- package/dist/modules/dom/customelement.js +0 -2
- package/dist/modules/dom/events.js +0 -2
- package/dist/modules/dom/focusmanager.js +0 -2
- package/dist/modules/dom/locale.js +0 -2
- package/dist/modules/dom/namespace.js +0 -2
- package/dist/modules/dom/resource/data.js +0 -2
- package/dist/modules/dom/resource/link/stylesheet.js +0 -2
- package/dist/modules/dom/resource/link.js +0 -2
- package/dist/modules/dom/resource/script.js +0 -2
- package/dist/modules/dom/resource.js +0 -2
- package/dist/modules/dom/resourcemanager.js +0 -2
- package/dist/modules/dom/template.js +0 -2
- package/dist/modules/dom/theme.js +0 -2
- package/dist/modules/dom/updater.js +0 -2
- package/dist/modules/dom/util.js +0 -2
- package/dist/modules/dom/worker/factory.js +0 -2
- package/dist/modules/i18n/formatter.js +0 -2
- package/dist/modules/i18n/locale.js +0 -2
- package/dist/modules/i18n/namespace.js +0 -2
- package/dist/modules/i18n/provider.js +0 -2
- package/dist/modules/i18n/providers/fetch.js +0 -2
- package/dist/modules/i18n/providers/namespace.js +0 -2
- package/dist/modules/i18n/translations.js +0 -2
- package/dist/modules/logging/handler/console.js +0 -2
- package/dist/modules/logging/handler/namespace.js +0 -2
- package/dist/modules/logging/handler.js +0 -2
- package/dist/modules/logging/logentry.js +0 -2
- package/dist/modules/logging/logger.js +0 -2
- package/dist/modules/logging/namespace.js +0 -2
- package/dist/modules/math/namespace.js +0 -2
- package/dist/modules/math/random.js +0 -2
- package/dist/modules/monster.js +0 -2
- package/dist/modules/namespace.js +0 -2
- package/dist/modules/text/formatter.js +0 -2
- package/dist/modules/text/namespace.js +0 -2
- package/dist/modules/types/base.js +0 -2
- package/dist/modules/types/basewithoptions.js +0 -2
- package/dist/modules/types/binary.js +0 -2
- package/dist/modules/types/dataurl.js +0 -2
- package/dist/modules/types/global.js +0 -2
- package/dist/modules/types/id.js +0 -2
- package/dist/modules/types/is.js +0 -2
- package/dist/modules/types/mediatype.js +0 -2
- package/dist/modules/types/namespace.js +0 -2
- package/dist/modules/types/node.js +0 -2
- package/dist/modules/types/nodelist.js +0 -2
- package/dist/modules/types/noderecursiveiterator.js +0 -2
- package/dist/modules/types/observer.js +0 -2
- package/dist/modules/types/observerlist.js +0 -2
- package/dist/modules/types/proxyobserver.js +0 -2
- package/dist/modules/types/queue.js +0 -2
- package/dist/modules/types/randomid.js +0 -2
- package/dist/modules/types/regex.js +0 -2
- package/dist/modules/types/stack.js +0 -2
- package/dist/modules/types/tokenlist.js +0 -2
- package/dist/modules/types/typeof.js +0 -2
- package/dist/modules/types/uniquequeue.js +0 -2
- package/dist/modules/types/uuid.js +0 -2
- package/dist/modules/types/validate.js +0 -2
- package/dist/modules/types/version.js +0 -2
- package/dist/modules/util/clone.js +0 -2
- package/dist/modules/util/comparator.js +0 -2
- package/dist/modules/util/deadmansswitch.js +0 -2
- package/dist/modules/util/freeze.js +0 -2
- package/dist/modules/util/namespace.js +0 -2
- package/dist/modules/util/processing.js +0 -2
- package/dist/modules/util/trimspaces.js +0 -2
- package/dist/monster.dev.js +0 -15489
- package/dist/monster.dev.js.map +0 -1
- package/dist/monster.js +0 -2
- package/source/constraints/andoperator.js +0 -71
- package/source/constraints/invalid.js +0 -63
- package/source/constraints/isarray.js +0 -71
- package/source/constraints/isobject.js +0 -72
- package/source/constraints/valid.js +0 -63
- package/source/data/datasource/storage/localstorage.js +0 -64
- package/source/data/datasource/storage/sessionstorage.js +0 -61
- package/source/dom/resource/link/stylesheet.js +0 -54
- package/source/i18n/provider.js +0 -58
- package/source/i18n/providers/namespace.js +0 -16
- package/source/logging/handler/console.js +0 -66
- package/source/logging/handler/namespace.js +0 -14
- package/source/logging/logentry.js +0 -68
- package/source/monster.js +0 -80
- package/source/namespace.js +0 -170
- package/source/types/base.js +0 -50
- package/source/types/is.js +0 -429
- package/source/types/package.d.ts +0 -1
- package/source/types/randomid.js +0 -60
- package/source/types/regex.js +0 -49
- package/source/types/typeof.js +0 -63
- package/source/util/freeze.js +0 -57
- package/test/cases/math/random.js +0 -82
- package/test/cases/monster.js +0 -23
- package/test/cases/namespace.js +0 -93
- package/test/cases/types/randomid.js +0 -24
- package/test/cases/types/regex.js +0 -32
- package/test/web/monster-dev.html +0 -22
- package/test/web/monster.html +0 -21
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
|
-
import {SessionStorage} from "
|
5
|
-
import {createStorage} from "../../../../util/localstorage.
|
4
|
+
import {SessionStorage} from "../../../../../../application/source/data/datasource/storage/sessionstorage.mjs";
|
5
|
+
import {createStorage} from "../../../../util/localstorage.mjs";
|
6
6
|
|
7
7
|
|
8
8
|
let storageReference;
|
@@ -10,13 +10,13 @@ let storageReference;
|
|
10
10
|
describe('SessionStorage', function () {
|
11
11
|
|
12
12
|
afterEach(() => {
|
13
|
-
|
13
|
+
globalThis['sessionStorage'] = storageReference;
|
14
14
|
});
|
15
15
|
|
16
16
|
beforeEach(function () {
|
17
17
|
|
18
|
-
storageReference =
|
19
|
-
|
18
|
+
storageReference = globalThis['sessionStorage']
|
19
|
+
globalThis['sessionStorage'] = createStorage();
|
20
20
|
|
21
21
|
})
|
22
22
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
|
-
import {diff} from "
|
5
|
-
import {Queue} from "
|
4
|
+
import {diff} from "../../../../application/source/data/diff.mjs";
|
5
|
+
import {Queue} from "../../../../application/source/types/queue.mjs";
|
6
6
|
|
7
7
|
describe('Diff', function () {
|
8
8
|
|
@@ -1,14 +1,28 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
import * as Crypto from "@peculiar/webcrypto";
|
4
3
|
import {expect} from "chai"
|
5
|
-
import {Pipe} from "
|
4
|
+
import {Pipe} from "../../../../application/source/data/pipe.mjs";
|
5
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
6
6
|
|
7
|
-
if (!global['crypto']) {
|
8
|
-
global['crypto'] = new Crypto.Crypto();
|
9
|
-
}
|
10
7
|
|
11
8
|
describe('Pipe', function () {
|
9
|
+
|
10
|
+
before(function (done) {
|
11
|
+
|
12
|
+
let promises = []
|
13
|
+
if(!globalThis['crypto']) {
|
14
|
+
promises.push(import("@peculiar/webcrypto").then(m => {
|
15
|
+
globalThis['crypto'] = new m.Crypto();
|
16
|
+
return true;
|
17
|
+
}))
|
18
|
+
}
|
19
|
+
|
20
|
+
Promise.all(promises).then(() => {
|
21
|
+
done()
|
22
|
+
});
|
23
|
+
|
24
|
+
});
|
25
|
+
|
12
26
|
describe('run different pipes', function () {
|
13
27
|
[
|
14
28
|
['path:b | if:x:\\ ', {a:true}, ' '], // '\\ '.length ↦ 2
|
@@ -1,23 +1,27 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
import * as Crypto from "@peculiar/webcrypto";
|
4
3
|
import {expect} from "chai"
|
5
|
-
import {Transformer} from "
|
6
|
-
import {initJSDOM} from "../../util/jsdom.
|
7
|
-
|
8
|
-
|
9
|
-
if (!global['crypto']) {
|
10
|
-
global['crypto'] = new Crypto.Crypto();
|
11
|
-
}
|
4
|
+
import {Transformer} from "../../../../application/source/data/transformer.mjs";
|
5
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
12
6
|
|
13
7
|
describe('Transformer', function () {
|
14
8
|
|
15
9
|
before(function (done) {
|
16
|
-
|
10
|
+
|
11
|
+
let promises = []
|
12
|
+
promises.push(initJSDOM());
|
13
|
+
if(!globalThis['crypto']) {
|
14
|
+
promises.push(import("@peculiar/webcrypto").then(m => {
|
15
|
+
globalThis['crypto'] = new m.Crypto();
|
16
|
+
return true;
|
17
|
+
}))
|
18
|
+
}
|
19
|
+
|
20
|
+
Promise.all(promises).then(() => {
|
17
21
|
done()
|
18
22
|
});
|
19
|
-
});
|
20
23
|
|
24
|
+
});
|
21
25
|
|
22
26
|
describe('Transformer.run()', function () {
|
23
27
|
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
4
|
|
5
|
-
import {ATTRIBUTEPREFIX, Assembler} from "
|
6
|
-
import {initJSDOM} from "../../util/jsdom.
|
5
|
+
import {ATTRIBUTEPREFIX, Assembler} from "../../../../application/source/dom/assembler.mjs";
|
6
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
7
7
|
|
8
8
|
describe('Assembler', function () {
|
9
9
|
before(async function () {
|
@@ -16,9 +16,9 @@ import {
|
|
16
16
|
replaceAttributeToken,
|
17
17
|
toggleAttributeToken,
|
18
18
|
findClosestByClass
|
19
|
-
} from "
|
19
|
+
} from "../../../../application/source/dom/attributes.mjs";
|
20
20
|
|
21
|
-
import {initJSDOM} from "../../util/jsdom.
|
21
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
22
22
|
|
23
23
|
let html1, html2, html3;
|
24
24
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {ATTRIBUTE_OPTIONS} from "
|
5
|
-
import {getDocument} from "
|
6
|
-
import {chaiDom} from "../../util/chai-dom.
|
7
|
-
import {initJSDOM} from "../../util/jsdom.
|
4
|
+
import {ATTRIBUTE_OPTIONS} from "../../../../application/source/dom/constants.mjs";
|
5
|
+
import {getDocument} from "../../../../application/source/dom/util.mjs";
|
6
|
+
import {chaiDom} from "../../util/chai-dom.mjs";
|
7
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
8
8
|
|
9
9
|
|
10
10
|
let expect = chai.expect;
|
@@ -27,11 +27,11 @@ describe('DOM', function () {
|
|
27
27
|
// jsdom does not support ElementInternals
|
28
28
|
jsdomFlag = navigator.userAgent.includes("jsdom");
|
29
29
|
|
30
|
-
import("
|
30
|
+
import("../../../../application/source/dom/customelement.mjs").then((m) => {
|
31
31
|
registerCustomElement = m['registerCustomElement'];
|
32
32
|
|
33
33
|
|
34
|
-
import("
|
34
|
+
import("../../../../application/source/dom/customcontrol.mjs").then((m) => {
|
35
35
|
|
36
36
|
document = getDocument();
|
37
37
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {internalSymbol} from "
|
5
|
-
import {ATTRIBUTE_OPTIONS} from "
|
6
|
-
import {getDocument} from "
|
7
|
-
import {chaiDom} from "../../util/chai-dom.
|
8
|
-
import {initJSDOM} from "../../util/jsdom.
|
4
|
+
import {internalSymbol} from "../../../../application/source/constants.mjs";
|
5
|
+
import {ATTRIBUTE_OPTIONS} from "../../../../application/source/dom/constants.mjs";
|
6
|
+
import {getDocument} from "../../../../application/source/dom/util.mjs";
|
7
|
+
import {chaiDom} from "../../util/chai-dom.mjs";
|
8
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
9
9
|
|
10
10
|
|
11
11
|
let expect = chai.expect;
|
@@ -26,7 +26,7 @@ describe('DOM', function () {
|
|
26
26
|
before(function (done) {
|
27
27
|
initJSDOM().then(() => {
|
28
28
|
|
29
|
-
import("
|
29
|
+
import("../../../../application/source/dom/customelement.mjs").then((m) => {
|
30
30
|
|
31
31
|
try {
|
32
32
|
CustomElement = m['CustomElement'];
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
4
|
|
5
|
-
import {fireEvent, findTargetElementFromEvent, fireCustomEvent} from "
|
6
|
-
import {initJSDOM} from "../../util/jsdom.
|
5
|
+
import {fireEvent, findTargetElementFromEvent, fireCustomEvent} from "../../../../application/source/dom/events.mjs";
|
6
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
7
7
|
|
8
8
|
describe('Events', function () {
|
9
9
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import {expect} from "chai";
|
4
|
-
import {FocusManager} from "
|
5
|
-
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../util/cleanupdom.
|
6
|
-
import {initJSDOM} from "../../util/jsdom.
|
4
|
+
import {FocusManager} from "../../../../application/source/dom/focusmanager.mjs";
|
5
|
+
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../util/cleanupdom.mjs";
|
6
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
7
7
|
|
8
8
|
describe('FocusManager', function () {
|
9
9
|
before(function (done) {
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
4
|
|
5
|
-
import {getLocaleOfDocument} from "
|
6
|
-
import {initJSDOM} from "../../util/jsdom.
|
5
|
+
import {getLocaleOfDocument} from "../../../../application/source/dom/locale.mjs";
|
6
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
7
7
|
|
8
8
|
describe('Attributes', function () {
|
9
9
|
before(function (done) {
|
@@ -0,0 +1,42 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
|
4
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
5
|
+
|
6
|
+
let windowReady;
|
7
|
+
let domReady;
|
8
|
+
|
9
|
+
describe('Ready', function () {
|
10
|
+
|
11
|
+
before(function (done) {
|
12
|
+
initJSDOM().then(() => {
|
13
|
+
|
14
|
+
import("../../../../application/source/dom/ready.mjs").then((m) => {
|
15
|
+
domReady = m['domReady'];
|
16
|
+
windowReady = m['windowReady'];
|
17
|
+
done()
|
18
|
+
});
|
19
|
+
|
20
|
+
});
|
21
|
+
|
22
|
+
|
23
|
+
})
|
24
|
+
|
25
|
+
describe('domReady', function () {
|
26
|
+
|
27
|
+
it('resolve promise', function (done) {
|
28
|
+
domReady.then(done).catch(e => done(e));
|
29
|
+
});
|
30
|
+
|
31
|
+
});
|
32
|
+
|
33
|
+
describe('windowReady', function () {
|
34
|
+
|
35
|
+
it('resolve promise', function (done) {
|
36
|
+
windowReady.then(done).catch(e => done(e));
|
37
|
+
});
|
38
|
+
|
39
|
+
});
|
40
|
+
|
41
|
+
|
42
|
+
});
|
@@ -1,12 +1,12 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {Data} from "
|
5
|
-
import {DataUrl} from "
|
6
|
-
import {ID} from "
|
7
|
-
import {chaiDom} from "../../../util/chai-dom.
|
8
|
-
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../util/cleanupdom.
|
9
|
-
import {initJSDOM} from "../../../util/jsdom.
|
4
|
+
import {Data} from "../../../../../application/source/dom/resource/data.mjs";
|
5
|
+
import {DataUrl} from "../../../../../application/source/types/dataurl.mjs";
|
6
|
+
import {ID} from "../../../../../application/source/types/id.mjs";
|
7
|
+
import {chaiDom} from "../../../util/chai-dom.mjs";
|
8
|
+
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../util/cleanupdom.mjs";
|
9
|
+
import {initJSDOM} from "../../../util/jsdom.mjs";
|
10
10
|
|
11
11
|
let expect = chai.expect;
|
12
12
|
|
@@ -33,8 +33,8 @@ describe('Data', function () {
|
|
33
33
|
initMutationObserverForTesting()
|
34
34
|
|
35
35
|
returnStatus = 200;
|
36
|
-
fetchReference =
|
37
|
-
|
36
|
+
fetchReference = globalThis['fetch'];
|
37
|
+
globalThis['fetch'] = function (url, options) {
|
38
38
|
|
39
39
|
if (!url) throw new Error('missing url')
|
40
40
|
|
@@ -55,7 +55,7 @@ describe('Data', function () {
|
|
55
55
|
})
|
56
56
|
|
57
57
|
afterEach(() => {
|
58
|
-
|
58
|
+
globalThis['fetch'] = fetchReference;
|
59
59
|
cleanupDOMFromTesting();
|
60
60
|
})
|
61
61
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {Stylesheet} from "
|
5
|
-
import {DataUrl} from "
|
6
|
-
import {ID} from "
|
7
|
-
import {chaiDom} from "../../../../util/chai-dom.
|
8
|
-
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../../util/cleanupdom.
|
9
|
-
import {initJSDOM} from "../../../../util/jsdom.
|
4
|
+
import {Stylesheet} from "../../../../../../application/source/dom/resource/link/stylesheet.mjs";
|
5
|
+
import {DataUrl} from "../../../../../../application/source/types/dataurl.mjs";
|
6
|
+
import {ID} from "../../../../../../application/source/types/id.mjs";
|
7
|
+
import {chaiDom} from "../../../../util/chai-dom.mjs";
|
8
|
+
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../../util/cleanupdom.mjs";
|
9
|
+
import {initJSDOM} from "../../../../util/jsdom.mjs";
|
10
10
|
|
11
11
|
let expect = chai.expect;
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {Link} from "
|
5
|
-
import {DataUrl} from "
|
6
|
-
import {ID} from "
|
7
|
-
import {chaiDom} from "../../../util/chai-dom.
|
8
|
-
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../util/cleanupdom.
|
9
|
-
import {initJSDOM} from "../../../util/jsdom.
|
4
|
+
import {Link} from "../../../../../application/source/dom/resource/link.mjs";
|
5
|
+
import {DataUrl} from "../../../../../application/source/types/dataurl.mjs";
|
6
|
+
import {ID} from "../../../../../application/source/types/id.mjs";
|
7
|
+
import {chaiDom} from "../../../util/chai-dom.mjs";
|
8
|
+
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../util/cleanupdom.mjs";
|
9
|
+
import {initJSDOM} from "../../../util/jsdom.mjs";
|
10
10
|
|
11
11
|
let expect = chai.expect;
|
12
12
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {Script} from "
|
5
|
-
import {DataUrl} from "
|
6
|
-
import {ID} from "
|
7
|
-
import {chaiDom} from "../../../util/chai-dom.
|
8
|
-
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../util/cleanupdom.
|
9
|
-
import {initJSDOM} from "../../../util/jsdom.
|
4
|
+
import {Script} from "../../../../../application/source/dom/resource/script.mjs";
|
5
|
+
import {DataUrl} from "../../../../../application/source/types/dataurl.mjs";
|
6
|
+
import {ID} from "../../../../../application/source/types/id.mjs";
|
7
|
+
import {chaiDom} from "../../../util/chai-dom.mjs";
|
8
|
+
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../../util/cleanupdom.mjs";
|
9
|
+
import {initJSDOM} from "../../../util/jsdom.mjs";
|
10
10
|
|
11
11
|
let expect = chai.expect;
|
12
12
|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
4
|
|
5
|
-
import {ResourceManager} from "
|
6
|
-
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../util/cleanupdom.
|
7
|
-
import {initJSDOM} from "../../util/jsdom.
|
5
|
+
import {ResourceManager} from "../../../../application/source/dom/resourcemanager.mjs";
|
6
|
+
import {cleanupDOMFromTesting, initMutationObserverForTesting} from "../../util/cleanupdom.mjs";
|
7
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
8
8
|
|
9
9
|
describe('ResourceManager', function () {
|
10
10
|
|
@@ -17,7 +17,7 @@ describe('ResourceManager', function () {
|
|
17
17
|
});
|
18
18
|
|
19
19
|
afterEach(() => {
|
20
|
-
|
20
|
+
globalThis['fetch'] = fetchReference;
|
21
21
|
cleanupDOMFromTesting();
|
22
22
|
})
|
23
23
|
|
@@ -26,8 +26,8 @@ describe('ResourceManager', function () {
|
|
26
26
|
initMutationObserverForTesting()
|
27
27
|
|
28
28
|
returnStatus = 200;
|
29
|
-
fetchReference =
|
30
|
-
|
29
|
+
fetchReference = globalThis['fetch'];
|
30
|
+
globalThis['fetch'] = function (url, options) {
|
31
31
|
|
32
32
|
if (!url) throw new Error('missing url')
|
33
33
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import {expect} from "chai"
|
4
|
-
import {ATTRIBUTE_THEME_NAME} from "
|
4
|
+
import {ATTRIBUTE_THEME_NAME} from "../../../../application/source/dom/constants.mjs";
|
5
5
|
|
6
|
-
import {findDocumentTemplate, Template} from "
|
7
|
-
import {initJSDOM} from "../../util/jsdom.
|
6
|
+
import {findDocumentTemplate, Template} from "../../../../application/source/dom/template.mjs";
|
7
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
8
8
|
|
9
9
|
|
10
10
|
describe('Template', function () {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
import {getDocumentFragmentFromString} from "
|
4
|
-
import {initJSDOM} from "../../util/jsdom.
|
3
|
+
import {getDocumentFragmentFromString} from "../../../../application/source/dom/util.mjs";
|
4
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
5
5
|
import {expect} from "chai"
|
6
|
-
import {Theme, getDocumentTheme} from "
|
6
|
+
import {Theme, getDocumentTheme} from "../../../../application/source/dom/theme.mjs";
|
7
7
|
|
8
8
|
describe('Theme', function () {
|
9
9
|
before(function (done) {
|
@@ -1,12 +1,12 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
import {Updater} from "
|
5
|
-
import {ID} from "
|
6
|
-
import {Observer} from "
|
7
|
-
import {ProxyObserver} from "
|
8
|
-
import {chaiDom} from "../../util/chai-dom.
|
9
|
-
import {initJSDOM} from "../../util/jsdom.
|
4
|
+
import {Updater} from "../../../../application/source/dom/updater.mjs";
|
5
|
+
import {ID} from "../../../../application/source/types/id.mjs";
|
6
|
+
import {Observer} from "../../../../application/source/types/observer.mjs";
|
7
|
+
import {ProxyObserver} from "../../../../application/source/types/proxyobserver.mjs";
|
8
|
+
import {chaiDom} from "../../util/chai-dom.mjs";
|
9
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
10
10
|
|
11
11
|
let expect = chai.expect;
|
12
12
|
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
import {
|
4
4
|
getDocument, getWindow, getDocumentFragmentFromString
|
5
|
-
} from "
|
5
|
+
} from "../../../../application/source/dom/util.mjs";
|
6
6
|
|
7
7
|
|
8
|
-
import {initJSDOM} from "../../util/jsdom.
|
8
|
+
import {initJSDOM} from "../../util/jsdom.mjs";
|
9
9
|
|
10
10
|
import {expect} from "chai"
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import {expect} from "chai"
|
2
2
|
|
3
|
-
import {Factory} from "
|
4
|
-
import {getGlobal} from "
|
5
|
-
import {initJSDOM, isNode} from "../../../util/jsdom.
|
3
|
+
import {Factory} from "../../../../../application/source/dom/worker/factory.mjs";
|
4
|
+
import {getGlobal} from "../../../../../application/source/types/global.mjs";
|
5
|
+
import {initJSDOM, isNode} from "../../../util/jsdom.mjs";
|
6
6
|
|
7
7
|
const global = getGlobal();
|
8
8
|
|
@@ -14,7 +14,7 @@ describe('Worker', function () {
|
|
14
14
|
Object.defineProperty(global['URL'], 'createObjectURL', {
|
15
15
|
writable: true,
|
16
16
|
value: () => {
|
17
|
-
return "/example.
|
17
|
+
return "/example.mjs"
|
18
18
|
}
|
19
19
|
})
|
20
20
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {expect} from "chai"
|
2
|
-
import {Formatter} from "
|
3
|
-
import {Translations} from "
|
2
|
+
import {Formatter} from "../../../../application/source/i18n/formatter.mjs";
|
3
|
+
import {Translations} from "../../../../application/source/i18n/translations.mjs";
|
4
4
|
|
5
5
|
|
6
6
|
describe('Formatter', function () {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import {expect} from "chai"
|
2
2
|
|
3
3
|
|
4
|
-
import {Fetch} from "
|
5
|
-
import {Translations} from "
|
6
|
-
import {getGlobal} from "
|
4
|
+
import {Fetch} from "../../../../../application/source/i18n/providers/fetch.mjs";
|
5
|
+
import {Translations} from "../../../../../application/source/i18n/translations.mjs";
|
6
|
+
import {getGlobal} from "../../../../../application/source/types/global.mjs";
|
7
7
|
|
8
8
|
|
9
9
|
const global = getGlobal();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {expect} from "chai"
|
2
|
-
import {parseLocale} from "
|
3
|
-
import {Translations} from "
|
2
|
+
import {parseLocale} from "../../../../application/source/i18n/locale.mjs";
|
3
|
+
import {Translations} from "../../../../application/source/i18n/translations.mjs";
|
4
4
|
|
5
5
|
describe('Translations', function () {
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {expect} from "chai";
|
2
|
-
import {ConsoleHandler} from "
|
3
|
-
import {LogEntry} from "
|
4
|
-
import {FATAL} from "
|
2
|
+
import {ConsoleHandler} from "../../../../../application/source/logging/handler/console.mjs";
|
3
|
+
import {LogEntry} from "../../../../../application/source/logging/logentry.mjs";
|
4
|
+
import {FATAL} from "../../../../../application/source/logging/logger.mjs";
|
5
5
|
|
6
6
|
describe('Logging', function () {
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {expect} from "chai";
|
2
|
-
import {ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF} from "
|
3
|
-
import {
|
4
|
-
import {LogEntry} from "
|
2
|
+
import {ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF} from "../../../../application/source/logging/logger.mjs";
|
3
|
+
import {Handler} from "../../../../application/source/logging/handler.mjs";
|
4
|
+
import {LogEntry} from "../../../../application/source/logging/logentry.mjs";
|
5
5
|
|
6
6
|
describe('Logging', function () {
|
7
7
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {expect} from "chai"
|
2
|
-
import {
|
2
|
+
import {Logger, OFF, ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL} from "../../../../application/source/logging/logger.mjs";
|
3
3
|
|
4
4
|
|
5
5
|
describe('Logging', function () {
|