oak-domain 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/es/actions/action.d.ts +1 -1
- package/es/base-app-domain/EntityDict.d.ts +27 -0
- package/es/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
- package/es/base-app-domain/LocalizedContent/Schema.js +1 -0
- package/es/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
- package/es/base-app-domain/LocalizedContent/Storage.js +75 -0
- package/es/base-app-domain/LocalizedContent/Style.d.ts +3 -0
- package/es/base-app-domain/LocalizedContent/Style.js +12 -0
- package/es/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
- package/es/base-app-domain/Storage.js +2 -0
- package/es/base-app-domain/StyleDict.js +2 -0
- package/es/compiler/customChecks/i18n.js +4 -1
- package/es/compiler/customChecks/runner.d.ts +1 -1
- package/es/compiler/customChecks/runner.js +1 -1
- package/es/compiler/customChecks/types.d.ts +2 -1
- package/es/compiler/dependencyBuilder.d.ts +11 -2
- package/es/compiler/dependencyBuilder.js +188 -199
- package/es/compiler/entityDescEnum.d.ts +5 -0
- package/es/compiler/entityDescEnum.js +443 -0
- package/es/compiler/entitySource.d.ts +28 -0
- package/es/compiler/entitySource.js +521 -0
- package/es/compiler/localeBuilder.d.ts +7 -2
- package/es/compiler/localeBuilder.js +52 -56
- package/es/compiler/routerBuilder.d.ts +32 -3
- package/es/compiler/routerBuilder.js +157 -45
- package/es/compiler/schemaBuilder.d.ts +12 -2
- package/es/compiler/schemaBuilder.js +653 -148
- package/es/compiler/tscBuilder.d.ts +20 -2
- package/es/compiler/tscBuilder.js +231 -45
- package/es/context/BackendRuntimeContext.d.ts +6 -4
- package/es/context/BackendRuntimeContext.js +9 -1
- package/es/context/ContextComposer.d.ts +93 -0
- package/es/context/ContextComposer.js +353 -0
- package/es/context/SerializedData.d.ts +2 -1
- package/es/data/i18n.d.ts +1 -1
- package/es/data/i18n.js +1 -86
- package/es/data/i18n.json +86 -0
- package/es/entities/ActionAuth.d.ts +3 -3
- package/es/entities/I18n.d.ts +2 -2
- package/es/entities/LocalizedContent.d.ts +22 -0
- package/es/entities/LocalizedContent.js +101 -0
- package/es/entities/Log.d.ts +3 -3
- package/es/entities/Modi.d.ts +2 -2
- package/es/entities/ModiEntity.d.ts +3 -3
- package/es/entities/Oper.d.ts +5 -5
- package/es/entities/OperEntity.d.ts +3 -3
- package/es/entities/Path.d.ts +2 -2
- package/es/entities/Relation.d.ts +2 -2
- package/es/entities/RelationAuth.d.ts +3 -3
- package/es/entities/User.d.ts +4 -4
- package/es/entities/UserEntityClaim.d.ts +6 -6
- package/es/entities/UserEntityGrant.d.ts +2 -2
- package/es/entities/UserRelation.d.ts +4 -4
- package/es/store/AsyncRowStore.d.ts +2 -2
- package/es/store/AsyncRowStore.js +2 -2
- package/es/store/CascadeStore.d.ts +5 -3
- package/es/store/CascadeStore.js +56 -24
- package/es/store/IntrinsicCheckers.d.ts +1 -1
- package/es/store/IntrinsicCheckers.js +2 -2
- package/es/store/IntrinsicLogics.d.ts +1 -1
- package/es/store/RelationAuth.js +3 -3
- package/es/store/SyncRowStore.d.ts +1 -1
- package/es/store/SyncRowStore.js +1 -1
- package/es/store/TriggerExecutor.d.ts +6 -4
- package/es/store/TriggerExecutor.js +16 -4
- package/es/store/checker.d.ts +2 -2
- package/es/store/checker.js +45 -9
- package/es/store/filter.d.ts +3 -3
- package/es/store/filter.js +4 -4
- package/es/store/modi.d.ts +5 -5
- package/es/store/modi.js +4 -4
- package/es/store/projection.d.ts +1 -1
- package/es/store/relation.js +1 -1
- package/es/store/triggers.d.ts +4 -4
- package/es/store/triggers.js +2 -2
- package/es/timers/oper.d.ts +3 -3
- package/es/timers/oper.js +1 -1
- package/es/timers/vaccum.d.ts +3 -3
- package/es/types/Action.d.ts +1 -1
- package/es/types/AppLoader.d.ts +1 -1
- package/es/types/Aspect.d.ts +1 -1
- package/es/types/Auth.d.ts +2 -2
- package/es/types/Configuration.d.ts +7 -6
- package/es/types/Connector.d.ts +47 -1
- package/es/types/DataType.d.ts +2 -2
- package/es/types/Demand.d.ts +40 -6
- package/es/types/Endpoint.d.ts +17 -1
- package/es/types/Entity.d.ts +21 -4
- package/es/types/Entity.js +23 -0
- package/es/types/EntityDesc.d.ts +9 -8
- package/es/types/Environment.d.ts +17 -0
- package/es/types/Exception.d.ts +1 -1
- package/es/types/Exception.js +1 -1
- package/es/types/Expression.d.ts +13 -2
- package/es/types/Expression.js +36 -1
- package/es/types/Locale.d.ts +14 -1
- package/es/types/Locale.js +13 -1
- package/es/types/OakPackage.d.ts +29 -0
- package/es/types/OakPackage.js +30 -0
- package/es/types/Port.d.ts +1 -1
- package/es/types/RowStore.d.ts +9 -7
- package/es/types/Storage.d.ts +11 -3
- package/es/types/Storage.js +12 -1
- package/es/types/Style.d.ts +2 -2
- package/es/types/Sync.d.ts +3 -3
- package/es/types/Timer.d.ts +14 -2
- package/es/types/Trigger.d.ts +1 -1
- package/es/types/Watcher.d.ts +1 -1
- package/es/types/index.d.ts +1 -0
- package/es/types/index.js +1 -0
- package/es/utils/SimpleConnector.d.ts +30 -4
- package/es/utils/SimpleConnector.js +294 -21
- package/es/utils/concurrent.js +1 -1
- package/es/utils/decimal.d.ts +26 -0
- package/es/utils/decimal.js +87 -0
- package/es/utils/fetch/index.d.ts +1 -0
- package/es/utils/fetch/index.js +3 -0
- package/es/utils/fetch/index.mp.d.ts +3 -0
- package/es/utils/fetch/index.mp.js +280 -0
- package/es/utils/fetch/index.native.d.ts +1 -0
- package/es/utils/fetch/index.native.js +3 -0
- package/es/utils/fetch/index.web.d.ts +1 -0
- package/es/utils/fetch/index.web.js +3 -0
- package/es/utils/fetch/shared.d.ts +6 -0
- package/es/utils/fetch/shared.js +23 -0
- package/es/utils/localizedContent.d.ts +11 -0
- package/es/utils/localizedContent.js +346 -0
- package/es/utils/lodash.d.ts +1 -35
- package/es/utils/lodash.js +1 -52
- package/es/utils/module/combine.common.d.ts +3 -3
- package/es/utils/module/combine.common.js +2 -2
- package/es/utils/module/combine.dev.d.ts +2 -2
- package/es/utils/module/combine.dev.js +2 -2
- package/es/utils/module/combine.prod.d.ts +1 -1
- package/es/utils/module/combine.server.d.ts +2 -2
- package/es/utils/module/combine.server.js +2 -2
- package/es/utils/money.d.ts +2 -2
- package/es/utils/money.js +2 -2
- package/es/utils/operationResult.js +1 -1
- package/es/utils/projection.d.ts +3 -3
- package/es/utils/projection.js +1 -1
- package/es/utils/relationPath.d.ts +1 -1
- package/es/utils/relationPath.js +1 -1
- package/es/utils/row.d.ts +3 -3
- package/es/utils/row.js +2 -2
- package/es/utils/sseEndpoint.d.ts +41 -0
- package/es/utils/sseEndpoint.js +151 -0
- package/es/utils/toolkit.d.ts +28 -0
- package/es/utils/toolkit.js +220 -0
- package/es/utils/url/index.d.ts +1 -3
- package/es/utils/url/index.js +1 -1
- package/es/utils/url/index.mp.d.ts +16 -3
- package/es/utils/url/index.mp.js +2 -2
- package/es/utils/url/index.native.d.ts +13 -1
- package/es/utils/url/index.native.js +3 -1
- package/es/utils/url/index.web.d.ts +13 -1
- package/es/utils/url/index.web.js +3 -1
- package/es/utils/url/lightweight.d.ts +65 -0
- package/es/utils/url/lightweight.js +530 -0
- package/es/utils/url/urlObject.d.ts +16 -0
- package/es/utils/validate/id.d.ts +5 -0
- package/es/utils/validate/id.js +28 -0
- package/es/utils/validate/index.d.ts +4 -0
- package/es/utils/validate/index.js +4 -0
- package/es/utils/validate/mobile.d.ts +6 -0
- package/es/utils/validate/mobile.js +49 -0
- package/es/utils/validate/nationality.d.ts +14 -0
- package/es/utils/validate/nationality.data.d.ts +9 -0
- package/es/utils/validate/nationality.data.js +257 -0
- package/es/utils/validate/nationality.js +64 -0
- package/es/utils/validate/passport.d.ts +3 -0
- package/es/utils/validate/passport.js +19 -0
- package/es/utils/validator.d.ts +10 -8
- package/es/utils/validator.js +24 -40
- package/lib/actions/action.d.ts +1 -1
- package/lib/base-app-domain/EntityDict.d.ts +27 -0
- package/lib/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
- package/lib/base-app-domain/LocalizedContent/Schema.js +4 -0
- package/lib/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
- package/lib/base-app-domain/LocalizedContent/Storage.js +78 -0
- package/lib/base-app-domain/LocalizedContent/Style.d.ts +3 -0
- package/lib/base-app-domain/LocalizedContent/Style.js +15 -0
- package/lib/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
- package/lib/base-app-domain/Storage.js +26 -24
- package/lib/base-app-domain/StyleDict.js +10 -8
- package/lib/compiler/customChecks/i18n.js +5 -2
- package/lib/compiler/customChecks/runner.d.ts +1 -1
- package/lib/compiler/customChecks/types.d.ts +2 -1
- package/lib/compiler/dependencyBuilder.d.ts +11 -2
- package/lib/compiler/dependencyBuilder.js +237 -243
- package/lib/compiler/entityDescEnum.d.ts +5 -0
- package/lib/compiler/entityDescEnum.js +450 -0
- package/lib/compiler/entitySource.d.ts +28 -0
- package/lib/compiler/entitySource.js +529 -0
- package/lib/compiler/localeBuilder.d.ts +7 -2
- package/lib/compiler/localeBuilder.js +52 -56
- package/lib/compiler/routerBuilder.d.ts +32 -3
- package/lib/compiler/routerBuilder.js +160 -48
- package/lib/compiler/schemaBuilder.d.ts +12 -2
- package/lib/compiler/schemaBuilder.js +855 -350
- package/lib/compiler/tscBuilder.d.ts +20 -2
- package/lib/compiler/tscBuilder.js +217 -37
- package/lib/context/BackendRuntimeContext.d.ts +6 -4
- package/lib/context/BackendRuntimeContext.js +10 -3
- package/lib/context/ContextComposer.d.ts +93 -0
- package/lib/context/ContextComposer.js +361 -0
- package/lib/context/SerializedData.d.ts +2 -1
- package/lib/data/i18n.d.ts +1 -1
- package/lib/data/i18n.js +1 -86
- package/lib/data/i18n.json +86 -0
- package/lib/entities/ActionAuth.d.ts +3 -3
- package/lib/entities/I18n.d.ts +2 -2
- package/lib/entities/LocalizedContent.d.ts +22 -0
- package/lib/entities/LocalizedContent.js +104 -0
- package/lib/entities/Log.d.ts +3 -3
- package/lib/entities/Modi.d.ts +2 -2
- package/lib/entities/ModiEntity.d.ts +3 -3
- package/lib/entities/Oper.d.ts +5 -5
- package/lib/entities/OperEntity.d.ts +3 -3
- package/lib/entities/Path.d.ts +2 -2
- package/lib/entities/Relation.d.ts +2 -2
- package/lib/entities/RelationAuth.d.ts +3 -3
- package/lib/entities/User.d.ts +4 -4
- package/lib/entities/UserEntityClaim.d.ts +6 -6
- package/lib/entities/UserEntityGrant.d.ts +2 -2
- package/lib/entities/UserRelation.d.ts +4 -4
- package/lib/store/AsyncRowStore.d.ts +2 -2
- package/lib/store/AsyncRowStore.js +6 -7
- package/lib/store/CascadeStore.d.ts +5 -3
- package/lib/store/CascadeStore.js +101 -70
- package/lib/store/IntrinsicCheckers.d.ts +1 -1
- package/lib/store/IntrinsicCheckers.js +12 -13
- package/lib/store/IntrinsicLogics.d.ts +1 -1
- package/lib/store/RelationAuth.js +42 -43
- package/lib/store/SyncRowStore.d.ts +1 -1
- package/lib/store/SyncRowStore.js +4 -5
- package/lib/store/TriggerExecutor.d.ts +6 -4
- package/lib/store/TriggerExecutor.js +39 -28
- package/lib/store/checker.d.ts +2 -2
- package/lib/store/checker.js +55 -20
- package/lib/store/filter.d.ts +3 -3
- package/lib/store/filter.js +47 -48
- package/lib/store/modi.d.ts +5 -5
- package/lib/store/modi.js +5 -6
- package/lib/store/projection.d.ts +1 -1
- package/lib/store/relation.js +4 -5
- package/lib/store/triggers.d.ts +4 -4
- package/lib/store/triggers.js +13 -14
- package/lib/timers/oper.d.ts +3 -3
- package/lib/timers/vaccum.d.ts +3 -3
- package/lib/types/Action.d.ts +1 -1
- package/lib/types/AppLoader.d.ts +1 -1
- package/lib/types/Aspect.d.ts +1 -1
- package/lib/types/Auth.d.ts +2 -2
- package/lib/types/Configuration.d.ts +7 -6
- package/lib/types/Connector.d.ts +47 -1
- package/lib/types/DataType.d.ts +2 -2
- package/lib/types/Demand.d.ts +40 -6
- package/lib/types/Endpoint.d.ts +17 -1
- package/lib/types/Entity.d.ts +21 -4
- package/lib/types/Entity.js +27 -0
- package/lib/types/EntityDesc.d.ts +9 -8
- package/lib/types/Environment.d.ts +17 -0
- package/lib/types/Exception.d.ts +1 -1
- package/lib/types/Exception.js +2 -2
- package/lib/types/Expression.d.ts +13 -2
- package/lib/types/Expression.js +40 -5
- package/lib/types/Locale.d.ts +14 -1
- package/lib/types/Locale.js +14 -0
- package/lib/types/OakPackage.d.ts +29 -0
- package/lib/types/OakPackage.js +36 -0
- package/lib/types/Port.d.ts +1 -1
- package/lib/types/RowStore.d.ts +9 -7
- package/lib/types/Storage.d.ts +11 -3
- package/lib/types/Storage.js +13 -0
- package/lib/types/Style.d.ts +2 -2
- package/lib/types/Sync.d.ts +3 -3
- package/lib/types/Timer.d.ts +14 -2
- package/lib/types/Trigger.d.ts +1 -1
- package/lib/types/Watcher.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/SimpleConnector.d.ts +30 -4
- package/lib/utils/SimpleConnector.js +297 -24
- package/lib/utils/concurrent.js +4 -5
- package/lib/utils/decimal.d.ts +26 -0
- package/lib/utils/decimal.js +112 -0
- package/lib/utils/fetch/index.d.ts +1 -0
- package/lib/utils/fetch/index.js +6 -0
- package/lib/utils/fetch/index.mp.d.ts +3 -0
- package/lib/utils/fetch/index.mp.js +285 -0
- package/lib/utils/fetch/index.native.d.ts +1 -0
- package/lib/utils/fetch/index.native.js +6 -0
- package/lib/utils/fetch/index.web.d.ts +1 -0
- package/lib/utils/fetch/index.web.js +6 -0
- package/lib/utils/fetch/shared.d.ts +6 -0
- package/lib/utils/fetch/shared.js +28 -0
- package/lib/utils/localizedContent.d.ts +11 -0
- package/lib/utils/localizedContent.js +352 -0
- package/lib/utils/lodash.d.ts +1 -35
- package/lib/utils/lodash.js +1 -76
- package/lib/utils/module/combine.common.d.ts +3 -3
- package/lib/utils/module/combine.common.js +6 -7
- package/lib/utils/module/combine.dev.d.ts +2 -2
- package/lib/utils/module/combine.dev.js +19 -19
- package/lib/utils/module/combine.prod.d.ts +1 -1
- package/lib/utils/module/combine.server.d.ts +2 -2
- package/lib/utils/module/combine.server.js +19 -19
- package/lib/utils/money.d.ts +2 -2
- package/lib/utils/money.js +2 -2
- package/lib/utils/operationResult.js +4 -4
- package/lib/utils/projection.d.ts +3 -3
- package/lib/utils/relationPath.d.ts +1 -1
- package/lib/utils/relationPath.js +10 -11
- package/lib/utils/row.d.ts +3 -3
- package/lib/utils/row.js +4 -5
- package/lib/utils/sseEndpoint.d.ts +41 -0
- package/lib/utils/sseEndpoint.js +156 -0
- package/lib/utils/toolkit.d.ts +28 -0
- package/lib/utils/toolkit.js +253 -0
- package/lib/utils/url/index.d.ts +1 -3
- package/lib/utils/url/index.js +3 -1
- package/lib/utils/url/index.mp.d.ts +16 -3
- package/lib/utils/url/index.mp.js +6 -4
- package/lib/utils/url/index.native.d.ts +13 -1
- package/lib/utils/url/index.native.js +5 -1
- package/lib/utils/url/index.web.d.ts +13 -1
- package/lib/utils/url/index.web.js +5 -1
- package/lib/utils/url/lightweight.d.ts +65 -0
- package/lib/utils/url/lightweight.js +535 -0
- package/lib/utils/url/urlObject.d.ts +16 -0
- package/lib/utils/url/urlObject.js +2 -0
- package/lib/utils/url/whatwg-url/lib/URL-impl.d.ts +8 -15
- package/lib/utils/url/whatwg-url/lib/infra.js +5 -4
- package/lib/utils/url/whatwg-url/lib/urlencoded.d.ts +3 -1
- package/lib/utils/url/whatwg-url/lib/utils.d.ts +1 -1
- package/lib/utils/validate/id.d.ts +5 -0
- package/lib/utils/validate/id.js +35 -0
- package/lib/utils/validate/index.d.ts +4 -0
- package/lib/utils/validate/index.js +7 -0
- package/lib/utils/validate/mobile.d.ts +6 -0
- package/lib/utils/validate/mobile.js +57 -0
- package/lib/utils/validate/nationality.d.ts +14 -0
- package/lib/utils/validate/nationality.data.d.ts +9 -0
- package/lib/utils/validate/nationality.data.js +260 -0
- package/lib/utils/validate/nationality.js +76 -0
- package/lib/utils/validate/passport.d.ts +3 -0
- package/lib/utils/validate/passport.js +24 -0
- package/lib/utils/validator.d.ts +10 -8
- package/lib/utils/validator.js +38 -42
- package/package.json +19 -9
- package/es/utils/url/whatwg-url/index.d.ts +0 -3
- package/es/utils/url/whatwg-url/index.js +0 -12
- package/es/utils/url/whatwg-url/lib/URL-impl.d.ts +0 -27
- package/es/utils/url/whatwg-url/lib/URL-impl.js +0 -172
- package/es/utils/url/whatwg-url/lib/URL.js +0 -295
- package/es/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
- package/es/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -123
- package/es/utils/url/whatwg-url/lib/URLSearchParams.js +0 -423
- package/es/utils/url/whatwg-url/lib/infra.d.ts +0 -12
- package/es/utils/url/whatwg-url/lib/infra.js +0 -19
- package/es/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
- package/es/utils/url/whatwg-url/lib/url-state-machine.js +0 -1228
- package/es/utils/url/whatwg-url/lib/urlencoded.d.ts +0 -14
- package/es/utils/url/whatwg-url/lib/urlencoded.js +0 -160
- package/es/utils/url/whatwg-url/lib/utils.d.ts +0 -37
- package/es/utils/url/whatwg-url/lib/utils.js +0 -99
- package/lib/store/diffSchema.d.ts +0 -1
- package/lib/utils/url/whatwg-url/index.d.ts +0 -3
- package/lib/utils/url/whatwg-url/index.js +0 -16
- package/lib/utils/url/whatwg-url/lib/URL-impl.js +0 -175
- package/lib/utils/url/whatwg-url/lib/URL.d.ts +0 -1
- package/lib/utils/url/whatwg-url/lib/URL.js +0 -298
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -126
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.d.ts +0 -1
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.js +0 -426
- package/lib/utils/url/whatwg-url/lib/infra.d.ts +0 -12
- package/lib/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
- package/lib/utils/url/whatwg-url/lib/url-state-machine.js +0 -1238
- package/lib/utils/url/whatwg-url/lib/urlencoded.js +0 -162
- package/lib/utils/url/whatwg-url/lib/utils.js +0 -101
- package/src/entities/ActionAuth.ts +0 -50
- package/src/entities/I18n.ts +0 -53
- package/src/entities/Log.ts +0 -62
- package/src/entities/Modi.ts +0 -107
- package/src/entities/ModiEntity.ts +0 -35
- package/src/entities/Oper.ts +0 -115
- package/src/entities/OperEntity.ts +0 -36
- package/src/entities/Path.ts +0 -56
- package/src/entities/Relation.ts +0 -53
- package/src/entities/RelationAuth.ts +0 -53
- package/src/entities/User.ts +0 -85
- package/src/entities/UserEntityClaim.ts +0 -41
- package/src/entities/UserEntityGrant.ts +0 -33
- package/src/entities/UserRelation.ts +0 -60
- /package/es/{utils/url/whatwg-url/lib/URL.d.ts → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
- /package/es/utils/url/{whatwg-url/lib/URLSearchParams.d.ts → urlObject.js} +0 -0
- /package/lib/{store/diffSchema.js → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import conversions from 'webidl-conversions';
|
|
3
|
-
import utils from './utils';
|
|
4
|
-
const impl = utils.implSymbol;
|
|
5
|
-
const ctorRegistry = utils.ctorRegistrySymbol;
|
|
6
|
-
const iface = {
|
|
7
|
-
// When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()`
|
|
8
|
-
// method into this array. It allows objects that directly implements *those* interfaces to be recognized as
|
|
9
|
-
// implementing this mixin interface.
|
|
10
|
-
_mixedIntoPredicates: [],
|
|
11
|
-
is(obj) {
|
|
12
|
-
if (obj) {
|
|
13
|
-
if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
|
17
|
-
if (isMixedInto(obj)) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return false;
|
|
23
|
-
},
|
|
24
|
-
isImpl(obj) {
|
|
25
|
-
if (obj) {
|
|
26
|
-
if (obj instanceof Impl.implementation) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
const wrapper = utils.wrapperForImpl(obj);
|
|
30
|
-
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
|
31
|
-
if (isMixedInto(wrapper)) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
},
|
|
38
|
-
convert(obj, { context = "The provided value" } = {}) {
|
|
39
|
-
if (module.exports.is(obj)) {
|
|
40
|
-
return utils.implForWrapper(obj);
|
|
41
|
-
}
|
|
42
|
-
throw new TypeError(`${context} is not of type 'URL'.`);
|
|
43
|
-
},
|
|
44
|
-
create(globalObject, constructorArgs, privateData) {
|
|
45
|
-
if (globalObject[ctorRegistry] === undefined) {
|
|
46
|
-
throw new Error("Internal error: invalid global object");
|
|
47
|
-
}
|
|
48
|
-
const ctor = globalObject[ctorRegistry]["URL"];
|
|
49
|
-
if (ctor === undefined) {
|
|
50
|
-
throw new Error("Internal error: constructor URL is not installed on the passed global object");
|
|
51
|
-
}
|
|
52
|
-
let obj = Object.create(ctor.prototype);
|
|
53
|
-
obj = iface.setup(obj, globalObject, constructorArgs, privateData);
|
|
54
|
-
return obj;
|
|
55
|
-
},
|
|
56
|
-
createImpl(globalObject, constructorArgs, privateData) {
|
|
57
|
-
const obj = iface.create(globalObject, constructorArgs, privateData);
|
|
58
|
-
return utils.implForWrapper(obj);
|
|
59
|
-
},
|
|
60
|
-
_internalSetup(obj) { },
|
|
61
|
-
setup(obj, globalObject, constructorArgs = [], privateData = {}) {
|
|
62
|
-
privateData.wrapper = obj;
|
|
63
|
-
iface._internalSetup(obj);
|
|
64
|
-
Object.defineProperty(obj, impl, {
|
|
65
|
-
value: new Impl.implementation(globalObject, constructorArgs, privateData),
|
|
66
|
-
configurable: true
|
|
67
|
-
});
|
|
68
|
-
obj[impl][utils.wrapperSymbol] = obj;
|
|
69
|
-
if (Impl.init) {
|
|
70
|
-
Impl.init(obj[impl], privateData);
|
|
71
|
-
}
|
|
72
|
-
return obj;
|
|
73
|
-
},
|
|
74
|
-
install(globalObject) {
|
|
75
|
-
class URL {
|
|
76
|
-
constructor(url) {
|
|
77
|
-
if (arguments.length < 1) {
|
|
78
|
-
throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present.");
|
|
79
|
-
}
|
|
80
|
-
const args = [];
|
|
81
|
-
{
|
|
82
|
-
let curArg = arguments[0];
|
|
83
|
-
curArg = conversions["USVString"](curArg, { context: "Failed to construct 'URL': parameter 1" });
|
|
84
|
-
args.push(curArg);
|
|
85
|
-
}
|
|
86
|
-
{
|
|
87
|
-
let curArg = arguments[1];
|
|
88
|
-
if (curArg !== undefined) {
|
|
89
|
-
curArg = conversions["USVString"](curArg, { context: "Failed to construct 'URL': parameter 2" });
|
|
90
|
-
}
|
|
91
|
-
args.push(curArg);
|
|
92
|
-
}
|
|
93
|
-
return iface.setup(Object.create(this.constructor.prototype), globalObject, args);
|
|
94
|
-
}
|
|
95
|
-
toJSON() {
|
|
96
|
-
if (!this || !module.exports.is(this)) {
|
|
97
|
-
throw new TypeError("Illegal invocation");
|
|
98
|
-
}
|
|
99
|
-
return this[impl].toJSON();
|
|
100
|
-
}
|
|
101
|
-
get href() {
|
|
102
|
-
if (!this || !module.exports.is(this)) {
|
|
103
|
-
throw new TypeError("Illegal invocation");
|
|
104
|
-
}
|
|
105
|
-
return this[impl]["href"];
|
|
106
|
-
}
|
|
107
|
-
set href(V) {
|
|
108
|
-
if (!this || !module.exports.is(this)) {
|
|
109
|
-
throw new TypeError("Illegal invocation");
|
|
110
|
-
}
|
|
111
|
-
V = conversions["USVString"](V, { context: "Failed to set the 'href' property on 'URL': The provided value" });
|
|
112
|
-
this[impl]["href"] = V;
|
|
113
|
-
}
|
|
114
|
-
toString() {
|
|
115
|
-
if (!this || !module.exports.is(this)) {
|
|
116
|
-
throw new TypeError("Illegal invocation");
|
|
117
|
-
}
|
|
118
|
-
return this[impl]["href"];
|
|
119
|
-
}
|
|
120
|
-
get origin() {
|
|
121
|
-
if (!this || !module.exports.is(this)) {
|
|
122
|
-
throw new TypeError("Illegal invocation");
|
|
123
|
-
}
|
|
124
|
-
return this[impl]["origin"];
|
|
125
|
-
}
|
|
126
|
-
get protocol() {
|
|
127
|
-
if (!this || !module.exports.is(this)) {
|
|
128
|
-
throw new TypeError("Illegal invocation");
|
|
129
|
-
}
|
|
130
|
-
return this[impl]["protocol"];
|
|
131
|
-
}
|
|
132
|
-
set protocol(V) {
|
|
133
|
-
if (!this || !module.exports.is(this)) {
|
|
134
|
-
throw new TypeError("Illegal invocation");
|
|
135
|
-
}
|
|
136
|
-
V = conversions["USVString"](V, {
|
|
137
|
-
context: "Failed to set the 'protocol' property on 'URL': The provided value"
|
|
138
|
-
});
|
|
139
|
-
this[impl]["protocol"] = V;
|
|
140
|
-
}
|
|
141
|
-
get username() {
|
|
142
|
-
if (!this || !module.exports.is(this)) {
|
|
143
|
-
throw new TypeError("Illegal invocation");
|
|
144
|
-
}
|
|
145
|
-
return this[impl]["username"];
|
|
146
|
-
}
|
|
147
|
-
set username(V) {
|
|
148
|
-
if (!this || !module.exports.is(this)) {
|
|
149
|
-
throw new TypeError("Illegal invocation");
|
|
150
|
-
}
|
|
151
|
-
V = conversions["USVString"](V, {
|
|
152
|
-
context: "Failed to set the 'username' property on 'URL': The provided value"
|
|
153
|
-
});
|
|
154
|
-
this[impl]["username"] = V;
|
|
155
|
-
}
|
|
156
|
-
get password() {
|
|
157
|
-
if (!this || !module.exports.is(this)) {
|
|
158
|
-
throw new TypeError("Illegal invocation");
|
|
159
|
-
}
|
|
160
|
-
return this[impl]["password"];
|
|
161
|
-
}
|
|
162
|
-
set password(V) {
|
|
163
|
-
if (!this || !module.exports.is(this)) {
|
|
164
|
-
throw new TypeError("Illegal invocation");
|
|
165
|
-
}
|
|
166
|
-
V = conversions["USVString"](V, {
|
|
167
|
-
context: "Failed to set the 'password' property on 'URL': The provided value"
|
|
168
|
-
});
|
|
169
|
-
this[impl]["password"] = V;
|
|
170
|
-
}
|
|
171
|
-
get host() {
|
|
172
|
-
if (!this || !module.exports.is(this)) {
|
|
173
|
-
throw new TypeError("Illegal invocation");
|
|
174
|
-
}
|
|
175
|
-
return this[impl]["host"];
|
|
176
|
-
}
|
|
177
|
-
set host(V) {
|
|
178
|
-
if (!this || !module.exports.is(this)) {
|
|
179
|
-
throw new TypeError("Illegal invocation");
|
|
180
|
-
}
|
|
181
|
-
V = conversions["USVString"](V, { context: "Failed to set the 'host' property on 'URL': The provided value" });
|
|
182
|
-
this[impl]["host"] = V;
|
|
183
|
-
}
|
|
184
|
-
get hostname() {
|
|
185
|
-
if (!this || !module.exports.is(this)) {
|
|
186
|
-
throw new TypeError("Illegal invocation");
|
|
187
|
-
}
|
|
188
|
-
return this[impl]["hostname"];
|
|
189
|
-
}
|
|
190
|
-
set hostname(V) {
|
|
191
|
-
if (!this || !module.exports.is(this)) {
|
|
192
|
-
throw new TypeError("Illegal invocation");
|
|
193
|
-
}
|
|
194
|
-
V = conversions["USVString"](V, {
|
|
195
|
-
context: "Failed to set the 'hostname' property on 'URL': The provided value"
|
|
196
|
-
});
|
|
197
|
-
this[impl]["hostname"] = V;
|
|
198
|
-
}
|
|
199
|
-
get port() {
|
|
200
|
-
if (!this || !module.exports.is(this)) {
|
|
201
|
-
throw new TypeError("Illegal invocation");
|
|
202
|
-
}
|
|
203
|
-
return this[impl]["port"];
|
|
204
|
-
}
|
|
205
|
-
set port(V) {
|
|
206
|
-
if (!this || !module.exports.is(this)) {
|
|
207
|
-
throw new TypeError("Illegal invocation");
|
|
208
|
-
}
|
|
209
|
-
V = conversions["USVString"](V, { context: "Failed to set the 'port' property on 'URL': The provided value" });
|
|
210
|
-
this[impl]["port"] = V;
|
|
211
|
-
}
|
|
212
|
-
get pathname() {
|
|
213
|
-
if (!this || !module.exports.is(this)) {
|
|
214
|
-
throw new TypeError("Illegal invocation");
|
|
215
|
-
}
|
|
216
|
-
return this[impl]["pathname"];
|
|
217
|
-
}
|
|
218
|
-
set pathname(V) {
|
|
219
|
-
if (!this || !module.exports.is(this)) {
|
|
220
|
-
throw new TypeError("Illegal invocation");
|
|
221
|
-
}
|
|
222
|
-
V = conversions["USVString"](V, {
|
|
223
|
-
context: "Failed to set the 'pathname' property on 'URL': The provided value"
|
|
224
|
-
});
|
|
225
|
-
this[impl]["pathname"] = V;
|
|
226
|
-
}
|
|
227
|
-
get search() {
|
|
228
|
-
if (!this || !module.exports.is(this)) {
|
|
229
|
-
throw new TypeError("Illegal invocation");
|
|
230
|
-
}
|
|
231
|
-
return this[impl]["search"];
|
|
232
|
-
}
|
|
233
|
-
set search(V) {
|
|
234
|
-
if (!this || !module.exports.is(this)) {
|
|
235
|
-
throw new TypeError("Illegal invocation");
|
|
236
|
-
}
|
|
237
|
-
V = conversions["USVString"](V, {
|
|
238
|
-
context: "Failed to set the 'search' property on 'URL': The provided value"
|
|
239
|
-
});
|
|
240
|
-
this[impl]["search"] = V;
|
|
241
|
-
}
|
|
242
|
-
get searchParams() {
|
|
243
|
-
if (!this || !module.exports.is(this)) {
|
|
244
|
-
throw new TypeError("Illegal invocation");
|
|
245
|
-
}
|
|
246
|
-
return utils.getSameObject(this, "searchParams", () => {
|
|
247
|
-
return utils.tryWrapperForImpl(this[impl]["searchParams"]);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
get hash() {
|
|
251
|
-
if (!this || !module.exports.is(this)) {
|
|
252
|
-
throw new TypeError("Illegal invocation");
|
|
253
|
-
}
|
|
254
|
-
return this[impl]["hash"];
|
|
255
|
-
}
|
|
256
|
-
set hash(V) {
|
|
257
|
-
if (!this || !module.exports.is(this)) {
|
|
258
|
-
throw new TypeError("Illegal invocation");
|
|
259
|
-
}
|
|
260
|
-
V = conversions["USVString"](V, { context: "Failed to set the 'hash' property on 'URL': The provided value" });
|
|
261
|
-
this[impl]["hash"] = V;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
Object.defineProperties(URL.prototype, {
|
|
265
|
-
toJSON: { enumerable: true },
|
|
266
|
-
href: { enumerable: true },
|
|
267
|
-
toString: { enumerable: true },
|
|
268
|
-
origin: { enumerable: true },
|
|
269
|
-
protocol: { enumerable: true },
|
|
270
|
-
username: { enumerable: true },
|
|
271
|
-
password: { enumerable: true },
|
|
272
|
-
host: { enumerable: true },
|
|
273
|
-
hostname: { enumerable: true },
|
|
274
|
-
port: { enumerable: true },
|
|
275
|
-
pathname: { enumerable: true },
|
|
276
|
-
search: { enumerable: true },
|
|
277
|
-
searchParams: { enumerable: true },
|
|
278
|
-
hash: { enumerable: true },
|
|
279
|
-
[Symbol.toStringTag]: { value: "URL", configurable: true }
|
|
280
|
-
});
|
|
281
|
-
if (globalObject[ctorRegistry] === undefined) {
|
|
282
|
-
globalObject[ctorRegistry] = Object.create(null);
|
|
283
|
-
}
|
|
284
|
-
globalObject[ctorRegistry]["URL"] = URL;
|
|
285
|
-
Object.defineProperty(globalObject, "URL", {
|
|
286
|
-
configurable: true,
|
|
287
|
-
writable: true,
|
|
288
|
-
value: URL
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
// iface
|
|
293
|
-
module.exports = iface;
|
|
294
|
-
// const Impl = require('./URL-impl');
|
|
295
|
-
import Impl from './URL-impl';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
implementation: {
|
|
3
|
-
new (globalObject: any, constructorArgs: any, { doNotStripQMark }: {
|
|
4
|
-
doNotStripQMark?: boolean | undefined;
|
|
5
|
-
}): {
|
|
6
|
-
_updateSteps(): void;
|
|
7
|
-
append(name: any, value: any): void;
|
|
8
|
-
delete(name: any): void;
|
|
9
|
-
get(name: any): any;
|
|
10
|
-
getAll(name: any): any[];
|
|
11
|
-
has(name: any): boolean;
|
|
12
|
-
set(name: any, value: any): void;
|
|
13
|
-
sort(): void;
|
|
14
|
-
toString(): string;
|
|
15
|
-
[Symbol.iterator](): any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import urlencoded from './urlencoded';
|
|
3
|
-
function stableSortBy(arr, compare) {
|
|
4
|
-
return arr
|
|
5
|
-
.map((item, index) => ({ item, index }))
|
|
6
|
-
.sort((a, b) => compare(a.item, b.item) || a.index - b.index)
|
|
7
|
-
.map(({ item }) => item);
|
|
8
|
-
}
|
|
9
|
-
const implementation = class URLSearchParamsImpl {
|
|
10
|
-
constructor(globalObject, constructorArgs, { doNotStripQMark = false }) {
|
|
11
|
-
let init = constructorArgs[0];
|
|
12
|
-
this._list = [];
|
|
13
|
-
this._url = null;
|
|
14
|
-
if (!doNotStripQMark && typeof init === 'string' && init[0] === '?') {
|
|
15
|
-
init = init.slice(1);
|
|
16
|
-
}
|
|
17
|
-
if (Array.isArray(init)) {
|
|
18
|
-
for (const pair of init) {
|
|
19
|
-
if (pair.length !== 2) {
|
|
20
|
-
throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not " +
|
|
21
|
-
'contain exactly two elements.');
|
|
22
|
-
}
|
|
23
|
-
this._list.push([pair[0], pair[1]]);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else if (typeof init === 'object' &&
|
|
27
|
-
Object.getPrototypeOf(init) === null) {
|
|
28
|
-
for (const name of Object.keys(init)) {
|
|
29
|
-
const value = init[name];
|
|
30
|
-
this._list.push([name, value]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this._list = urlencoded.parseUrlencoded(init);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
_updateSteps() {
|
|
38
|
-
if (this._url !== null) {
|
|
39
|
-
let query = urlencoded.serializeUrlencoded(this._list);
|
|
40
|
-
if (query === '') {
|
|
41
|
-
query = null;
|
|
42
|
-
}
|
|
43
|
-
this._url._url.query = query;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
append(name, value) {
|
|
47
|
-
this._list.push([name, value]);
|
|
48
|
-
this._updateSteps();
|
|
49
|
-
}
|
|
50
|
-
delete(name) {
|
|
51
|
-
let i = 0;
|
|
52
|
-
while (i < this._list.length) {
|
|
53
|
-
if (this._list[i][0] === name) {
|
|
54
|
-
this._list.splice(i, 1);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
i++;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
this._updateSteps();
|
|
61
|
-
}
|
|
62
|
-
get(name) {
|
|
63
|
-
for (const tuple of this._list) {
|
|
64
|
-
if (tuple[0] === name) {
|
|
65
|
-
return tuple[1];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
getAll(name) {
|
|
71
|
-
const output = [];
|
|
72
|
-
for (const tuple of this._list) {
|
|
73
|
-
if (tuple[0] === name) {
|
|
74
|
-
output.push(tuple[1]);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return output;
|
|
78
|
-
}
|
|
79
|
-
has(name) {
|
|
80
|
-
for (const tuple of this._list) {
|
|
81
|
-
if (tuple[0] === name) {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
set(name, value) {
|
|
88
|
-
let found = false;
|
|
89
|
-
let i = 0;
|
|
90
|
-
while (i < this._list.length) {
|
|
91
|
-
if (this._list[i][0] === name) {
|
|
92
|
-
if (found) {
|
|
93
|
-
this._list.splice(i, 1);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
found = true;
|
|
97
|
-
this._list[i][1] = value;
|
|
98
|
-
i++;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
i++;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (!found) {
|
|
106
|
-
this._list.push([name, value]);
|
|
107
|
-
}
|
|
108
|
-
this._updateSteps();
|
|
109
|
-
}
|
|
110
|
-
sort() {
|
|
111
|
-
this._list = stableSortBy(this._list, (a, b) => a[0] > b[0]);
|
|
112
|
-
this._updateSteps();
|
|
113
|
-
}
|
|
114
|
-
[Symbol.iterator]() {
|
|
115
|
-
return this._list[Symbol.iterator]();
|
|
116
|
-
}
|
|
117
|
-
toString() {
|
|
118
|
-
return urlencoded.serializeUrlencoded(this._list);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
export default {
|
|
122
|
-
implementation
|
|
123
|
-
};
|