@appsemble/utils 0.20.28 → 0.20.29
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 +4 -4
- package/api/components/schemas/AppDefinition.js +1 -0
- package/api/components/schemas/LoopPageActionsDefinition.d.ts +2 -0
- package/api/components/schemas/LoopPageActionsDefinition.js +24 -0
- package/api/components/schemas/LoopPageDefinition.d.ts +1 -0
- package/api/components/schemas/LoopPageDefinition.js +38 -0
- package/api/components/schemas/ObjectRemapperDefinition.js +4 -0
- package/api/components/schemas/index.d.ts +2 -0
- package/api/components/schemas/index.js +2 -0
- package/appMessages.js +4 -1
- package/iterApp.js +3 -0
- package/package.json +2 -2
- package/remap.d.ts +3 -0
- package/remap.js +3 -0
- package/validation.js +7 -7
- package/validation.test.js +1 -1
- package/api/components/index.js.map +0 -1
- package/api/components/index.ts +0 -15
- package/api/components/parameters/$filter.js.map +0 -1
- package/api/components/parameters/$filter.ts +0 -12
- package/api/components/parameters/$orderby.js.map +0 -1
- package/api/components/parameters/$orderby.ts +0 -12
- package/api/components/parameters/$select.js.map +0 -1
- package/api/components/parameters/$select.ts +0 -15
- package/api/components/parameters/$team.js.map +0 -1
- package/api/components/parameters/$team.ts +0 -11
- package/api/components/parameters/$top.js.map +0 -1
- package/api/components/parameters/$top.ts +0 -9
- package/api/components/parameters/appId.js.map +0 -1
- package/api/components/parameters/appId.ts +0 -9
- package/api/components/parameters/appOAuth2SecretId.js.map +0 -1
- package/api/components/parameters/appOAuth2SecretId.ts +0 -9
- package/api/components/parameters/appSamlSecretId.js.map +0 -1
- package/api/components/parameters/appSamlSecretId.ts +0 -12
- package/api/components/parameters/assetId.js.map +0 -1
- package/api/components/parameters/assetId.ts +0 -9
- package/api/components/parameters/blockId.js.map +0 -1
- package/api/components/parameters/blockId.ts +0 -15
- package/api/components/parameters/blockVersion.js.map +0 -1
- package/api/components/parameters/blockVersion.ts +0 -9
- package/api/components/parameters/endpoint.js.map +0 -1
- package/api/components/parameters/endpoint.ts +0 -9
- package/api/components/parameters/index.js.map +0 -1
- package/api/components/parameters/index.ts +0 -18
- package/api/components/parameters/language.js.map +0 -1
- package/api/components/parameters/language.ts +0 -9
- package/api/components/parameters/organizationId.js.map +0 -1
- package/api/components/parameters/organizationId.ts +0 -9
- package/api/components/parameters/resourceId.js.map +0 -1
- package/api/components/parameters/resourceId.ts +0 -9
- package/api/components/parameters/resourceType.js.map +0 -1
- package/api/components/parameters/resourceType.ts +0 -11
- package/api/components/parameters/screenshotId.js.map +0 -1
- package/api/components/parameters/screenshotId.ts +0 -9
- package/api/components/parameters/view.js.map +0 -1
- package/api/components/parameters/view.ts +0 -8
- package/api/components/requestBodies/index.js.map +0 -1
- package/api/components/requestBodies/index.ts +0 -3
- package/api/components/requestBodies/oauth2Consent.js.map +0 -1
- package/api/components/requestBodies/oauth2Consent.ts +0 -31
- package/api/components/requestBodies/resource.js.map +0 -1
- package/api/components/requestBodies/resource.ts +0 -31
- package/api/components/requestBodies/user.js.map +0 -1
- package/api/components/requestBodies/user.ts +0 -12
- package/api/components/responses/app.js.map +0 -1
- package/api/components/responses/app.ts +0 -12
- package/api/components/responses/blockVersion.js.map +0 -1
- package/api/components/responses/blockVersion.ts +0 -12
- package/api/components/responses/default.js.map +0 -1
- package/api/components/responses/default.ts +0 -10
- package/api/components/responses/index.js.map +0 -1
- package/api/components/responses/index.ts +0 -8
- package/api/components/responses/invite.js.map +0 -1
- package/api/components/responses/invite.ts +0 -12
- package/api/components/responses/oauth2AuthorizationCode.js.map +0 -1
- package/api/components/responses/oauth2AuthorizationCode.ts +0 -12
- package/api/components/responses/organization.js.map +0 -1
- package/api/components/responses/organization.ts +0 -12
- package/api/components/responses/resource.js.map +0 -1
- package/api/components/responses/resource.ts +0 -17
- package/api/components/responses/subscriptions.js.map +0 -1
- package/api/components/responses/subscriptions.ts +0 -16
- package/api/components/schemas/ActionDefinition.js.map +0 -1
- package/api/components/schemas/ActionDefinition.ts +0 -82
- package/api/components/schemas/AnalyticsActionDefinition.js.map +0 -1
- package/api/components/schemas/AnalyticsActionDefinition.ts +0 -25
- package/api/components/schemas/App.js.map +0 -1
- package/api/components/schemas/App.ts +0 -107
- package/api/components/schemas/AppAccount.js.map +0 -1
- package/api/components/schemas/AppAccount.ts +0 -39
- package/api/components/schemas/AppDefinition.js.map +0 -1
- package/api/components/schemas/AppDefinition.ts +0 -112
- package/api/components/schemas/AppLayoutDefinition.js.map +0 -1
- package/api/components/schemas/AppLayoutDefinition.ts +0 -39
- package/api/components/schemas/AppMessages.js.map +0 -1
- package/api/components/schemas/AppMessages.ts +0 -17
- package/api/components/schemas/AppOAuth2Secret.js.map +0 -1
- package/api/components/schemas/AppOAuth2Secret.ts +0 -65
- package/api/components/schemas/AppsembleMessages.js.map +0 -1
- package/api/components/schemas/AppsembleMessages.ts +0 -41
- package/api/components/schemas/Asset.js.map +0 -1
- package/api/components/schemas/Asset.ts +0 -33
- package/api/components/schemas/BaseActionDefinition.js.map +0 -1
- package/api/components/schemas/BaseActionDefinition.ts +0 -11
- package/api/components/schemas/BaseJSONSchema.js.map +0 -1
- package/api/components/schemas/BaseJSONSchema.ts +0 -25
- package/api/components/schemas/BasePageDefinition.js.map +0 -1
- package/api/components/schemas/BasePageDefinition.ts +0 -89
- package/api/components/schemas/BlockDefinition.js.map +0 -1
- package/api/components/schemas/BlockDefinition.ts +0 -86
- package/api/components/schemas/BlockVersion.js.map +0 -1
- package/api/components/schemas/BlockVersion.ts +0 -162
- package/api/components/schemas/ConditionActionDefinition.js.map +0 -1
- package/api/components/schemas/ConditionActionDefinition.ts +0 -30
- package/api/components/schemas/CronDefinition.js.map +0 -1
- package/api/components/schemas/CronDefinition.ts +0 -21
- package/api/components/schemas/CustomFontDefinition.js.map +0 -1
- package/api/components/schemas/CustomFontDefinition.ts +0 -21
- package/api/components/schemas/DialogActionDefinition.js.map +0 -1
- package/api/components/schemas/DialogActionDefinition.ts +0 -42
- package/api/components/schemas/DialogErrorActionDefinition.js.map +0 -1
- package/api/components/schemas/DialogErrorActionDefinition.ts +0 -17
- package/api/components/schemas/DialogOkActionDefinition.js.map +0 -1
- package/api/components/schemas/DialogOkActionDefinition.ts +0 -17
- package/api/components/schemas/DownloadActionDefinition.js.map +0 -1
- package/api/components/schemas/DownloadActionDefinition.ts +0 -19
- package/api/components/schemas/EachActionDefinition.js.map +0 -1
- package/api/components/schemas/EachActionDefinition.ts +0 -22
- package/api/components/schemas/EmailActionDefinition.js.map +0 -1
- package/api/components/schemas/EmailActionDefinition.ts +0 -58
- package/api/components/schemas/Error.js.map +0 -1
- package/api/components/schemas/Error.ts +0 -25
- package/api/components/schemas/EventActionDefinition.js.map +0 -1
- package/api/components/schemas/EventActionDefinition.ts +0 -28
- package/api/components/schemas/EventsDefinition.js.map +0 -1
- package/api/components/schemas/EventsDefinition.ts +0 -30
- package/api/components/schemas/FlowBackActionDefinition.js.map +0 -1
- package/api/components/schemas/FlowBackActionDefinition.ts +0 -16
- package/api/components/schemas/FlowFinishActionDefinition.js.map +0 -1
- package/api/components/schemas/FlowFinishActionDefinition.ts +0 -16
- package/api/components/schemas/FlowNextActionDefinition.js.map +0 -1
- package/api/components/schemas/FlowNextActionDefinition.ts +0 -17
- package/api/components/schemas/FlowPageActionsDefinition.js.map +0 -1
- package/api/components/schemas/FlowPageActionsDefinition.ts +0 -20
- package/api/components/schemas/FlowPageDefinition.js.map +0 -1
- package/api/components/schemas/FlowPageDefinition.ts +0 -37
- package/api/components/schemas/FlowToActionDefinition.js.map +0 -1
- package/api/components/schemas/FlowToActionDefinition.ts +0 -21
- package/api/components/schemas/GoogleFontDefinition.js.map +0 -1
- package/api/components/schemas/GoogleFontDefinition.ts +0 -24
- package/api/components/schemas/Health.js.map +0 -1
- package/api/components/schemas/Health.ts +0 -14
- package/api/components/schemas/JSONPointer.js.map +0 -1
- package/api/components/schemas/JSONPointer.ts +0 -20
- package/api/components/schemas/JSONSchema.js.map +0 -1
- package/api/components/schemas/JSONSchema.ts +0 -21
- package/api/components/schemas/JSONSchemaAnyOf.js.map +0 -1
- package/api/components/schemas/JSONSchemaAnyOf.ts +0 -27
- package/api/components/schemas/JSONSchemaArray.js.map +0 -1
- package/api/components/schemas/JSONSchemaArray.ts +0 -47
- package/api/components/schemas/JSONSchemaBoolean.js.map +0 -1
- package/api/components/schemas/JSONSchemaBoolean.ts +0 -37
- package/api/components/schemas/JSONSchemaConst.js.map +0 -1
- package/api/components/schemas/JSONSchemaConst.ts +0 -16
- package/api/components/schemas/JSONSchemaEnum.js.map +0 -1
- package/api/components/schemas/JSONSchemaEnum.ts +0 -36
- package/api/components/schemas/JSONSchemaInteger.js.map +0 -1
- package/api/components/schemas/JSONSchemaInteger.ts +0 -55
- package/api/components/schemas/JSONSchemaMultiType.js.map +0 -1
- package/api/components/schemas/JSONSchemaMultiType.ts +0 -48
- package/api/components/schemas/JSONSchemaNot.js.map +0 -1
- package/api/components/schemas/JSONSchemaNot.ts +0 -23
- package/api/components/schemas/JSONSchemaNull.js.map +0 -1
- package/api/components/schemas/JSONSchemaNull.ts +0 -16
- package/api/components/schemas/JSONSchemaNumber.js.map +0 -1
- package/api/components/schemas/JSONSchemaNumber.ts +0 -66
- package/api/components/schemas/JSONSchemaObject.js.map +0 -1
- package/api/components/schemas/JSONSchemaObject.ts +0 -74
- package/api/components/schemas/JSONSchemaOneOf.js.map +0 -1
- package/api/components/schemas/JSONSchemaOneOf.ts +0 -25
- package/api/components/schemas/JSONSchemaRemapper.js.map +0 -1
- package/api/components/schemas/JSONSchemaRemapper.ts +0 -19
- package/api/components/schemas/JSONSchemaRoot.js.map +0 -1
- package/api/components/schemas/JSONSchemaRoot.ts +0 -23
- package/api/components/schemas/JSONSchemaString.js.map +0 -1
- package/api/components/schemas/JSONSchemaString.ts +0 -116
- package/api/components/schemas/LinkActionDefinition.js.map +0 -1
- package/api/components/schemas/LinkActionDefinition.ts +0 -28
- package/api/components/schemas/LinkBackActionDefinition.js.map +0 -1
- package/api/components/schemas/LinkBackActionDefinition.ts +0 -14
- package/api/components/schemas/LinkNextActionDefinition.js.map +0 -1
- package/api/components/schemas/LinkNextActionDefinition.ts +0 -14
- package/api/components/schemas/LogActionDefinition.js.map +0 -1
- package/api/components/schemas/LogActionDefinition.ts +0 -22
- package/api/components/schemas/Member.js.map +0 -1
- package/api/components/schemas/Member.ts +0 -31
- package/api/components/schemas/MessageActionDefinition.js.map +0 -1
- package/api/components/schemas/MessageActionDefinition.ts +0 -36
- package/api/components/schemas/NoopActionDefinition.js.map +0 -1
- package/api/components/schemas/NoopActionDefinition.ts +0 -17
- package/api/components/schemas/NotificationHookDataDefinition.js.map +0 -1
- package/api/components/schemas/NotificationHookDataDefinition.ts +0 -25
- package/api/components/schemas/NotificationHookDefinition.js.map +0 -1
- package/api/components/schemas/NotificationHookDefinition.ts +0 -33
- package/api/components/schemas/OAuth2AuthorizationCode.js.map +0 -1
- package/api/components/schemas/OAuth2AuthorizationCode.ts +0 -15
- package/api/components/schemas/OAuth2ClientCredentials.js.map +0 -1
- package/api/components/schemas/OAuth2ClientCredentials.ts +0 -39
- package/api/components/schemas/ObjectRemapperDefinition.js.map +0 -1
- package/api/components/schemas/ObjectRemapperDefinition.ts +0 -453
- package/api/components/schemas/Organization.js.map +0 -1
- package/api/components/schemas/Organization.ts +0 -40
- package/api/components/schemas/PageDefinition.js.map +0 -1
- package/api/components/schemas/PageDefinition.ts +0 -23
- package/api/components/schemas/Rating.js.map +0 -1
- package/api/components/schemas/Rating.ts +0 -25
- package/api/components/schemas/RemapperDefinition.js.map +0 -1
- package/api/components/schemas/RemapperDefinition.ts +0 -35
- package/api/components/schemas/RequestActionDefinition.js.map +0 -1
- package/api/components/schemas/RequestActionDefinition.ts +0 -60
- package/api/components/schemas/Resource.js.map +0 -1
- package/api/components/schemas/Resource.ts +0 -20
- package/api/components/schemas/ResourceCountActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceCountActionDefinition.ts +0 -23
- package/api/components/schemas/ResourceCreateActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceCreateActionDefinition.ts +0 -22
- package/api/components/schemas/ResourceDefinition.js.map +0 -1
- package/api/components/schemas/ResourceDefinition.ts +0 -229
- package/api/components/schemas/ResourceDeleteActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceDeleteActionDefinition.ts +0 -22
- package/api/components/schemas/ResourceGetActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceGetActionDefinition.ts +0 -26
- package/api/components/schemas/ResourceHistoryDefinition.js.map +0 -1
- package/api/components/schemas/ResourceHistoryDefinition.ts +0 -15
- package/api/components/schemas/ResourceHooksDefinition.js.map +0 -1
- package/api/components/schemas/ResourceHooksDefinition.ts +0 -11
- package/api/components/schemas/ResourceQueryActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceQueryActionDefinition.ts +0 -26
- package/api/components/schemas/ResourceSubscription.js.map +0 -1
- package/api/components/schemas/ResourceSubscription.ts +0 -42
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.ts +0 -23
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.ts +0 -25
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.ts +0 -22
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.ts +0 -25
- package/api/components/schemas/ResourceUpdateActionDefinition.js.map +0 -1
- package/api/components/schemas/ResourceUpdateActionDefinition.ts +0 -22
- package/api/components/schemas/ResourceViewDefinition.js.map +0 -1
- package/api/components/schemas/ResourceViewDefinition.ts +0 -26
- package/api/components/schemas/SSLSecret.js.map +0 -1
- package/api/components/schemas/SSLSecret.ts +0 -17
- package/api/components/schemas/SSOConfiguration.js.map +0 -1
- package/api/components/schemas/SSOConfiguration.ts +0 -22
- package/api/components/schemas/SecurityDefaultDefinition.js.map +0 -1
- package/api/components/schemas/SecurityDefaultDefinition.ts +0 -29
- package/api/components/schemas/SecurityDefinition.js.map +0 -1
- package/api/components/schemas/SecurityDefinition.ts +0 -21
- package/api/components/schemas/SecurityRoleDefinition.js.map +0 -1
- package/api/components/schemas/SecurityRoleDefinition.ts +0 -29
- package/api/components/schemas/ShareActionDefinition.js.map +0 -1
- package/api/components/schemas/ShareActionDefinition.ts +0 -30
- package/api/components/schemas/StaticActionDefinition.js.map +0 -1
- package/api/components/schemas/StaticActionDefinition.ts +0 -20
- package/api/components/schemas/StorageAppendActionDefinition.js.map +0 -1
- package/api/components/schemas/StorageAppendActionDefinition.ts +0 -43
- package/api/components/schemas/StorageDeleteActionDefinition.js.map +0 -1
- package/api/components/schemas/StorageDeleteActionDefinition.ts +0 -31
- package/api/components/schemas/StorageReadActionDefinition.js.map +0 -1
- package/api/components/schemas/StorageReadActionDefinition.ts +0 -32
- package/api/components/schemas/StorageSubtractActionDefinition.js.map +0 -1
- package/api/components/schemas/StorageSubtractActionDefinition.ts +0 -35
- package/api/components/schemas/StorageUpdateActionDefinition.js.map +0 -1
- package/api/components/schemas/StorageUpdateActionDefinition.ts +0 -46
- package/api/components/schemas/StorageWriteActionDefinition.js.map +0 -1
- package/api/components/schemas/StorageWriteActionDefinition.ts +0 -42
- package/api/components/schemas/SubPage.js.map +0 -1
- package/api/components/schemas/SubPage.ts +0 -24
- package/api/components/schemas/TabsPageDefinition.js.map +0 -1
- package/api/components/schemas/TabsPageDefinition.ts +0 -22
- package/api/components/schemas/TeamInviteActionDefinition.js.map +0 -1
- package/api/components/schemas/TeamInviteActionDefinition.ts +0 -27
- package/api/components/schemas/TeamJoinActionDefinition.js.map +0 -1
- package/api/components/schemas/TeamJoinActionDefinition.ts +0 -14
- package/api/components/schemas/TeamListActionDefinition.js.map +0 -1
- package/api/components/schemas/TeamListActionDefinition.ts +0 -14
- package/api/components/schemas/TeamsDefinition.js.map +0 -1
- package/api/components/schemas/TeamsDefinition.ts +0 -30
- package/api/components/schemas/Theme.js.map +0 -1
- package/api/components/schemas/Theme.ts +0 -82
- package/api/components/schemas/ThrowActionDefinition.js.map +0 -1
- package/api/components/schemas/ThrowActionDefinition.ts +0 -17
- package/api/components/schemas/User.js.map +0 -1
- package/api/components/schemas/User.ts +0 -30
- package/api/components/schemas/UserEmail.js.map +0 -1
- package/api/components/schemas/UserEmail.ts +0 -24
- package/api/components/schemas/UserLoginActionDefinition.js.map +0 -1
- package/api/components/schemas/UserLoginActionDefinition.ts +0 -22
- package/api/components/schemas/UserRegisterActionDefinition.js.map +0 -1
- package/api/components/schemas/UserRegisterActionDefinition.ts +0 -33
- package/api/components/schemas/UserUpdateActionDefinition.js.map +0 -1
- package/api/components/schemas/UserUpdateActionDefinition.ts +0 -33
- package/api/components/schemas/index.js.map +0 -1
- package/api/components/schemas/index.ts +0 -108
- package/api/components/schemas/utils.js.map +0 -1
- package/api/components/schemas/utils.ts +0 -43
- package/api/components/securitySchemes/app.js.map +0 -1
- package/api/components/securitySchemes/app.ts +0 -33
- package/api/components/securitySchemes/basic.js.map +0 -1
- package/api/components/securitySchemes/basic.ts +0 -7
- package/api/components/securitySchemes/cli.js.map +0 -1
- package/api/components/securitySchemes/cli.test.js.map +0 -1
- package/api/components/securitySchemes/cli.test.ts +0 -6
- package/api/components/securitySchemes/cli.ts +0 -25
- package/api/components/securitySchemes/index.js.map +0 -1
- package/api/components/securitySchemes/index.ts +0 -4
- package/api/components/securitySchemes/studio.js.map +0 -1
- package/api/components/securitySchemes/studio.ts +0 -8
- package/api/index.js.map +0 -1
- package/api/index.test.js.map +0 -1
- package/api/index.test.ts +0 -196
- package/api/index.ts +0 -44
- package/api/paths/action.js.map +0 -1
- package/api/paths/action.ts +0 -55
- package/api/paths/appMessages.js.map +0 -1
- package/api/paths/appMessages.ts +0 -104
- package/api/paths/appOAuth2Secrets.js.map +0 -1
- package/api/paths/appOAuth2Secrets.ts +0 -152
- package/api/paths/appSSLSecrets.js.map +0 -1
- package/api/paths/appSSLSecrets.ts +0 -40
- package/api/paths/appSamlSecrets.js.map +0 -1
- package/api/paths/appSamlSecrets.ts +0 -85
- package/api/paths/apps.js.map +0 -1
- package/api/paths/apps.ts +0 -1394
- package/api/paths/appsembleMessages.js.map +0 -1
- package/api/paths/appsembleMessages.ts +0 -49
- package/api/paths/assets.js.map +0 -1
- package/api/paths/assets.ts +0 -139
- package/api/paths/blocks.js.map +0 -1
- package/api/paths/blocks.ts +0 -184
- package/api/paths/emails.js.map +0 -1
- package/api/paths/emails.ts +0 -164
- package/api/paths/health.js.map +0 -1
- package/api/paths/health.ts +0 -75
- package/api/paths/index.js.map +0 -1
- package/api/paths/index.ts +0 -45
- package/api/paths/invite.js.map +0 -1
- package/api/paths/invite.ts +0 -26
- package/api/paths/oauth2ClientCredentials.js.map +0 -1
- package/api/paths/oauth2ClientCredentials.ts +0 -79
- package/api/paths/oauth2Login.js.map +0 -1
- package/api/paths/oauth2Login.ts +0 -120
- package/api/paths/oauth2Provider.js.map +0 -1
- package/api/paths/oauth2Provider.ts +0 -73
- package/api/paths/organizations.js.map +0 -1
- package/api/paths/organizations.ts +0 -471
- package/api/paths/resourceHistory.js.map +0 -1
- package/api/paths/resourceHistory.ts +0 -32
- package/api/paths/resources.js.map +0 -1
- package/api/paths/resources.ts +0 -305
- package/api/paths/saml.js.map +0 -1
- package/api/paths/saml.ts +0 -127
- package/api/paths/templates.js.map +0 -1
- package/api/paths/templates.ts +0 -85
- package/api/paths/user.js.map +0 -1
- package/api/paths/user.ts +0 -481
- package/api/schema-tests/AppDefinition/invalid/additional-property.yaml +0 -11
- package/api/schema-tests/AppDefinition/invalid/empty-pages.yaml +0 -4
- package/api/schema-tests/AppDefinition/invalid/missing-default-page.yaml +0 -7
- package/api/schema-tests/AppDefinition/invalid/missing-name.yaml +0 -7
- package/api/schema-tests/AppDefinition/invalid/missing-pages.yaml +0 -2
- package/api/schema-tests/AppDefinition/valid/all-properties.yaml +0 -114
- package/api/schema-tests/AppDefinition/valid/minimal.yaml +0 -9
- package/api/schema-tests/FlowPageDefinition/invalid/missing-subPages.yaml +0 -2
- package/api/schema-tests/FlowPageDefinition/valid/flow.yaml +0 -15
- package/api/schema-tests/PageDefinition/invalid/additional-properties.yaml +0 -5
- package/api/schema-tests/PageDefinition/invalid/missing-blocks.yaml +0 -1
- package/api/schema-tests/PageDefinition/invalid/missing-name.yaml +0 -3
- package/api/schema-tests/PageDefinition/valid/all-properties.yaml +0 -15
- package/api/schema-tests/PageDefinition/valid/minimal.yaml +0 -5
- package/api/schema-tests/TabsPageDefinition/invalid/missing-subPages.yaml +0 -2
- package/api/schema-tests/TabsPageDefinition/valid/tabs.yaml +0 -7
- package/api/tags/app.js.map +0 -1
- package/api/tags/app.ts +0 -6
- package/api/tags/appMember.js.map +0 -1
- package/api/tags/appMember.ts +0 -6
- package/api/tags/asset.js.map +0 -1
- package/api/tags/asset.ts +0 -6
- package/api/tags/auth.js.map +0 -1
- package/api/tags/auth.ts +0 -6
- package/api/tags/index.js.map +0 -1
- package/api/tags/index.ts +0 -9
- package/api/tags/language.js.map +0 -1
- package/api/tags/language.ts +0 -6
- package/api/tags/organization.js.map +0 -1
- package/api/tags/organization.ts +0 -6
- package/api/tags/resource.js.map +0 -1
- package/api/tags/resource.ts +0 -6
- package/api/tags/template.js.map +0 -1
- package/api/tags/template.ts +0 -6
- package/api/tags/user.js.map +0 -1
- package/api/tags/user.ts +0 -6
- package/appMessages.js.map +0 -1
- package/appMessages.test.js.map +0 -1
- package/appMessages.test.ts +0 -432
- package/appMessages.ts +0 -145
- package/appSecurity.js.map +0 -1
- package/appSecurity.test.js.map +0 -1
- package/appSecurity.test.ts +0 -141
- package/appSecurity.ts +0 -48
- package/blockUtils.js.map +0 -1
- package/blockUtils.test.js.map +0 -1
- package/blockUtils.test.ts +0 -94
- package/blockUtils.ts +0 -76
- package/changed/added/.gitkeep +0 -0
- package/changed/changed/.gitkeep +0 -0
- package/changed/deprecated/.gitkeep +0 -0
- package/changed/fixed/.gitkeep +0 -0
- package/changed/removed/.gitkeep +0 -0
- package/changed/security/.gitkeep +0 -0
- package/checkAppRole.js.map +0 -1
- package/checkAppRole.ts +0 -49
- package/compare.js.map +0 -1
- package/compare.ts +0 -10
- package/constants/Permission.js.map +0 -1
- package/constants/Permission.ts +0 -95
- package/constants/asciiLogo.js.map +0 -1
- package/constants/asciiLogo.ts +0 -8
- package/constants/baseTheme.js.map +0 -1
- package/constants/baseTheme.ts +0 -17
- package/constants/date.js.map +0 -1
- package/constants/date.ts +0 -20
- package/constants/fonts.js.map +0 -1
- package/constants/fonts.ts +0 -1291
- package/constants/index.js.map +0 -1
- package/constants/index.ts +0 -9
- package/constants/locale.js.map +0 -1
- package/constants/locale.ts +0 -4
- package/constants/patterns.js.map +0 -1
- package/constants/patterns.test.js.map +0 -1
- package/constants/patterns.test.ts +0 -100
- package/constants/patterns.ts +0 -48
- package/constants/roles.js.map +0 -1
- package/constants/roles.ts +0 -49
- package/constants/scopes.js.map +0 -1
- package/constants/scopes.ts +0 -13
- package/convertToCsv.js.map +0 -1
- package/convertToCsv.test.js.map +0 -1
- package/convertToCsv.test.ts +0 -73
- package/convertToCsv.ts +0 -65
- package/formatRequestAction.js.map +0 -1
- package/formatRequestAction.ts +0 -16
- package/has.js.map +0 -1
- package/has.test.js.map +0 -1
- package/has.test.ts +0 -19
- package/has.ts +0 -10
- package/i18n.js.map +0 -1
- package/i18n.test.js.map +0 -1
- package/i18n.test.ts +0 -81
- package/i18n.ts +0 -55
- package/ics.js.map +0 -1
- package/ics.ts +0 -44
- package/index.js.map +0 -1
- package/index.ts +0 -29
- package/intl-messageformat.js.map +0 -1
- package/intl-messageformat.ts +0 -6
- package/iterApp.js.map +0 -1
- package/iterApp.test.js.map +0 -1
- package/iterApp.test.ts +0 -512
- package/iterApp.ts +0 -174
- package/jest.config.js +0 -3
- package/jsonschema.js.map +0 -1
- package/jsonschema.test.js.map +0 -1
- package/jsonschema.test.ts +0 -320
- package/jsonschema.ts +0 -222
- package/langmap.js.map +0 -1
- package/langmap.ts +0 -23
- package/mapValues.js.map +0 -1
- package/mapValues.test.js.map +0 -1
- package/mapValues.test.ts +0 -15
- package/mapValues.ts +0 -10
- package/miscellaneous.js.map +0 -1
- package/miscellaneous.test.js.map +0 -1
- package/miscellaneous.test.ts +0 -82
- package/miscellaneous.ts +0 -71
- package/noop.js.map +0 -1
- package/noop.ts +0 -5
- package/normalize.js.map +0 -1
- package/normalize.test.js.map +0 -1
- package/normalize.test.ts +0 -24
- package/normalize.ts +0 -23
- package/objectCache.js.map +0 -1
- package/objectCache.test.js.map +0 -1
- package/objectCache.test.ts +0 -19
- package/objectCache.ts +0 -22
- package/pem.js.map +0 -1
- package/pem.ts +0 -11
- package/prefix.js.map +0 -1
- package/prefix.test.js.map +0 -1
- package/prefix.test.ts +0 -11
- package/prefix.ts +0 -10
- package/remap.js.map +0 -1
- package/remap.test.js.map +0 -1
- package/remap.test.ts +0 -1039
- package/remap.ts +0 -455
- package/string.js.map +0 -1
- package/string.test.js.map +0 -1
- package/string.test.ts +0 -29
- package/string.ts +0 -31
- package/theme.js.map +0 -1
- package/theme.test.js.map +0 -1
- package/theme.test.ts +0 -99
- package/theme.ts +0 -38
- package/tsconfig.json +0 -6
- package/types.js.map +0 -1
- package/types.ts +0 -6
- package/validateStyle.js.map +0 -1
- package/validateStyle.test.js.map +0 -1
- package/validateStyle.test.ts +0 -14
- package/validateStyle.ts +0 -19
- package/validation.js.map +0 -1
- package/validation.test.js.map +0 -1
- package/validation.test.ts +0 -1915
- package/validation.ts +0 -767
package/constants/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
package/constants/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './baseTheme.js';
|
|
2
|
-
export * from './asciiLogo.js';
|
|
3
|
-
export * from './date.js';
|
|
4
|
-
export * from './fonts.js';
|
|
5
|
-
export * from './locale.js';
|
|
6
|
-
export * from './scopes.js';
|
|
7
|
-
export * from './patterns.js';
|
|
8
|
-
export * from './roles.js';
|
|
9
|
-
export * from './Permission.js';
|
package/constants/locale.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","sourceRoot":"","sources":["locale.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC"}
|
package/constants/locale.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["patterns.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,wCAAwC,CAAC;AAE1E;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,MAAM,CACxC,KAAK,iBAAiB,CAAC,MAAM,IAAI,iBAAiB,CAAC,MAA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MAAM,EAAE,EAAE;QAC/B,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,IAAI,CAAC;QACN,GAAG;QACH,KAAK;QACL,MAAM;QACN,MAAM;QACN,mBAAmB;QACnB,aAAa;QACb,aAAa;QACb,aAAa;QACb,yBAAyB;KAC1B,CAAC,CAAC,qBAAqB,EAAE,CAAC,MAAM,EAAE,EAAE;QACnC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CACjE,iBAAiB,EACjB,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACnD,CAAC,CACF,CAAC;IAEF,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAC/E,iBAAiB,EACjB,CAAC,MAAM,EAAE,EAAE;QACT,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvD,CAAC,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
domainPattern,
|
|
3
|
-
googleAnalyticsIDPattern,
|
|
4
|
-
normalized,
|
|
5
|
-
partialNormalized,
|
|
6
|
-
} from './patterns.js';
|
|
7
|
-
|
|
8
|
-
describe('partialNormalized', () => {
|
|
9
|
-
it.each([
|
|
10
|
-
['Ffoo', 'foo'],
|
|
11
|
-
['barB', 'bar'],
|
|
12
|
-
['I am victorous', 'am'],
|
|
13
|
-
])('should match %j as %j', (input, expected) => {
|
|
14
|
-
const match = input.match(partialNormalized);
|
|
15
|
-
expect(match).not.toBeNull();
|
|
16
|
-
expect(match).toHaveLength(2);
|
|
17
|
-
expect([...match]).toStrictEqual([expected, expected]);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should be reusable to compose a new regular expression', () => {
|
|
21
|
-
const composed = new RegExp(`^@${partialNormalized.source}/${partialNormalized.source}$`);
|
|
22
|
-
const match = '@foo/bar'.match(composed);
|
|
23
|
-
expect(match).not.toBeNull();
|
|
24
|
-
expect(match).toHaveLength(3);
|
|
25
|
-
expect([...match]).toStrictEqual(['@foo/bar', 'foo', 'bar']);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe('normalized', () => {
|
|
30
|
-
it.each([
|
|
31
|
-
'foo',
|
|
32
|
-
'bar',
|
|
33
|
-
'a',
|
|
34
|
-
'ab',
|
|
35
|
-
'hyphenated-string',
|
|
36
|
-
'multi-hyphenated-string',
|
|
37
|
-
'1',
|
|
38
|
-
'10-second-move',
|
|
39
|
-
'13-37',
|
|
40
|
-
])('should match %j', (string) => {
|
|
41
|
-
expect(string).toMatch(normalized);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it.each([
|
|
45
|
-
'-',
|
|
46
|
-
'Uppercase',
|
|
47
|
-
'uppercasE',
|
|
48
|
-
'camelCase',
|
|
49
|
-
'double--hyphen',
|
|
50
|
-
'trouble--double--hyphen',
|
|
51
|
-
'triple---hyphen',
|
|
52
|
-
'under_score',
|
|
53
|
-
'aććëņtèd',
|
|
54
|
-
'🐱',
|
|
55
|
-
])('should not match %j', (string) => {
|
|
56
|
-
expect(string).not.toMatch(normalized);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
describe('domainPattern', () => {
|
|
61
|
-
it.each([
|
|
62
|
-
'example.com',
|
|
63
|
-
'valid.com',
|
|
64
|
-
'definitely.valid.org',
|
|
65
|
-
'a.nl',
|
|
66
|
-
'very.deeply.nested.domain.name.example',
|
|
67
|
-
])('should match %j', (string) => {
|
|
68
|
-
expect(string).toMatch(domainPattern);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it.each([
|
|
72
|
-
'a',
|
|
73
|
-
'a.a',
|
|
74
|
-
'.com',
|
|
75
|
-
'-.de',
|
|
76
|
-
'valid.ínválíd.com',
|
|
77
|
-
'example.COM',
|
|
78
|
-
'EXAMPLE.com',
|
|
79
|
-
'EXAMPLE.COM',
|
|
80
|
-
'This is a random string',
|
|
81
|
-
])('should not match %j', (string) => {
|
|
82
|
-
expect(string).not.toMatch(domainPattern);
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
describe('googleAnalyticsIDPattern', () => {
|
|
87
|
-
it.each(['', 'UA-12345678-9', 'G-0123456789ABC', 'UA-211654446-1'])(
|
|
88
|
-
'should match %j',
|
|
89
|
-
(string) => {
|
|
90
|
-
expect(string).toMatch(googleAnalyticsIDPattern);
|
|
91
|
-
},
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
it.each([' ', 'AU-123456789-0', 'UA-123-123', 'UA-1234-12345', 'G-012345678abc'])(
|
|
95
|
-
'should match %j',
|
|
96
|
-
(string) => {
|
|
97
|
-
expect(string).not.toMatch(googleAnalyticsIDPattern);
|
|
98
|
-
},
|
|
99
|
-
);
|
|
100
|
-
});
|
package/constants/patterns.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A pattern for extracting a semver value.
|
|
3
|
-
*/
|
|
4
|
-
export const partialSemver = /\d+\.\d+\.\d+/;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A pattern for validating a hexadecimal RGB color.
|
|
8
|
-
*/
|
|
9
|
-
export const hexColor = /^#[\dA-Fa-f]{6}$/;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A pattern for matching a full semver.
|
|
13
|
-
*/
|
|
14
|
-
export const semver = new RegExp(`^${partialSemver.source}$`);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A pattern for extracting a normalized string.
|
|
18
|
-
*/
|
|
19
|
-
export const partialNormalized = /([\da-z](?:(?!.*--)[\da-z-]*[\da-z])?)/;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A pattern for exactly matching a lower case hyphen separated string.
|
|
23
|
-
*/
|
|
24
|
-
export const normalized = new RegExp(`^${partialNormalized.source}$`);
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A pattern for matching the block name pattern of @organization/block.
|
|
28
|
-
*/
|
|
29
|
-
export const blockNamePattern = new RegExp(
|
|
30
|
-
`^@${partialNormalized.source}/${partialNormalized.source}$`,
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
export const domainPattern = new RegExp(`^(${partialNormalized.source}+\\.)+[a-z]{2,}$`);
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* A pattern to match a Google Analytics ID or an empty string.
|
|
37
|
-
*/
|
|
38
|
-
export const googleAnalyticsIDPattern = /^(|UA-\d{4,10}-\d{1,4}|G-[\dA-Z]{4,})$/;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* A pattern which matches a UUID 4.
|
|
42
|
-
*/
|
|
43
|
-
export const uuid4Pattern = /^[\d[a-f]{8}-[\da-f]{4}-4[\da-f]{3}-[\da-f]{4}-[\d[a-f]{12}$/;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* A pattern which matches a JSON web token.
|
|
47
|
-
*/
|
|
48
|
-
export const jwtPattern = /^[\w-]+(?:\.[\w-]+){2}$/;
|
package/constants/roles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBA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ETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Permission } from './Permission.js';
|
|
2
|
-
|
|
3
|
-
const member = [Permission.ViewApps, Permission.ViewMembers];
|
|
4
|
-
const Translator = [...member, Permission.EditAppMessages];
|
|
5
|
-
const APIReader = [...member, Permission.ReadAssets, Permission.ReadResources];
|
|
6
|
-
const APIUser = [...APIReader, Permission.ManageAssets, Permission.ManageResources];
|
|
7
|
-
|
|
8
|
-
const AppEditor = [
|
|
9
|
-
...member,
|
|
10
|
-
Permission.EditApps,
|
|
11
|
-
Permission.EditAppMessages,
|
|
12
|
-
Permission.ManageAssets,
|
|
13
|
-
Permission.ManageResources,
|
|
14
|
-
Permission.PushNotifications,
|
|
15
|
-
Permission.ReadAssets,
|
|
16
|
-
Permission.ReadResources,
|
|
17
|
-
];
|
|
18
|
-
const Maintainer = [
|
|
19
|
-
...AppEditor,
|
|
20
|
-
Permission.CreateApps,
|
|
21
|
-
Permission.DeleteApps,
|
|
22
|
-
Permission.EditAppSettings,
|
|
23
|
-
Permission.InviteMember,
|
|
24
|
-
Permission.ManageTeams,
|
|
25
|
-
Permission.PublishBlocks,
|
|
26
|
-
];
|
|
27
|
-
const Owner = [
|
|
28
|
-
...Maintainer,
|
|
29
|
-
Permission.EditOrganization,
|
|
30
|
-
Permission.ManageMembers,
|
|
31
|
-
Permission.ManageRoles,
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
export const roles = {
|
|
35
|
-
Member: member,
|
|
36
|
-
Translator,
|
|
37
|
-
APIReader,
|
|
38
|
-
APIUser,
|
|
39
|
-
AppEditor,
|
|
40
|
-
Maintainer,
|
|
41
|
-
Owner,
|
|
42
|
-
} as const;
|
|
43
|
-
|
|
44
|
-
export type Role = keyof typeof roles;
|
|
45
|
-
|
|
46
|
-
export enum TeamRole {
|
|
47
|
-
Member = 'member',
|
|
48
|
-
Manager = 'manager',
|
|
49
|
-
}
|
package/constants/scopes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["scopes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,YAAY;IACZ,cAAc;IACd,qBAAqB;IACrB,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,aAAa;CACL,CAAC"}
|
package/constants/scopes.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All known OAuth2 scopes for client credentials.
|
|
3
|
-
*/
|
|
4
|
-
export const scopes = [
|
|
5
|
-
'apps:write',
|
|
6
|
-
'blocks:write',
|
|
7
|
-
'organizations:write',
|
|
8
|
-
'resources:read',
|
|
9
|
-
'resources:write',
|
|
10
|
-
'assets:write',
|
|
11
|
-
'teams:read',
|
|
12
|
-
'teams:write',
|
|
13
|
-
] as const;
|
package/convertToCsv.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertToCsv.js","sourceRoot":"","sources":["convertToCsv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS;IACpC,MAAM,SAAS,GAAG,GAAG,CAAC;IACtB,MAAM,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,KAAK,GAAG,GAAG,CAAC;IAClB,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,CAAC,KAAa,EAAU,EAAE,CACvC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC3E,CAAC,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,KAAK,GAAG,KAAK,EA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AC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,KAAK,GAAG,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAG,sDAAsD,CAAC;QAEtE,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,KAAK,GAAG,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,qCAAqC,CAAC;QAErD,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,KAAK,GAAU,EAAE,CAAC;QACxB,MAAM,MAAM,GAAQ,IAAI,CAAC;QAEzB,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/convertToCsv.test.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { convertToCsv } from './convertToCsv.js';
|
|
2
|
-
|
|
3
|
-
describe('convertToCsv', () => {
|
|
4
|
-
it('should throw an error if input is null', () => {
|
|
5
|
-
const input: any = null;
|
|
6
|
-
|
|
7
|
-
expect(() => convertToCsv(input as any)).toThrow(new Error('No data'));
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it('should return an error if the input has no keys', () => {
|
|
11
|
-
const input = {};
|
|
12
|
-
|
|
13
|
-
expect(() => convertToCsv(input)).toThrow(new Error('No headers could be found'));
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('should return an error if the input is a primitive', () => {
|
|
17
|
-
const input = 'foo';
|
|
18
|
-
|
|
19
|
-
expect(() => convertToCsv(input as any)).toThrow(new TypeError('Data is of an invalid type'));
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should correctly combines all headers', () => {
|
|
23
|
-
const input = [
|
|
24
|
-
{ foo: 123, baz: 1 },
|
|
25
|
-
{ foo: 123, bar: 'bar' },
|
|
26
|
-
];
|
|
27
|
-
const output = 'bar,baz,foo\r\n,1,123\r\nbar,,123\r\n';
|
|
28
|
-
|
|
29
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('should support an arrays of objects', () => {
|
|
33
|
-
const input = [{ foo: 123 }, { foo: 321 }];
|
|
34
|
-
const output = 'foo\r\n123\r\n321\r\n';
|
|
35
|
-
|
|
36
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('should escape strings containing commas', () => {
|
|
40
|
-
const input = [{ 'foo,bar': 'foo,bar' }];
|
|
41
|
-
const output = '"foo,bar"\r\n"foo,bar"\r\n';
|
|
42
|
-
|
|
43
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('should escape strings containing newlines', () => {
|
|
47
|
-
const input = { 'foo\r\nline2': 'foo\r\nbar' };
|
|
48
|
-
const output = '"foo\r\nline2"\r\n"foo\r\nbar"\r\n';
|
|
49
|
-
|
|
50
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('should escape quotes', () => {
|
|
54
|
-
const input = { 'foo "example" bar': 'Lots of "str"ings"' };
|
|
55
|
-
const output = '"foo ""example"" bar"\r\n"Lots of ""str""ings"""\r\n';
|
|
56
|
-
|
|
57
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it('should convert date objects', () => {
|
|
61
|
-
const input = { foo: new Date(0) };
|
|
62
|
-
const output = 'foo\r\n1970-01-01T00:00:00.000Z\r\n';
|
|
63
|
-
|
|
64
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
it('should return null on empty results', () => {
|
|
68
|
-
const input: any[] = [];
|
|
69
|
-
const output: any = null;
|
|
70
|
-
|
|
71
|
-
expect(convertToCsv(input)).toStrictEqual(output);
|
|
72
|
-
});
|
|
73
|
-
});
|
package/convertToCsv.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { compareStrings } from './index.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Converts an object or an array of objects to a valid CSV format.
|
|
5
|
-
*
|
|
6
|
-
* Implements https://tools.ietf.org/html/rfc4180
|
|
7
|
-
*
|
|
8
|
-
* @param body An object containing the data to be converted.
|
|
9
|
-
* @returns The data serialized as CSV.
|
|
10
|
-
*/
|
|
11
|
-
export function convertToCsv(body: any): string {
|
|
12
|
-
const separator = ',';
|
|
13
|
-
const lineEnd = '\r\n';
|
|
14
|
-
const quote = '"';
|
|
15
|
-
const quoteRegex = new RegExp(quote, 'g');
|
|
16
|
-
const escape = (value: string): string =>
|
|
17
|
-
value.includes(separator) || value.includes(lineEnd) || value.includes(quote)
|
|
18
|
-
? `${quote}${value.replace(quoteRegex, `${quote}${quote}`)}${quote}`
|
|
19
|
-
: value;
|
|
20
|
-
|
|
21
|
-
if (body == null) {
|
|
22
|
-
throw new Error('No data');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (typeof body !== 'object') {
|
|
26
|
-
throw new TypeError('Data is of an invalid type');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const data = Array.isArray(body) ? body : [body];
|
|
30
|
-
|
|
31
|
-
if (data.length === 0) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const headers = [...new Set(data.flatMap((value) => Object.keys(value)))].sort(compareStrings);
|
|
36
|
-
|
|
37
|
-
if (headers.length === 0) {
|
|
38
|
-
throw new Error('No headers could be found');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const lines = data.map((object) => {
|
|
42
|
-
const values = headers.map((header) => {
|
|
43
|
-
let value = object[header];
|
|
44
|
-
if (value == null) {
|
|
45
|
-
return '';
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if ((value as Date).toJSON instanceof Function) {
|
|
49
|
-
value = (value as Date).toJSON();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (typeof value !== 'string') {
|
|
53
|
-
value = JSON.stringify(value);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return escape(value as string);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
return values.join(separator);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
return `${headers.map((header) => escape(header)).join(separator)}${lineEnd}${lines.join(
|
|
63
|
-
lineEnd,
|
|
64
|
-
)}${lineEnd}`;
|
|
65
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatRequestAction.js","sourceRoot":"","sources":["formatRequestAction.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CACjC,EAAE,MAAM,GAAG,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,EAA+B,EACjE,IAAa,EACb,KAA+E,EAC/E,OAAgC;IAEhC,OAAO;QACL,MAAM;QACN,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7C,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC;KACpC,CAAC;AACJ,CAAC"}
|
package/formatRequestAction.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Remapper, RequestLikeActionDefinition } from '@appsemble/types';
|
|
2
|
-
import { AxiosRequestConfig } from 'axios';
|
|
3
|
-
|
|
4
|
-
export function formatRequestAction(
|
|
5
|
-
{ method = 'GET', query, ...action }: RequestLikeActionDefinition,
|
|
6
|
-
data: unknown,
|
|
7
|
-
remap: (remapper: Remapper, data: any, context: Record<string, unknown>) => any,
|
|
8
|
-
context: Record<string, unknown>,
|
|
9
|
-
): AxiosRequestConfig {
|
|
10
|
-
return {
|
|
11
|
-
method,
|
|
12
|
-
url: String(remap(action.url, data, context)),
|
|
13
|
-
headers: {},
|
|
14
|
-
params: remap(query, data, context),
|
|
15
|
-
};
|
|
16
|
-
}
|
package/has.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"has.js","sourceRoot":"","sources":["has.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,GAAW;IAC7C,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACnE,CAAC"}
|
package/has.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"has.test.js","sourceRoot":"","sources":["has.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/has.test.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { has } from './has.js';
|
|
2
|
-
|
|
3
|
-
describe('has', () => {
|
|
4
|
-
it('should return false for null targets', () => {
|
|
5
|
-
expect(has(null, 'toString')).toBe(false);
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it('should return false for undefined targets', () => {
|
|
9
|
-
expect(has(undefined, 'toString')).toBe(false);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('should return false for attributes inferred from the prototype chain', () => {
|
|
13
|
-
expect(has({}, 'toString')).toBe(false);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('should return true for own properties', () => {
|
|
17
|
-
expect(has({ toString: null }, 'toString')).toBe(true);
|
|
18
|
-
});
|
|
19
|
-
});
|
package/has.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if the target has an own property named after the key.
|
|
3
|
-
*
|
|
4
|
-
* @param target The target that should have the key. Null values are also accepted.
|
|
5
|
-
* @param key The key to check for on the target.
|
|
6
|
-
* @returns Whether or not the key exists on the target.
|
|
7
|
-
*/
|
|
8
|
-
export function has(target: object, key: string): boolean {
|
|
9
|
-
return target != null && Object.hasOwnProperty.call(target, key);
|
|
10
|
-
}
|
package/i18n.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRo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;YACnB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CACH,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/i18n.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.test.js","sourceRoot":"","sources":["i18n.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEtD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,MAAM,KAAK,GAA2B;QACpC;YACE,wCAAwC;YACxC,CAAC,IAAI,CAAC;YACN,CAAC,IAAI,CAAC;SACP;QACD;YACE,8FAA8F;YAC9F,CAAC,OAAO,EAAE,IAAI,CAAC;YACf,CAAC,OAAO,EAAE,IAAI,CAAC;SAChB;QACD;YACE,8DAA8D;YAC9D,CAAC,IAAI,EAAE,OAAO,CAAC;YACf,CAAC,OAAO,EAAE,IAAI,CAAC;SAChB;QACD;YACE,yFAAyF;YACzF,qBAAqB;YACrB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;YACxB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC;SACzB;QACD;YACE,iCAAiC;YACjC,CAAC,IAAI,EAAE,IAAI,CAAC;YACZ,CAAC,IAAI,EAAE,IAAI,CAAC;SACb;QACD;YACE,+CAA+C;YAC/C,CAAC,IAAI,EAAE,OAAO,CAAC;YACf,CAAC,IAAI,EAAE,OAAO,CAAC;SAChB;QACD;YACE,+EAA+E;YAC/E,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;YAChD,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;SACjD;QACD;YACE,qEAAqE;YACrE,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC;YAC/B,CAAC,Y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;QAC1D,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAEhD,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/i18n.test.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { detectLocale, sortLocales } from './i18n.js';
|
|
2
|
-
|
|
3
|
-
describe('sortLocales', () => {
|
|
4
|
-
const tests: [string[], string[]][] = [
|
|
5
|
-
[
|
|
6
|
-
// The user prefers any form of English.
|
|
7
|
-
['en'],
|
|
8
|
-
['en'],
|
|
9
|
-
],
|
|
10
|
-
[
|
|
11
|
-
// The user prefers international English, but is willing to accept any other form of English.
|
|
12
|
-
['en-US', 'en'],
|
|
13
|
-
['en-us', 'en'],
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
// The user accepts English, preferably international English.
|
|
17
|
-
['en', 'en-US'],
|
|
18
|
-
['en-us', 'en'],
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
// The user accepts any for of English, preferably international English, or British over
|
|
22
|
-
// alternative forms.
|
|
23
|
-
['en', 'en-US', 'en-GB'],
|
|
24
|
-
['en-us', 'en-gb', 'en'],
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
// The accepts English, or Dutch.
|
|
28
|
-
['en', 'nl'],
|
|
29
|
-
['en', 'nl'],
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
// The accepts English, or Dutch (Netherlands).
|
|
33
|
-
['en', 'nl-NL'],
|
|
34
|
-
['en', 'nl-nl'],
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
// XXX because Britsh is a subtag of English, it should be preferred over Dutch
|
|
38
|
-
['en', 'en-US', 'nl', 'nl-NL', 'nl-BE', 'en-GB'],
|
|
39
|
-
['en-us', 'en', 'nl-nl', 'nl-be', 'nl', 'en-gb'],
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
// More specific languages of the same subtag should be sorted first.
|
|
43
|
-
['zh', 'zh-Hant', 'zh-Hant-HK'],
|
|
44
|
-
['zh-hant-hk', 'zh-hant', 'zh'],
|
|
45
|
-
],
|
|
46
|
-
[
|
|
47
|
-
// XXX because international English is a subtag of English, it should be preferred over
|
|
48
|
-
// Chinese.
|
|
49
|
-
['en', 'zh', 'zh-Hant', 'zh-Hant-HK', 'en-US'],
|
|
50
|
-
['en', 'zh-hant-hk', 'zh-hant', 'zh', 'en-us'],
|
|
51
|
-
],
|
|
52
|
-
[
|
|
53
|
-
// Locales that share the same starting characters should be treated differently.
|
|
54
|
-
['cu', 'custom', 'custom-locale', 'cu'],
|
|
55
|
-
['cu', 'custom-locale', 'custom', 'cu'],
|
|
56
|
-
],
|
|
57
|
-
];
|
|
58
|
-
|
|
59
|
-
it.each(tests)('should sort %p as %p', (languages, expected) => {
|
|
60
|
-
const result = sortLocales(languages);
|
|
61
|
-
|
|
62
|
-
expect(result).toStrictEqual(expected);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
describe('detectLocale', () => {
|
|
67
|
-
const tests: [string[], string[], string][] = [
|
|
68
|
-
[['en'], ['en'], 'en'],
|
|
69
|
-
[['en', 'en-US'], ['en', 'en-US'], 'en-us'],
|
|
70
|
-
[['nl'], ['en', 'en-US'], undefined],
|
|
71
|
-
|
|
72
|
-
// XXX The following need to be handled by the sorting algorithm in `sortLocales()`,
|
|
73
|
-
[['en', 'nl', 'en-US'], ['en', 'nl', 'en-US'], 'en'],
|
|
74
|
-
];
|
|
75
|
-
|
|
76
|
-
it.each(tests)('%p %p %p', (languages, choices, expected) => {
|
|
77
|
-
const result = detectLocale(languages, choices);
|
|
78
|
-
|
|
79
|
-
expect(result).toBe(expected);
|
|
80
|
-
});
|
|
81
|
-
});
|
package/i18n.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sort locales by specificity
|
|
3
|
-
*
|
|
4
|
-
* The languages are sorted in a way that more specific languages are preferred over less specific
|
|
5
|
-
* ones, but languages are never sorted before completely different languages.
|
|
6
|
-
*
|
|
7
|
-
* All languages are converted to lower case for convenience.
|
|
8
|
-
*
|
|
9
|
-
* For examples, see the test cases.
|
|
10
|
-
*
|
|
11
|
-
* @param languages The languages to sort. For example `navigator.languages`.
|
|
12
|
-
* @returns A sorted list of lower case languages in order of preference.
|
|
13
|
-
*/
|
|
14
|
-
export function sortLocales(languages: readonly string[]): string[] {
|
|
15
|
-
const copy = languages.map((language) => language.toLowerCase());
|
|
16
|
-
// Compare every language to the previous in the array. The first item is skipped, since there is
|
|
17
|
-
// nothing to compare against.
|
|
18
|
-
for (let i = 1; i < copy.length; i += 1) {
|
|
19
|
-
// If the prevous language code is less specific than the current, swap them. Keep going back
|
|
20
|
-
// until another language is found or the start of the array is found.
|
|
21
|
-
for (let j = i; j > 0; j -= 1) {
|
|
22
|
-
const current = copy[j];
|
|
23
|
-
const previous = copy[j - 1];
|
|
24
|
-
if (current.startsWith(`${previous}-`)) {
|
|
25
|
-
[copy[j - 1], copy[j]] = [current, previous];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return copy;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @param languages A list of languages supported by the application.
|
|
34
|
-
* @param choices A list of languages preferred by the user in order of preference.
|
|
35
|
-
* @returns The best match
|
|
36
|
-
*/
|
|
37
|
-
export function detectLocale(
|
|
38
|
-
languages: readonly string[],
|
|
39
|
-
choices: readonly string[],
|
|
40
|
-
): string | undefined {
|
|
41
|
-
const supportedLocales = sortLocales(languages);
|
|
42
|
-
const wantedLocales = sortLocales(choices);
|
|
43
|
-
|
|
44
|
-
let result: string;
|
|
45
|
-
wantedLocales.some((wanted) =>
|
|
46
|
-
supportedLocales.some((supported) => {
|
|
47
|
-
if (wanted.startsWith(supported)) {
|
|
48
|
-
result = supported;
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
return false;
|
|
52
|
-
}),
|
|
53
|
-
);
|
|
54
|
-
return result;
|
|
55
|
-
}
|
package/ics.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ics.js","sourceRoot":"","sources":["ics.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAE3C,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,YAAY,GAAG,EAAE,GAAG,YAAY,CAAC;AACvC,MAAM,UAAU,GAAG,EAAE,GAAG,YAAY,CAAC;AACrC,MAAM,SAAS,GAAG,EAAE,GAAG,UAAU,CAAC;AAClC,MAAM,UAAU,GAAG,CAAC,GAAG,SAAS,CAAC;AAEjC,MAAM,UAAU,WAAW,CAAC,QAAyB;IACnD,IAAI,YAAY,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC;IACpD,YAAY,IAAI,UAAU,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAClD,YAAY,IAAI,SAAS,CAAC;IAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC;IACpD,YAAY,IAAI,UAAU,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC;IACxD,YAAY,IAAI,YAAY,CAAC;IAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC;IACxD,OAAO;QACL,KAAK;QACL,IAAI;QACJ,KAAK;QACL,OAAO;QACP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