@microsoft/terraform-cdk-constructs 0.0.3-pre.10
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/.devcontainer/devcontainer.json +62 -0
- package/.jsii +18296 -0
- package/API.md +19698 -0
- package/CODE_OF_CONDUCT.md +9 -0
- package/CONTRIBUTING.md +85 -0
- package/LICENSE +19 -0
- package/README.md +152 -0
- package/SECURITY.md +41 -0
- package/SUPPORT.md +25 -0
- package/cdktf.json +11 -0
- package/cdktf.out/manifest.json +13 -0
- package/cdktf.out/stacks/testAzureActionGroup/cdk.tf.json +111 -0
- package/cdktf.out/stacks/testAzureApplicationGateway/cdk.tf.json +588 -0
- package/cdktf.out/stacks/testAzureApplicationInsights/cdk.tf.json +245 -0
- package/cdktf.out/stacks/testAzureContainerRegistry/cdk.tf.json +179 -0
- package/cdktf.out/stacks/testAzureEventhub/cdk.tf.json +236 -0
- package/cdktf.out/stacks/testAzureKeyVault/cdk.tf.json +436 -0
- package/cdktf.out/stacks/testAzureKubernetesCluster/cdk.tf.json +152 -0
- package/cdktf.out/stacks/testAzureKusto/cdk.tf.json +209 -0
- package/cdktf.out/stacks/testAzureLinuxFunctionApp/cdk.tf.json +439 -0
- package/cdktf.out/stacks/testAzureLinuxVirtualMachineExample/cdk.tf.json +283 -0
- package/cdktf.out/stacks/testAzureLinuxVirtualMachineScaleSetExample/cdk.tf.json +261 -0
- package/cdktf.out/stacks/testAzureLogAnalytics/cdk.tf.json +309 -0
- package/cdktf.out/stacks/testAzureMetricAlert/cdk.tf.json +161 -0
- package/cdktf.out/stacks/testAzureNetworkSecurityGroup/cdk.tf.json +271 -0
- package/cdktf.out/stacks/testAzureQueryRuleAlert/cdk.tf.json +122 -0
- package/cdktf.out/stacks/testAzureResourceGroup/cdk.tf.json +88 -0
- package/cdktf.out/stacks/testAzureStorageAccount/cdk.tf.json +339 -0
- package/cdktf.out/stacks/testAzureVirtualNetwork/cdk.tf.json +264 -0
- package/cdktf.out/stacks/testAzureWindowVirtualMachineScaleSetExample/cdk.tf.json +261 -0
- package/cdktf.out/stacks/testAzureWindowsVirtualMachineExample/cdk.tf.json +280 -0
- package/cdktf.out/stacks/testExampleAzureResource/cdk.tf.json +167 -0
- package/docs/design_guide.md +309 -0
- package/docs/images/ide-documentation.png +0 -0
- package/docs/testing.md +347 -0
- package/go.mod +73 -0
- package/go.sum +1006 -0
- package/help +51 -0
- package/jest.config.js.old +187 -0
- package/lib/azure-actiongroup/index.d.ts +1 -0
- package/lib/azure-actiongroup/index.js +18 -0
- package/lib/azure-actiongroup/lib/actiongroup.d.ts +49 -0
- package/lib/azure-actiongroup/lib/actiongroup.js +85 -0
- package/lib/azure-actiongroup/lib/index.d.ts +1 -0
- package/lib/azure-actiongroup/lib/index.js +18 -0
- package/lib/azure-actiongroup/model/action-group-props.d.ts +47 -0
- package/lib/azure-actiongroup/model/action-group-props.js +3 -0
- package/lib/azure-actiongroup/model/arm-role-receiver-props.d.ts +20 -0
- package/lib/azure-actiongroup/model/arm-role-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/azure-app-push-receiver-props.d.ts +14 -0
- package/lib/azure-actiongroup/model/azure-app-push-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/email-receiver-props.d.ts +19 -0
- package/lib/azure-actiongroup/model/email-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/eventhub-receiver-props.d.ts +23 -0
- package/lib/azure-actiongroup/model/eventhub-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/function.d.ts +40 -0
- package/lib/azure-actiongroup/model/function.js +118 -0
- package/lib/azure-actiongroup/model/index.d.ts +10 -0
- package/lib/azure-actiongroup/model/index.js +27 -0
- package/lib/azure-actiongroup/model/logic-app-receiver-props.d.ts +23 -0
- package/lib/azure-actiongroup/model/logic-app-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/sms-receiver-props.d.ts +18 -0
- package/lib/azure-actiongroup/model/sms-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/voice-receiver-props.d.ts +18 -0
- package/lib/azure-actiongroup/model/voice-receiver-props.js +3 -0
- package/lib/azure-actiongroup/model/webhook-receiver-props.d.ts +18 -0
- package/lib/azure-actiongroup/model/webhook-receiver-props.js +3 -0
- package/lib/azure-actiongroup/test/AzureActionGroup.spec.d.ts +1 -0
- package/lib/azure-actiongroup/test/AzureActionGroup.spec.js +294 -0
- package/lib/azure-actiongroup/test/ExampleAzureActionGroup.d.ts +5 -0
- package/lib/azure-actiongroup/test/ExampleAzureActionGroup.js +66 -0
- package/lib/azure-applicationgateway/index.d.ts +1 -0
- package/lib/azure-applicationgateway/index.js +18 -0
- package/lib/azure-applicationgateway/lib/gateway.d.ts +248 -0
- package/lib/azure-applicationgateway/lib/gateway.js +199 -0
- package/lib/azure-applicationgateway/lib/index.d.ts +1 -0
- package/lib/azure-applicationgateway/lib/index.js +18 -0
- package/lib/azure-applicationgateway/test/AzureApplicationGateway.spec.d.ts +1 -0
- package/lib/azure-applicationgateway/test/AzureApplicationGateway.spec.js +106 -0
- package/lib/azure-applicationgateway/test/ExampleAzureApplicationGateway.d.ts +5 -0
- package/lib/azure-applicationgateway/test/ExampleAzureApplicationGateway.js +267 -0
- package/lib/azure-applicationinsights/index.d.ts +1 -0
- package/lib/azure-applicationinsights/index.js +18 -0
- package/lib/azure-applicationinsights/lib/appinsights.d.ts +110 -0
- package/lib/azure-applicationinsights/lib/appinsights.js +134 -0
- package/lib/azure-applicationinsights/lib/index.d.ts +1 -0
- package/lib/azure-applicationinsights/lib/index.js +18 -0
- package/lib/azure-applicationinsights/test/AzureAppInsights.spec.d.ts +1 -0
- package/lib/azure-applicationinsights/test/AzureAppInsights.spec.js +55 -0
- package/lib/azure-applicationinsights/test/ExampleAzureApplicationInsights.d.ts +5 -0
- package/lib/azure-applicationinsights/test/ExampleAzureApplicationInsights.js +87 -0
- package/lib/azure-containerregistry/index.d.ts +1 -0
- package/lib/azure-containerregistry/index.js +18 -0
- package/lib/azure-containerregistry/lib/index.d.ts +1 -0
- package/lib/azure-containerregistry/lib/index.js +18 -0
- package/lib/azure-containerregistry/lib/registry.d.ts +70 -0
- package/lib/azure-containerregistry/lib/registry.js +76 -0
- package/lib/azure-containerregistry/test/AzureContainerRegistry.spec.d.ts +1 -0
- package/lib/azure-containerregistry/test/AzureContainerRegistry.spec.js +50 -0
- package/lib/azure-containerregistry/test/ExampleAzureContainerRegistry.d.ts +5 -0
- package/lib/azure-containerregistry/test/ExampleAzureContainerRegistry.js +57 -0
- package/lib/azure-datalake/index.d.ts +1 -0
- package/lib/azure-datalake/index.js +18 -0
- package/lib/azure-datalake/lib/datalake.d.ts +64 -0
- package/lib/azure-datalake/lib/datalake.js +92 -0
- package/lib/azure-datalake/lib/filesystem.d.ts +70 -0
- package/lib/azure-datalake/lib/filesystem.js +83 -0
- package/lib/azure-datalake/lib/index.d.ts +3 -0
- package/lib/azure-datalake/lib/index.js +20 -0
- package/lib/azure-datalake/lib/path.d.ts +49 -0
- package/lib/azure-datalake/lib/path.js +51 -0
- package/lib/azure-eventhub/index.d.ts +1 -0
- package/lib/azure-eventhub/index.js +18 -0
- package/lib/azure-eventhub/lib/authorization.d.ts +58 -0
- package/lib/azure-eventhub/lib/authorization.js +84 -0
- package/lib/azure-eventhub/lib/cluster.d.ts +56 -0
- package/lib/azure-eventhub/lib/cluster.js +64 -0
- package/lib/azure-eventhub/lib/consumer.d.ts +54 -0
- package/lib/azure-eventhub/lib/consumer.js +59 -0
- package/lib/azure-eventhub/lib/index.d.ts +6 -0
- package/lib/azure-eventhub/lib/index.js +23 -0
- package/lib/azure-eventhub/lib/instance.d.ts +164 -0
- package/lib/azure-eventhub/lib/instance.js +184 -0
- package/lib/azure-eventhub/lib/kusto-connection.d.ts +109 -0
- package/lib/azure-eventhub/lib/kusto-connection.js +76 -0
- package/lib/azure-eventhub/lib/namespace.d.ts +151 -0
- package/lib/azure-eventhub/lib/namespace.js +131 -0
- package/lib/azure-eventhub/test/AzureEventhub.spec.d.ts +1 -0
- package/lib/azure-eventhub/test/AzureEventhub.spec.js +56 -0
- package/lib/azure-eventhub/test/ExampleAzureEventhub.d.ts +5 -0
- package/lib/azure-eventhub/test/ExampleAzureEventhub.js +72 -0
- package/lib/azure-functionapp/index.d.ts +1 -0
- package/lib/azure-functionapp/index.js +18 -0
- package/lib/azure-functionapp/lib/functionapplinux.d.ts +211 -0
- package/lib/azure-functionapp/lib/functionapplinux.js +141 -0
- package/lib/azure-functionapp/lib/index.d.ts +1 -0
- package/lib/azure-functionapp/lib/index.js +18 -0
- package/lib/azure-functionapp/serviceplanskus.d.ts +70 -0
- package/lib/azure-functionapp/serviceplanskus.js +81 -0
- package/lib/azure-functionapp/test/AzureLinuxFunctionApp.spec.d.ts +1 -0
- package/lib/azure-functionapp/test/AzureLinuxFunctionApp.spec.js +48 -0
- package/lib/azure-functionapp/test/ExampleAzureLinuxFunctionApp.d.ts +5 -0
- package/lib/azure-functionapp/test/ExampleAzureLinuxFunctionApp.js +123 -0
- package/lib/azure-keyvault/index.d.ts +1 -0
- package/lib/azure-keyvault/index.js +18 -0
- package/lib/azure-keyvault/lib/certificate.d.ts +133 -0
- package/lib/azure-keyvault/lib/certificate.js +146 -0
- package/lib/azure-keyvault/lib/index.d.ts +5 -0
- package/lib/azure-keyvault/lib/index.js +22 -0
- package/lib/azure-keyvault/lib/key.d.ts +72 -0
- package/lib/azure-keyvault/lib/key.js +69 -0
- package/lib/azure-keyvault/lib/policy.d.ts +76 -0
- package/lib/azure-keyvault/lib/policy.js +56 -0
- package/lib/azure-keyvault/lib/secret.d.ts +70 -0
- package/lib/azure-keyvault/lib/secret.js +64 -0
- package/lib/azure-keyvault/lib/vault.d.ts +282 -0
- package/lib/azure-keyvault/lib/vault.js +392 -0
- package/lib/azure-keyvault/test/AzureKeyVault.spec.d.ts +1 -0
- package/lib/azure-keyvault/test/AzureKeyVault.spec.js +63 -0
- package/lib/azure-keyvault/test/ExampleAzureKeyVault.d.ts +5 -0
- package/lib/azure-keyvault/test/ExampleAzureKeyVault.js +112 -0
- package/lib/azure-kubernetes/index.d.ts +1 -0
- package/lib/azure-kubernetes/index.js +18 -0
- package/lib/azure-kubernetes/lib/cluster.d.ts +93 -0
- package/lib/azure-kubernetes/lib/cluster.js +63 -0
- package/lib/azure-kubernetes/lib/index.d.ts +1 -0
- package/lib/azure-kubernetes/lib/index.js +18 -0
- package/lib/azure-kubernetes/test/AzureKubernetesCluster.spec.d.ts +1 -0
- package/lib/azure-kubernetes/test/AzureKubernetesCluster.spec.js +56 -0
- package/lib/azure-kubernetes/test/ExampleAzureKubernetesCluster.d.ts +5 -0
- package/lib/azure-kubernetes/test/ExampleAzureKubernetesCluster.js +65 -0
- package/lib/azure-kusto/index.d.ts +1 -0
- package/lib/azure-kusto/index.js +18 -0
- package/lib/azure-kusto/lib/cluster.d.ts +136 -0
- package/lib/azure-kusto/lib/cluster.js +138 -0
- package/lib/azure-kusto/lib/compute-specification.d.ts +71 -0
- package/lib/azure-kusto/lib/compute-specification.js +651 -0
- package/lib/azure-kusto/lib/database.d.ts +162 -0
- package/lib/azure-kusto/lib/database.js +180 -0
- package/lib/azure-kusto/lib/index.d.ts +3 -0
- package/lib/azure-kusto/lib/index.js +20 -0
- package/lib/azure-kusto/test/AzureKusto.spec.d.ts +1 -0
- package/lib/azure-kusto/test/AzureKusto.spec.js +50 -0
- package/lib/azure-kusto/test/ExampleAzureKusto.d.ts +5 -0
- package/lib/azure-kusto/test/ExampleAzureKusto.js +71 -0
- package/lib/azure-loganalytics/index.d.ts +1 -0
- package/lib/azure-loganalytics/index.js +18 -0
- package/lib/azure-loganalytics/lib/index.d.ts +1 -0
- package/lib/azure-loganalytics/lib/index.js +18 -0
- package/lib/azure-loganalytics/lib/workspace.d.ts +163 -0
- package/lib/azure-loganalytics/lib/workspace.js +126 -0
- package/lib/azure-loganalytics/test/AzureLogAnalytics.spec.d.ts +1 -0
- package/lib/azure-loganalytics/test/AzureLogAnalytics.spec.js +50 -0
- package/lib/azure-loganalytics/test/ExampleAzureLogAnalytics.d.ts +5 -0
- package/lib/azure-loganalytics/test/ExampleAzureLogAnalytics.js +115 -0
- package/lib/azure-metricalert/index.d.ts +2 -0
- package/lib/azure-metricalert/index.js +19 -0
- package/lib/azure-metricalert/lib/index.d.ts +1 -0
- package/lib/azure-metricalert/lib/index.js +18 -0
- package/lib/azure-metricalert/lib/metric-alert.d.ts +56 -0
- package/lib/azure-metricalert/lib/metric-alert.js +128 -0
- package/lib/azure-metricalert/model/action-props.d.ts +11 -0
- package/lib/azure-metricalert/model/action-props.js +3 -0
- package/lib/azure-metricalert/model/criteria-base-props.d.ts +38 -0
- package/lib/azure-metricalert/model/criteria-base-props.js +3 -0
- package/lib/azure-metricalert/model/criteria-dimension-props.d.ts +21 -0
- package/lib/azure-metricalert/model/criteria-dimension-props.js +3 -0
- package/lib/azure-metricalert/model/criteria-props.d.ts +12 -0
- package/lib/azure-metricalert/model/criteria-props.js +3 -0
- package/lib/azure-metricalert/model/dynamic-criteria-props.d.ts +29 -0
- package/lib/azure-metricalert/model/dynamic-criteria-props.js +3 -0
- package/lib/azure-metricalert/model/function.d.ts +28 -0
- package/lib/azure-metricalert/model/function.js +78 -0
- package/lib/azure-metricalert/model/index.d.ts +7 -0
- package/lib/azure-metricalert/model/index.js +24 -0
- package/lib/azure-metricalert/model/metric-alert-props.d.ts +86 -0
- package/lib/azure-metricalert/model/metric-alert-props.js +3 -0
- package/lib/azure-metricalert/test/AzureMetricAlert.spec.d.ts +1 -0
- package/lib/azure-metricalert/test/AzureMetricAlert.spec.js +63 -0
- package/lib/azure-metricalert/test/ExampleAzureMetricAlert.d.ts +5 -0
- package/lib/azure-metricalert/test/ExampleAzureMetricAlert.js +81 -0
- package/lib/azure-networksecuritygroup/index.d.ts +1 -0
- package/lib/azure-networksecuritygroup/index.js +18 -0
- package/lib/azure-networksecuritygroup/lib/index.d.ts +2 -0
- package/lib/azure-networksecuritygroup/lib/index.js +19 -0
- package/lib/azure-networksecuritygroup/lib/preconfigured-rules.d.ts +77 -0
- package/lib/azure-networksecuritygroup/lib/preconfigured-rules.js +608 -0
- package/lib/azure-networksecuritygroup/lib/securitygroup.d.ts +190 -0
- package/lib/azure-networksecuritygroup/lib/securitygroup.js +172 -0
- package/lib/azure-networksecuritygroup/test/AzureNetworkSecurityGroup.spec.d.ts +1 -0
- package/lib/azure-networksecuritygroup/test/AzureNetworkSecurityGroup.spec.js +54 -0
- package/lib/azure-networksecuritygroup/test/ExampleAzureNetworkSecurityGroup.d.ts +5 -0
- package/lib/azure-networksecuritygroup/test/ExampleAzureNetworkSecurityGroup.js +97 -0
- package/lib/azure-queryrulealert/index.d.ts +1 -0
- package/lib/azure-queryrulealert/index.js +18 -0
- package/lib/azure-queryrulealert/lib/index.d.ts +1 -0
- package/lib/azure-queryrulealert/lib/index.js +18 -0
- package/lib/azure-queryrulealert/lib/query-rule-alert.d.ts +175 -0
- package/lib/azure-queryrulealert/lib/query-rule-alert.js +205 -0
- package/lib/azure-queryrulealert/test/AzureQueryRuleAlert.spec.d.ts +1 -0
- package/lib/azure-queryrulealert/test/AzureQueryRuleAlert.spec.js +67 -0
- package/lib/azure-queryrulealert/test/ExampleAzureQueryRuleAlert.d.ts +5 -0
- package/lib/azure-queryrulealert/test/ExampleAzureQueryRuleAlert.js +67 -0
- package/lib/azure-resourcegroup/index.d.ts +1 -0
- package/lib/azure-resourcegroup/index.js +18 -0
- package/lib/azure-resourcegroup/lib/index.d.ts +1 -0
- package/lib/azure-resourcegroup/lib/index.js +18 -0
- package/lib/azure-resourcegroup/lib/resource-group.d.ts +66 -0
- package/lib/azure-resourcegroup/lib/resource-group.js +77 -0
- package/lib/azure-resourcegroup/test/AzureResourceGroup.spec.d.ts +1 -0
- package/lib/azure-resourcegroup/test/AzureResourceGroup.spec.js +41 -0
- package/lib/azure-resourcegroup/test/ExampleAzureResourceGroup.d.ts +5 -0
- package/lib/azure-resourcegroup/test/ExampleAzureResourceGroup.js +29 -0
- package/lib/azure-storageaccount/index.d.ts +1 -0
- package/lib/azure-storageaccount/index.js +18 -0
- package/lib/azure-storageaccount/lib/account.d.ts +232 -0
- package/lib/azure-storageaccount/lib/account.js +225 -0
- package/lib/azure-storageaccount/lib/container.d.ts +122 -0
- package/lib/azure-storageaccount/lib/container.js +167 -0
- package/lib/azure-storageaccount/lib/fileshare.d.ts +105 -0
- package/lib/azure-storageaccount/lib/fileshare.js +126 -0
- package/lib/azure-storageaccount/lib/index.d.ts +5 -0
- package/lib/azure-storageaccount/lib/index.js +22 -0
- package/lib/azure-storageaccount/lib/queue.d.ts +35 -0
- package/lib/azure-storageaccount/lib/queue.js +52 -0
- package/lib/azure-storageaccount/lib/table.d.ts +38 -0
- package/lib/azure-storageaccount/lib/table.js +55 -0
- package/lib/azure-storageaccount/test/AzureStorageAccount.spec.d.ts +1 -0
- package/lib/azure-storageaccount/test/AzureStorageAccount.spec.js +45 -0
- package/lib/azure-storageaccount/test/ExampleAzureStorageAccount.d.ts +5 -0
- package/lib/azure-storageaccount/test/ExampleAzureStorageAccount.js +102 -0
- package/lib/azure-virtualmachine/index.d.ts +1 -0
- package/lib/azure-virtualmachine/index.js +18 -0
- package/lib/azure-virtualmachine/lib/image-references.d.ts +22 -0
- package/lib/azure-virtualmachine/lib/image-references.js +128 -0
- package/lib/azure-virtualmachine/lib/index.d.ts +2 -0
- package/lib/azure-virtualmachine/lib/index.js +19 -0
- package/lib/azure-virtualmachine/lib/vm.d.ts +281 -0
- package/lib/azure-virtualmachine/lib/vm.js +283 -0
- package/lib/azure-virtualmachine/test/AzureLinuxVirtualMachine.spec.d.ts +1 -0
- package/lib/azure-virtualmachine/test/AzureLinuxVirtualMachine.spec.js +48 -0
- package/lib/azure-virtualmachine/test/AzureWindowsVirtualMachine.spec.d.ts +1 -0
- package/lib/azure-virtualmachine/test/AzureWindowsVirtualMachine.spec.js +50 -0
- package/lib/azure-virtualmachine/test/ExampleAzureLinuxVirtualMachine.d.ts +5 -0
- package/lib/azure-virtualmachine/test/ExampleAzureLinuxVirtualMachine.js +106 -0
- package/lib/azure-virtualmachine/test/ExampleAzureWindowsVirtualMachine.d.ts +5 -0
- package/lib/azure-virtualmachine/test/ExampleAzureWindowsVirtualMachine.js +102 -0
- package/lib/azure-virtualmachinescaleset/index.d.ts +1 -0
- package/lib/azure-virtualmachinescaleset/index.js +18 -0
- package/lib/azure-virtualmachinescaleset/lib/cluster.d.ts +324 -0
- package/lib/azure-virtualmachinescaleset/lib/cluster.js +264 -0
- package/lib/azure-virtualmachinescaleset/lib/index.d.ts +1 -0
- package/lib/azure-virtualmachinescaleset/lib/index.js +18 -0
- package/lib/azure-virtualmachinescaleset/test/AzureLinuxVirtualMachineScaleSet.spec.d.ts +1 -0
- package/lib/azure-virtualmachinescaleset/test/AzureLinuxVirtualMachineScaleSet.spec.js +48 -0
- package/lib/azure-virtualmachinescaleset/test/AzureWindowsVirtualMachineScaleSet.spec.d.ts +1 -0
- package/lib/azure-virtualmachinescaleset/test/AzureWindowsVirtualMachineScaleSet.spec.js +50 -0
- package/lib/azure-virtualmachinescaleset/test/ExampleAzureLinuxVirtualMachineScaleSet.d.ts +5 -0
- package/lib/azure-virtualmachinescaleset/test/ExampleAzureLinuxVirtualMachineScaleSet.js +107 -0
- package/lib/azure-virtualmachinescaleset/test/ExampleAzureWindowsVirtualMachineScaleSet.d.ts +5 -0
- package/lib/azure-virtualmachinescaleset/test/ExampleAzureWindowsVirtualMachineScaleSet.js +103 -0
- package/lib/azure-virtualnetwork/index.d.ts +1 -0
- package/lib/azure-virtualnetwork/index.js +18 -0
- package/lib/azure-virtualnetwork/lib/index.d.ts +2 -0
- package/lib/azure-virtualnetwork/lib/index.js +19 -0
- package/lib/azure-virtualnetwork/lib/network.d.ts +122 -0
- package/lib/azure-virtualnetwork/lib/network.js +120 -0
- package/lib/azure-virtualnetwork/lib/peering.d.ts +90 -0
- package/lib/azure-virtualnetwork/lib/peering.js +71 -0
- package/lib/azure-virtualnetwork/test/AzureVirtualNetwork.spec.d.ts +1 -0
- package/lib/azure-virtualnetwork/test/AzureVirtualNetwork.spec.js +48 -0
- package/lib/azure-virtualnetwork/test/ExampleAzureVirtualNetwork.d.ts +5 -0
- package/lib/azure-virtualnetwork/test/ExampleAzureVirtualNetwork.js +88 -0
- package/lib/core-azure/index.d.ts +1 -0
- package/lib/core-azure/index.js +18 -0
- package/lib/core-azure/lib/diagsettings.d.ts +89 -0
- package/lib/core-azure/lib/diagsettings.js +83 -0
- package/lib/core-azure/lib/index.d.ts +3 -0
- package/lib/core-azure/lib/index.js +20 -0
- package/lib/core-azure/lib/rbac.d.ts +50 -0
- package/lib/core-azure/lib/rbac.js +48 -0
- package/lib/core-azure/lib/resource.d.ts +62 -0
- package/lib/core-azure/lib/resource.js +118 -0
- package/lib/core-azure/test/AzureResource.spec.d.ts +1 -0
- package/lib/core-azure/test/AzureResource.spec.js +19 -0
- package/lib/core-azure/test/ExampleAzureResource.d.ts +5 -0
- package/lib/core-azure/test/ExampleAzureResource.js +67 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +22 -0
- package/lib/testing/index.d.ts +6 -0
- package/lib/testing/index.js +18 -0
- package/lib/util/azureTenantIdHelpers.d.ts +2 -0
- package/lib/util/azureTenantIdHelpers.js +34 -0
- package/lib/util/randomName.d.ts +1 -0
- package/lib/util/randomName.js +13 -0
- package/node_modules/moment/CHANGELOG.md +996 -0
- package/node_modules/moment/LICENSE +22 -0
- package/node_modules/moment/README.md +55 -0
- package/node_modules/moment/dist/locale/af.js +71 -0
- package/node_modules/moment/dist/locale/ar-dz.js +156 -0
- package/node_modules/moment/dist/locale/ar-kw.js +55 -0
- package/node_modules/moment/dist/locale/ar-ly.js +171 -0
- package/node_modules/moment/dist/locale/ar-ma.js +56 -0
- package/node_modules/moment/dist/locale/ar-ps.js +112 -0
- package/node_modules/moment/dist/locale/ar-sa.js +105 -0
- package/node_modules/moment/dist/locale/ar-tn.js +55 -0
- package/node_modules/moment/dist/locale/ar.js +189 -0
- package/node_modules/moment/dist/locale/az.js +102 -0
- package/node_modules/moment/dist/locale/be.js +142 -0
- package/node_modules/moment/dist/locale/bg.js +87 -0
- package/node_modules/moment/dist/locale/bm.js +52 -0
- package/node_modules/moment/dist/locale/bn-bd.js +129 -0
- package/node_modules/moment/dist/locale/bn.js +119 -0
- package/node_modules/moment/dist/locale/bo.js +124 -0
- package/node_modules/moment/dist/locale/br.js +168 -0
- package/node_modules/moment/dist/locale/bs.js +160 -0
- package/node_modules/moment/dist/locale/ca.js +100 -0
- package/node_modules/moment/dist/locale/cs.js +181 -0
- package/node_modules/moment/dist/locale/cv.js +63 -0
- package/node_modules/moment/dist/locale/cy.js +98 -0
- package/node_modules/moment/dist/locale/da.js +53 -0
- package/node_modules/moment/dist/locale/de-at.js +79 -0
- package/node_modules/moment/dist/locale/de-ch.js +78 -0
- package/node_modules/moment/dist/locale/de.js +78 -0
- package/node_modules/moment/dist/locale/dv.js +90 -0
- package/node_modules/moment/dist/locale/el.js +106 -0
- package/node_modules/moment/dist/locale/en-au.js +68 -0
- package/node_modules/moment/dist/locale/en-ca.js +64 -0
- package/node_modules/moment/dist/locale/en-gb.js +68 -0
- package/node_modules/moment/dist/locale/en-ie.js +68 -0
- package/node_modules/moment/dist/locale/en-il.js +64 -0
- package/node_modules/moment/dist/locale/en-in.js +68 -0
- package/node_modules/moment/dist/locale/en-nz.js +68 -0
- package/node_modules/moment/dist/locale/en-sg.js +68 -0
- package/node_modules/moment/dist/locale/eo.js +68 -0
- package/node_modules/moment/dist/locale/es-do.js +108 -0
- package/node_modules/moment/dist/locale/es-mx.js +110 -0
- package/node_modules/moment/dist/locale/es-us.js +110 -0
- package/node_modules/moment/dist/locale/es.js +110 -0
- package/node_modules/moment/dist/locale/et.js +78 -0
- package/node_modules/moment/dist/locale/eu.js +65 -0
- package/node_modules/moment/dist/locale/fa.js +113 -0
- package/node_modules/moment/dist/locale/fi.js +124 -0
- package/node_modules/moment/dist/locale/fil.js +58 -0
- package/node_modules/moment/dist/locale/fo.js +57 -0
- package/node_modules/moment/dist/locale/fr-ca.js +70 -0
- package/node_modules/moment/dist/locale/fr-ch.js +74 -0
- package/node_modules/moment/dist/locale/fr.js +108 -0
- package/node_modules/moment/dist/locale/fy.js +75 -0
- package/node_modules/moment/dist/locale/ga.js +95 -0
- package/node_modules/moment/dist/locale/gd.js +95 -0
- package/node_modules/moment/dist/locale/gl.js +75 -0
- package/node_modules/moment/dist/locale/gom-deva.js +126 -0
- package/node_modules/moment/dist/locale/gom-latn.js +124 -0
- package/node_modules/moment/dist/locale/gu.js +122 -0
- package/node_modules/moment/dist/locale/he.js +94 -0
- package/node_modules/moment/dist/locale/hi.js +168 -0
- package/node_modules/moment/dist/locale/hr.js +156 -0
- package/node_modules/moment/dist/locale/hu.js +118 -0
- package/node_modules/moment/dist/locale/hy-am.js +94 -0
- package/node_modules/moment/dist/locale/id.js +76 -0
- package/node_modules/moment/dist/locale/is.js +140 -0
- package/node_modules/moment/dist/locale/it-ch.js +64 -0
- package/node_modules/moment/dist/locale/it.js +106 -0
- package/node_modules/moment/dist/locale/ja.js +148 -0
- package/node_modules/moment/dist/locale/jv.js +76 -0
- package/node_modules/moment/dist/locale/ka.js +92 -0
- package/node_modules/moment/dist/locale/kk.js +82 -0
- package/node_modules/moment/dist/locale/km.js +103 -0
- package/node_modules/moment/dist/locale/kn.js +124 -0
- package/node_modules/moment/dist/locale/ko.js +75 -0
- package/node_modules/moment/dist/locale/ku-kmr.js +121 -0
- package/node_modules/moment/dist/locale/ku.js +118 -0
- package/node_modules/moment/dist/locale/ky.js +84 -0
- package/node_modules/moment/dist/locale/lb.js +137 -0
- package/node_modules/moment/dist/locale/lo.js +66 -0
- package/node_modules/moment/dist/locale/lt.js +125 -0
- package/node_modules/moment/dist/locale/lv.js +94 -0
- package/node_modules/moment/dist/locale/me.js +117 -0
- package/node_modules/moment/dist/locale/mi.js +60 -0
- package/node_modules/moment/dist/locale/mk.js +85 -0
- package/node_modules/moment/dist/locale/ml.js +82 -0
- package/node_modules/moment/dist/locale/mn.js +100 -0
- package/node_modules/moment/dist/locale/mr.js +203 -0
- package/node_modules/moment/dist/locale/ms-my.js +76 -0
- package/node_modules/moment/dist/locale/ms.js +75 -0
- package/node_modules/moment/dist/locale/mt.js +56 -0
- package/node_modules/moment/dist/locale/my.js +91 -0
- package/node_modules/moment/dist/locale/nb.js +60 -0
- package/node_modules/moment/dist/locale/ne.js +121 -0
- package/node_modules/moment/dist/locale/nl-be.js +102 -0
- package/node_modules/moment/dist/locale/nl.js +104 -0
- package/node_modules/moment/dist/locale/nn.js +59 -0
- package/node_modules/moment/dist/locale/oc-lnc.js +85 -0
- package/node_modules/moment/dist/locale/pa-in.js +122 -0
- package/node_modules/moment/dist/locale/pl.js +140 -0
- package/node_modules/moment/dist/locale/pt-br.js +58 -0
- package/node_modules/moment/dist/locale/pt.js +63 -0
- package/node_modules/moment/dist/locale/ro.js +76 -0
- package/node_modules/moment/dist/locale/ru.js +213 -0
- package/node_modules/moment/dist/locale/sd.js +81 -0
- package/node_modules/moment/dist/locale/se.js +57 -0
- package/node_modules/moment/dist/locale/si.js +69 -0
- package/node_modules/moment/dist/locale/sk.js +145 -0
- package/node_modules/moment/dist/locale/sl.js +171 -0
- package/node_modules/moment/dist/locale/sq.js +65 -0
- package/node_modules/moment/dist/locale/sr-cyrl.js +127 -0
- package/node_modules/moment/dist/locale/sr.js +129 -0
- package/node_modules/moment/dist/locale/ss.js +84 -0
- package/node_modules/moment/dist/locale/sv.js +68 -0
- package/node_modules/moment/dist/locale/sw.js +55 -0
- package/node_modules/moment/dist/locale/ta.js +131 -0
- package/node_modules/moment/dist/locale/te.js +88 -0
- package/node_modules/moment/dist/locale/tet.js +68 -0
- package/node_modules/moment/dist/locale/tg.js +117 -0
- package/node_modules/moment/dist/locale/th.js +65 -0
- package/node_modules/moment/dist/locale/tk.js +91 -0
- package/node_modules/moment/dist/locale/tl-ph.js +57 -0
- package/node_modules/moment/dist/locale/tlh.js +124 -0
- package/node_modules/moment/dist/locale/tr.js +106 -0
- package/node_modules/moment/dist/locale/tzl.js +89 -0
- package/node_modules/moment/dist/locale/tzm-latn.js +54 -0
- package/node_modules/moment/dist/locale/tzm.js +54 -0
- package/node_modules/moment/dist/locale/ug-cn.js +111 -0
- package/node_modules/moment/dist/locale/uk.js +167 -0
- package/node_modules/moment/dist/locale/ur.js +82 -0
- package/node_modules/moment/dist/locale/uz-latn.js +54 -0
- package/node_modules/moment/dist/locale/uz.js +51 -0
- package/node_modules/moment/dist/locale/vi.js +80 -0
- package/node_modules/moment/dist/locale/x-pseudo.js +73 -0
- package/node_modules/moment/dist/locale/yo.js +53 -0
- package/node_modules/moment/dist/locale/zh-cn.js +120 -0
- package/node_modules/moment/dist/locale/zh-hk.js +101 -0
- package/node_modules/moment/dist/locale/zh-mo.js +100 -0
- package/node_modules/moment/dist/locale/zh-tw.js +99 -0
- package/node_modules/moment/dist/moment.js +5680 -0
- package/node_modules/moment/ender.js +1 -0
- package/node_modules/moment/locale/af.js +82 -0
- package/node_modules/moment/locale/ar-dz.js +167 -0
- package/node_modules/moment/locale/ar-kw.js +66 -0
- package/node_modules/moment/locale/ar-ly.js +182 -0
- package/node_modules/moment/locale/ar-ma.js +67 -0
- package/node_modules/moment/locale/ar-ps.js +123 -0
- package/node_modules/moment/locale/ar-sa.js +116 -0
- package/node_modules/moment/locale/ar-tn.js +66 -0
- package/node_modules/moment/locale/ar.js +200 -0
- package/node_modules/moment/locale/az.js +113 -0
- package/node_modules/moment/locale/be.js +153 -0
- package/node_modules/moment/locale/bg.js +98 -0
- package/node_modules/moment/locale/bm.js +62 -0
- package/node_modules/moment/locale/bn-bd.js +140 -0
- package/node_modules/moment/locale/bn.js +130 -0
- package/node_modules/moment/locale/bo.js +135 -0
- package/node_modules/moment/locale/br.js +179 -0
- package/node_modules/moment/locale/bs.js +171 -0
- package/node_modules/moment/locale/ca.js +111 -0
- package/node_modules/moment/locale/cs.js +192 -0
- package/node_modules/moment/locale/cv.js +74 -0
- package/node_modules/moment/locale/cy.js +109 -0
- package/node_modules/moment/locale/da.js +64 -0
- package/node_modules/moment/locale/de-at.js +90 -0
- package/node_modules/moment/locale/de-ch.js +87 -0
- package/node_modules/moment/locale/de.js +89 -0
- package/node_modules/moment/locale/dv.js +101 -0
- package/node_modules/moment/locale/el.js +117 -0
- package/node_modules/moment/locale/en-au.js +79 -0
- package/node_modules/moment/locale/en-ca.js +75 -0
- package/node_modules/moment/locale/en-gb.js +79 -0
- package/node_modules/moment/locale/en-ie.js +79 -0
- package/node_modules/moment/locale/en-il.js +75 -0
- package/node_modules/moment/locale/en-in.js +79 -0
- package/node_modules/moment/locale/en-nz.js +79 -0
- package/node_modules/moment/locale/en-sg.js +79 -0
- package/node_modules/moment/locale/eo.js +79 -0
- package/node_modules/moment/locale/es-do.js +119 -0
- package/node_modules/moment/locale/es-mx.js +121 -0
- package/node_modules/moment/locale/es-us.js +121 -0
- package/node_modules/moment/locale/es.js +121 -0
- package/node_modules/moment/locale/et.js +89 -0
- package/node_modules/moment/locale/eu.js +76 -0
- package/node_modules/moment/locale/fa.js +124 -0
- package/node_modules/moment/locale/fi.js +135 -0
- package/node_modules/moment/locale/fil.js +69 -0
- package/node_modules/moment/locale/fo.js +68 -0
- package/node_modules/moment/locale/fr-ca.js +81 -0
- package/node_modules/moment/locale/fr-ch.js +85 -0
- package/node_modules/moment/locale/fr.js +119 -0
- package/node_modules/moment/locale/fy.js +86 -0
- package/node_modules/moment/locale/ga.js +106 -0
- package/node_modules/moment/locale/gd.js +106 -0
- package/node_modules/moment/locale/gl.js +86 -0
- package/node_modules/moment/locale/gom-deva.js +137 -0
- package/node_modules/moment/locale/gom-latn.js +135 -0
- package/node_modules/moment/locale/gu.js +133 -0
- package/node_modules/moment/locale/he.js +105 -0
- package/node_modules/moment/locale/hi.js +179 -0
- package/node_modules/moment/locale/hr.js +167 -0
- package/node_modules/moment/locale/hu.js +129 -0
- package/node_modules/moment/locale/hy-am.js +105 -0
- package/node_modules/moment/locale/id.js +87 -0
- package/node_modules/moment/locale/is.js +151 -0
- package/node_modules/moment/locale/it-ch.js +75 -0
- package/node_modules/moment/locale/it.js +117 -0
- package/node_modules/moment/locale/ja.js +159 -0
- package/node_modules/moment/locale/jv.js +87 -0
- package/node_modules/moment/locale/ka.js +103 -0
- package/node_modules/moment/locale/kk.js +93 -0
- package/node_modules/moment/locale/km.js +114 -0
- package/node_modules/moment/locale/kn.js +135 -0
- package/node_modules/moment/locale/ko.js +86 -0
- package/node_modules/moment/locale/ku-kmr.js +125 -0
- package/node_modules/moment/locale/ku.js +129 -0
- package/node_modules/moment/locale/ky.js +95 -0
- package/node_modules/moment/locale/lb.js +148 -0
- package/node_modules/moment/locale/lo.js +77 -0
- package/node_modules/moment/locale/lt.js +136 -0
- package/node_modules/moment/locale/lv.js +105 -0
- package/node_modules/moment/locale/me.js +128 -0
- package/node_modules/moment/locale/mi.js +71 -0
- package/node_modules/moment/locale/mk.js +97 -0
- package/node_modules/moment/locale/ml.js +93 -0
- package/node_modules/moment/locale/mn.js +111 -0
- package/node_modules/moment/locale/mr.js +214 -0
- package/node_modules/moment/locale/ms-my.js +87 -0
- package/node_modules/moment/locale/ms.js +86 -0
- package/node_modules/moment/locale/mt.js +67 -0
- package/node_modules/moment/locale/my.js +102 -0
- package/node_modules/moment/locale/nb.js +71 -0
- package/node_modules/moment/locale/ne.js +132 -0
- package/node_modules/moment/locale/nl-be.js +113 -0
- package/node_modules/moment/locale/nl.js +115 -0
- package/node_modules/moment/locale/nn.js +70 -0
- package/node_modules/moment/locale/oc-lnc.js +96 -0
- package/node_modules/moment/locale/pa-in.js +133 -0
- package/node_modules/moment/locale/pl.js +151 -0
- package/node_modules/moment/locale/pt-br.js +69 -0
- package/node_modules/moment/locale/pt.js +74 -0
- package/node_modules/moment/locale/ro.js +87 -0
- package/node_modules/moment/locale/ru.js +224 -0
- package/node_modules/moment/locale/sd.js +92 -0
- package/node_modules/moment/locale/se.js +68 -0
- package/node_modules/moment/locale/si.js +80 -0
- package/node_modules/moment/locale/sk.js +156 -0
- package/node_modules/moment/locale/sl.js +182 -0
- package/node_modules/moment/locale/sq.js +76 -0
- package/node_modules/moment/locale/sr-cyrl.js +138 -0
- package/node_modules/moment/locale/sr.js +140 -0
- package/node_modules/moment/locale/ss.js +95 -0
- package/node_modules/moment/locale/sv.js +79 -0
- package/node_modules/moment/locale/sw.js +66 -0
- package/node_modules/moment/locale/ta.js +142 -0
- package/node_modules/moment/locale/te.js +99 -0
- package/node_modules/moment/locale/tet.js +79 -0
- package/node_modules/moment/locale/tg.js +128 -0
- package/node_modules/moment/locale/th.js +76 -0
- package/node_modules/moment/locale/tk.js +102 -0
- package/node_modules/moment/locale/tl-ph.js +68 -0
- package/node_modules/moment/locale/tlh.js +135 -0
- package/node_modules/moment/locale/tr.js +117 -0
- package/node_modules/moment/locale/tzl.js +100 -0
- package/node_modules/moment/locale/tzm-latn.js +65 -0
- package/node_modules/moment/locale/tzm.js +65 -0
- package/node_modules/moment/locale/ug-cn.js +122 -0
- package/node_modules/moment/locale/uk.js +178 -0
- package/node_modules/moment/locale/ur.js +93 -0
- package/node_modules/moment/locale/uz-latn.js +65 -0
- package/node_modules/moment/locale/uz.js +62 -0
- package/node_modules/moment/locale/vi.js +91 -0
- package/node_modules/moment/locale/x-pseudo.js +84 -0
- package/node_modules/moment/locale/yo.js +64 -0
- package/node_modules/moment/locale/zh-cn.js +131 -0
- package/node_modules/moment/locale/zh-hk.js +112 -0
- package/node_modules/moment/locale/zh-mo.js +111 -0
- package/node_modules/moment/locale/zh-tw.js +110 -0
- package/node_modules/moment/min/locales.js +12800 -0
- package/node_modules/moment/min/locales.min.js +2 -0
- package/node_modules/moment/min/locales.min.js.map +1 -0
- package/node_modules/moment/min/moment-with-locales.js +18472 -0
- package/node_modules/moment/min/moment-with-locales.min.js +2 -0
- package/node_modules/moment/min/moment-with-locales.min.js.map +1 -0
- package/node_modules/moment/min/moment.min.js +2 -0
- package/node_modules/moment/min/moment.min.js.map +1 -0
- package/node_modules/moment/moment.d.ts +796 -0
- package/node_modules/moment/moment.js +5688 -0
- package/node_modules/moment/package.js +11 -0
- package/node_modules/moment/package.json +116 -0
- package/node_modules/moment/src/lib/create/check-overflow.js +57 -0
- package/node_modules/moment/src/lib/create/date-from-array.js +35 -0
- package/node_modules/moment/src/lib/create/from-anything.js +117 -0
- package/node_modules/moment/src/lib/create/from-array.js +187 -0
- package/node_modules/moment/src/lib/create/from-object.js +20 -0
- package/node_modules/moment/src/lib/create/from-string-and-array.js +67 -0
- package/node_modules/moment/src/lib/create/from-string-and-format.js +135 -0
- package/node_modules/moment/src/lib/create/from-string.js +258 -0
- package/node_modules/moment/src/lib/create/local.js +5 -0
- package/node_modules/moment/src/lib/create/parsing-flags.js +28 -0
- package/node_modules/moment/src/lib/create/utc.js +5 -0
- package/node_modules/moment/src/lib/create/valid.js +51 -0
- package/node_modules/moment/src/lib/duration/abs.js +18 -0
- package/node_modules/moment/src/lib/duration/add-subtract.js +21 -0
- package/node_modules/moment/src/lib/duration/as.js +76 -0
- package/node_modules/moment/src/lib/duration/bubble.js +68 -0
- package/node_modules/moment/src/lib/duration/clone.js +5 -0
- package/node_modules/moment/src/lib/duration/constructor.js +42 -0
- package/node_modules/moment/src/lib/duration/create.js +133 -0
- package/node_modules/moment/src/lib/duration/duration.js +16 -0
- package/node_modules/moment/src/lib/duration/get.js +27 -0
- package/node_modules/moment/src/lib/duration/humanize.js +114 -0
- package/node_modules/moment/src/lib/duration/iso-string.js +68 -0
- package/node_modules/moment/src/lib/duration/prototype.js +78 -0
- package/node_modules/moment/src/lib/duration/valid.js +55 -0
- package/node_modules/moment/src/lib/format/format.js +104 -0
- package/node_modules/moment/src/lib/locale/base-config.js +41 -0
- package/node_modules/moment/src/lib/locale/calendar.js +15 -0
- package/node_modules/moment/src/lib/locale/constructor.js +5 -0
- package/node_modules/moment/src/lib/locale/en.js +39 -0
- package/node_modules/moment/src/lib/locale/formats.js +36 -0
- package/node_modules/moment/src/lib/locale/invalid.js +5 -0
- package/node_modules/moment/src/lib/locale/lists.js +93 -0
- package/node_modules/moment/src/lib/locale/locale.js +45 -0
- package/node_modules/moment/src/lib/locale/locales.js +249 -0
- package/node_modules/moment/src/lib/locale/ordinal.js +8 -0
- package/node_modules/moment/src/lib/locale/pre-post-format.js +3 -0
- package/node_modules/moment/src/lib/locale/prototype.js +88 -0
- package/node_modules/moment/src/lib/locale/relative.js +32 -0
- package/node_modules/moment/src/lib/locale/set.js +56 -0
- package/node_modules/moment/src/lib/moment/add-subtract.js +61 -0
- package/node_modules/moment/src/lib/moment/calendar.js +53 -0
- package/node_modules/moment/src/lib/moment/clone.js +5 -0
- package/node_modules/moment/src/lib/moment/compare.js +72 -0
- package/node_modules/moment/src/lib/moment/constructor.js +80 -0
- package/node_modules/moment/src/lib/moment/creation-data.js +9 -0
- package/node_modules/moment/src/lib/moment/diff.js +79 -0
- package/node_modules/moment/src/lib/moment/format.js +78 -0
- package/node_modules/moment/src/lib/moment/from.js +20 -0
- package/node_modules/moment/src/lib/moment/get-set.js +117 -0
- package/node_modules/moment/src/lib/moment/locale.js +34 -0
- package/node_modules/moment/src/lib/moment/min-max.js +62 -0
- package/node_modules/moment/src/lib/moment/moment.js +28 -0
- package/node_modules/moment/src/lib/moment/now.js +3 -0
- package/node_modules/moment/src/lib/moment/prototype.js +197 -0
- package/node_modules/moment/src/lib/moment/start-end-of.js +164 -0
- package/node_modules/moment/src/lib/moment/to-type.js +42 -0
- package/node_modules/moment/src/lib/moment/to.js +20 -0
- package/node_modules/moment/src/lib/moment/valid.js +15 -0
- package/node_modules/moment/src/lib/parse/regex.js +84 -0
- package/node_modules/moment/src/lib/parse/token.js +36 -0
- package/node_modules/moment/src/lib/units/aliases.js +75 -0
- package/node_modules/moment/src/lib/units/constants.js +9 -0
- package/node_modules/moment/src/lib/units/day-of-month.js +35 -0
- package/node_modules/moment/src/lib/units/day-of-week.js +432 -0
- package/node_modules/moment/src/lib/units/day-of-year.js +28 -0
- package/node_modules/moment/src/lib/units/era.js +293 -0
- package/node_modules/moment/src/lib/units/hour.js +152 -0
- package/node_modules/moment/src/lib/units/millisecond.js +66 -0
- package/node_modules/moment/src/lib/units/minute.js +24 -0
- package/node_modules/moment/src/lib/units/month.js +340 -0
- package/node_modules/moment/src/lib/units/offset.js +249 -0
- package/node_modules/moment/src/lib/units/priorities.js +34 -0
- package/node_modules/moment/src/lib/units/quarter.js +24 -0
- package/node_modules/moment/src/lib/units/second.js +24 -0
- package/node_modules/moment/src/lib/units/timestamp.js +20 -0
- package/node_modules/moment/src/lib/units/timezone.js +16 -0
- package/node_modules/moment/src/lib/units/units.js +20 -0
- package/node_modules/moment/src/lib/units/week-calendar-utils.js +66 -0
- package/node_modules/moment/src/lib/units/week-year.js +128 -0
- package/node_modules/moment/src/lib/units/week.js +62 -0
- package/node_modules/moment/src/lib/units/year.js +75 -0
- package/node_modules/moment/src/lib/utils/abs-ceil.js +7 -0
- package/node_modules/moment/src/lib/utils/abs-floor.js +8 -0
- package/node_modules/moment/src/lib/utils/abs-round.js +7 -0
- package/node_modules/moment/src/lib/utils/compare-arrays.js +18 -0
- package/node_modules/moment/src/lib/utils/defaults.js +10 -0
- package/node_modules/moment/src/lib/utils/deprecate.js +69 -0
- package/node_modules/moment/src/lib/utils/extend.js +19 -0
- package/node_modules/moment/src/lib/utils/has-own-prop.js +3 -0
- package/node_modules/moment/src/lib/utils/hooks.js +13 -0
- package/node_modules/moment/src/lib/utils/index-of.js +18 -0
- package/node_modules/moment/src/lib/utils/is-array.js +6 -0
- package/node_modules/moment/src/lib/utils/is-calendar-spec.js +25 -0
- package/node_modules/moment/src/lib/utils/is-date.js +6 -0
- package/node_modules/moment/src/lib/utils/is-function.js +6 -0
- package/node_modules/moment/src/lib/utils/is-leap-year.js +3 -0
- package/node_modules/moment/src/lib/utils/is-moment-input.js +75 -0
- package/node_modules/moment/src/lib/utils/is-number.js +6 -0
- package/node_modules/moment/src/lib/utils/is-object-empty.js +15 -0
- package/node_modules/moment/src/lib/utils/is-object.js +8 -0
- package/node_modules/moment/src/lib/utils/is-string.js +3 -0
- package/node_modules/moment/src/lib/utils/is-undefined.js +3 -0
- package/node_modules/moment/src/lib/utils/keys.js +20 -0
- package/node_modules/moment/src/lib/utils/map.js +9 -0
- package/node_modules/moment/src/lib/utils/mod.js +3 -0
- package/node_modules/moment/src/lib/utils/some.js +20 -0
- package/node_modules/moment/src/lib/utils/to-int.js +12 -0
- package/node_modules/moment/src/lib/utils/zero-fill.js +10 -0
- package/node_modules/moment/src/locale/af.js +71 -0
- package/node_modules/moment/src/locale/ar-dz.js +156 -0
- package/node_modules/moment/src/locale/ar-kw.js +55 -0
- package/node_modules/moment/src/locale/ar-ly.js +171 -0
- package/node_modules/moment/src/locale/ar-ma.js +56 -0
- package/node_modules/moment/src/locale/ar-ps.js +112 -0
- package/node_modules/moment/src/locale/ar-sa.js +105 -0
- package/node_modules/moment/src/locale/ar-tn.js +55 -0
- package/node_modules/moment/src/locale/ar.js +189 -0
- package/node_modules/moment/src/locale/az.js +102 -0
- package/node_modules/moment/src/locale/be.js +142 -0
- package/node_modules/moment/src/locale/bg.js +87 -0
- package/node_modules/moment/src/locale/bm.js +52 -0
- package/node_modules/moment/src/locale/bn-bd.js +129 -0
- package/node_modules/moment/src/locale/bn.js +119 -0
- package/node_modules/moment/src/locale/bo.js +124 -0
- package/node_modules/moment/src/locale/br.js +168 -0
- package/node_modules/moment/src/locale/bs.js +160 -0
- package/node_modules/moment/src/locale/ca.js +100 -0
- package/node_modules/moment/src/locale/cs.js +181 -0
- package/node_modules/moment/src/locale/cv.js +63 -0
- package/node_modules/moment/src/locale/cy.js +98 -0
- package/node_modules/moment/src/locale/da.js +53 -0
- package/node_modules/moment/src/locale/de-at.js +79 -0
- package/node_modules/moment/src/locale/de-ch.js +78 -0
- package/node_modules/moment/src/locale/de.js +78 -0
- package/node_modules/moment/src/locale/dv.js +90 -0
- package/node_modules/moment/src/locale/el.js +106 -0
- package/node_modules/moment/src/locale/en-au.js +68 -0
- package/node_modules/moment/src/locale/en-ca.js +64 -0
- package/node_modules/moment/src/locale/en-gb.js +68 -0
- package/node_modules/moment/src/locale/en-ie.js +68 -0
- package/node_modules/moment/src/locale/en-il.js +64 -0
- package/node_modules/moment/src/locale/en-in.js +68 -0
- package/node_modules/moment/src/locale/en-nz.js +68 -0
- package/node_modules/moment/src/locale/en-sg.js +68 -0
- package/node_modules/moment/src/locale/eo.js +68 -0
- package/node_modules/moment/src/locale/es-do.js +108 -0
- package/node_modules/moment/src/locale/es-mx.js +110 -0
- package/node_modules/moment/src/locale/es-us.js +110 -0
- package/node_modules/moment/src/locale/es.js +110 -0
- package/node_modules/moment/src/locale/et.js +78 -0
- package/node_modules/moment/src/locale/eu.js +65 -0
- package/node_modules/moment/src/locale/fa.js +113 -0
- package/node_modules/moment/src/locale/fi.js +124 -0
- package/node_modules/moment/src/locale/fil.js +58 -0
- package/node_modules/moment/src/locale/fo.js +57 -0
- package/node_modules/moment/src/locale/fr-ca.js +70 -0
- package/node_modules/moment/src/locale/fr-ch.js +74 -0
- package/node_modules/moment/src/locale/fr.js +108 -0
- package/node_modules/moment/src/locale/fy.js +75 -0
- package/node_modules/moment/src/locale/ga.js +95 -0
- package/node_modules/moment/src/locale/gd.js +95 -0
- package/node_modules/moment/src/locale/gl.js +75 -0
- package/node_modules/moment/src/locale/gom-deva.js +126 -0
- package/node_modules/moment/src/locale/gom-latn.js +124 -0
- package/node_modules/moment/src/locale/gu.js +122 -0
- package/node_modules/moment/src/locale/he.js +94 -0
- package/node_modules/moment/src/locale/hi.js +168 -0
- package/node_modules/moment/src/locale/hr.js +156 -0
- package/node_modules/moment/src/locale/hu.js +118 -0
- package/node_modules/moment/src/locale/hy-am.js +94 -0
- package/node_modules/moment/src/locale/id.js +76 -0
- package/node_modules/moment/src/locale/is.js +140 -0
- package/node_modules/moment/src/locale/it-ch.js +64 -0
- package/node_modules/moment/src/locale/it.js +106 -0
- package/node_modules/moment/src/locale/ja.js +148 -0
- package/node_modules/moment/src/locale/jv.js +76 -0
- package/node_modules/moment/src/locale/ka.js +92 -0
- package/node_modules/moment/src/locale/kk.js +82 -0
- package/node_modules/moment/src/locale/km.js +103 -0
- package/node_modules/moment/src/locale/kn.js +124 -0
- package/node_modules/moment/src/locale/ko.js +75 -0
- package/node_modules/moment/src/locale/ku-kmr.js +121 -0
- package/node_modules/moment/src/locale/ku.js +118 -0
- package/node_modules/moment/src/locale/ky.js +84 -0
- package/node_modules/moment/src/locale/lb.js +137 -0
- package/node_modules/moment/src/locale/lo.js +66 -0
- package/node_modules/moment/src/locale/lt.js +125 -0
- package/node_modules/moment/src/locale/lv.js +94 -0
- package/node_modules/moment/src/locale/me.js +117 -0
- package/node_modules/moment/src/locale/mi.js +60 -0
- package/node_modules/moment/src/locale/mk.js +85 -0
- package/node_modules/moment/src/locale/ml.js +82 -0
- package/node_modules/moment/src/locale/mn.js +100 -0
- package/node_modules/moment/src/locale/mr.js +203 -0
- package/node_modules/moment/src/locale/ms-my.js +76 -0
- package/node_modules/moment/src/locale/ms.js +75 -0
- package/node_modules/moment/src/locale/mt.js +56 -0
- package/node_modules/moment/src/locale/my.js +91 -0
- package/node_modules/moment/src/locale/nb.js +60 -0
- package/node_modules/moment/src/locale/ne.js +121 -0
- package/node_modules/moment/src/locale/nl-be.js +102 -0
- package/node_modules/moment/src/locale/nl.js +104 -0
- package/node_modules/moment/src/locale/nn.js +59 -0
- package/node_modules/moment/src/locale/oc-lnc.js +85 -0
- package/node_modules/moment/src/locale/pa-in.js +122 -0
- package/node_modules/moment/src/locale/pl.js +140 -0
- package/node_modules/moment/src/locale/pt-br.js +58 -0
- package/node_modules/moment/src/locale/pt.js +63 -0
- package/node_modules/moment/src/locale/ro.js +76 -0
- package/node_modules/moment/src/locale/ru.js +213 -0
- package/node_modules/moment/src/locale/sd.js +81 -0
- package/node_modules/moment/src/locale/se.js +57 -0
- package/node_modules/moment/src/locale/si.js +69 -0
- package/node_modules/moment/src/locale/sk.js +145 -0
- package/node_modules/moment/src/locale/sl.js +171 -0
- package/node_modules/moment/src/locale/sq.js +65 -0
- package/node_modules/moment/src/locale/sr-cyrl.js +127 -0
- package/node_modules/moment/src/locale/sr.js +129 -0
- package/node_modules/moment/src/locale/ss.js +84 -0
- package/node_modules/moment/src/locale/sv.js +68 -0
- package/node_modules/moment/src/locale/sw.js +55 -0
- package/node_modules/moment/src/locale/ta.js +131 -0
- package/node_modules/moment/src/locale/te.js +88 -0
- package/node_modules/moment/src/locale/tet.js +68 -0
- package/node_modules/moment/src/locale/tg.js +117 -0
- package/node_modules/moment/src/locale/th.js +65 -0
- package/node_modules/moment/src/locale/tk.js +91 -0
- package/node_modules/moment/src/locale/tl-ph.js +57 -0
- package/node_modules/moment/src/locale/tlh.js +124 -0
- package/node_modules/moment/src/locale/tr.js +106 -0
- package/node_modules/moment/src/locale/tzl.js +89 -0
- package/node_modules/moment/src/locale/tzm-latn.js +54 -0
- package/node_modules/moment/src/locale/tzm.js +54 -0
- package/node_modules/moment/src/locale/ug-cn.js +111 -0
- package/node_modules/moment/src/locale/uk.js +167 -0
- package/node_modules/moment/src/locale/ur.js +82 -0
- package/node_modules/moment/src/locale/uz-latn.js +54 -0
- package/node_modules/moment/src/locale/uz.js +51 -0
- package/node_modules/moment/src/locale/vi.js +80 -0
- package/node_modules/moment/src/locale/x-pseudo.js +73 -0
- package/node_modules/moment/src/locale/yo.js +53 -0
- package/node_modules/moment/src/locale/zh-cn.js +120 -0
- package/node_modules/moment/src/locale/zh-hk.js +101 -0
- package/node_modules/moment/src/locale/zh-mo.js +100 -0
- package/node_modules/moment/src/locale/zh-tw.js +99 -0
- package/node_modules/moment/src/moment.js +93 -0
- package/node_modules/moment/ts3.1-typings/moment.d.ts +785 -0
- package/node_modules/nanoid/LICENSE +20 -0
- package/node_modules/nanoid/README.md +38 -0
- package/node_modules/nanoid/async/index.browser.js +33 -0
- package/node_modules/nanoid/async/index.d.ts +56 -0
- package/node_modules/nanoid/async/index.js +34 -0
- package/node_modules/nanoid/async/index.native.js +25 -0
- package/node_modules/nanoid/bin/nanoid.js +46 -0
- package/node_modules/nanoid/index.browser.js +33 -0
- package/node_modules/nanoid/index.d.ts +91 -0
- package/node_modules/nanoid/index.js +45 -0
- package/node_modules/nanoid/nanoid.js +1 -0
- package/node_modules/nanoid/non-secure/index.d.ts +33 -0
- package/node_modules/nanoid/non-secure/index.js +20 -0
- package/node_modules/nanoid/package.json +46 -0
- package/node_modules/nanoid/url-alphabet/index.js +2 -0
- package/node_modules/ts-md5/LICENSE +21 -0
- package/node_modules/ts-md5/README.md +101 -0
- package/node_modules/ts-md5/dist/cjs/index.d.ts +3 -0
- package/node_modules/ts-md5/dist/cjs/index.js +10 -0
- package/node_modules/ts-md5/dist/cjs/index.js.map +1 -0
- package/node_modules/ts-md5/dist/cjs/md5.d.ts +70 -0
- package/node_modules/ts-md5/dist/cjs/md5.js +429 -0
- package/node_modules/ts-md5/dist/cjs/md5.js.map +1 -0
- package/node_modules/ts-md5/dist/cjs/md5_file_hasher.d.ts +25 -0
- package/node_modules/ts-md5/dist/cjs/md5_file_hasher.js +96 -0
- package/node_modules/ts-md5/dist/cjs/md5_file_hasher.js.map +1 -0
- package/node_modules/ts-md5/dist/cjs/parallel_hasher.d.ts +22 -0
- package/node_modules/ts-md5/dist/cjs/parallel_hasher.js +69 -0
- package/node_modules/ts-md5/dist/cjs/parallel_hasher.js.map +1 -0
- package/node_modules/ts-md5/dist/esm/index.d.ts +3 -0
- package/node_modules/ts-md5/dist/esm/index.js +4 -0
- package/node_modules/ts-md5/dist/esm/index.js.map +1 -0
- package/node_modules/ts-md5/dist/esm/md5.d.ts +70 -0
- package/node_modules/ts-md5/dist/esm/md5.js +421 -0
- package/node_modules/ts-md5/dist/esm/md5.js.map +1 -0
- package/node_modules/ts-md5/dist/esm/md5_file_hasher.d.ts +25 -0
- package/node_modules/ts-md5/dist/esm/md5_file_hasher.js +89 -0
- package/node_modules/ts-md5/dist/esm/md5_file_hasher.js.map +1 -0
- package/node_modules/ts-md5/dist/esm/parallel_hasher.d.ts +22 -0
- package/node_modules/ts-md5/dist/esm/parallel_hasher.js +64 -0
- package/node_modules/ts-md5/dist/esm/parallel_hasher.js.map +1 -0
- package/node_modules/ts-md5/dist/md5.js +429 -0
- package/node_modules/ts-md5/dist/md5_worker.js +523 -0
- package/node_modules/ts-md5/package.json +82 -0
- package/node_modules/ts-md5/src/index.ts +4 -0
- package/node_modules/ts-md5/src/md5.ts +473 -0
- package/node_modules/ts-md5/src/md5_file_hasher.ts +110 -0
- package/node_modules/ts-md5/src/parallel_hasher.ts +90 -0
- package/node_modules/ts-md5/src/worker.js +20 -0
- package/package.json +160 -0
- package/scripts/generate-index.js +52 -0
- package/setup.js +2 -0
- package/tfsec.json +4 -0
- package/util/compute.go +106 -0
- package/util/terraform.go +213 -0
- package/util/util.go +100 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { get } from '../moment/get-set';
|
|
2
|
+
import hasOwnProp from '../utils/has-own-prop';
|
|
3
|
+
import { addFormatToken } from '../format/format';
|
|
4
|
+
import {
|
|
5
|
+
addRegexToken,
|
|
6
|
+
match1to2,
|
|
7
|
+
match2,
|
|
8
|
+
matchWord,
|
|
9
|
+
regexEscape,
|
|
10
|
+
match1to2NoLeadingZero,
|
|
11
|
+
} from '../parse/regex';
|
|
12
|
+
import { addParseToken } from '../parse/token';
|
|
13
|
+
import { hooks } from '../utils/hooks';
|
|
14
|
+
import { MONTH } from './constants';
|
|
15
|
+
import toInt from '../utils/to-int';
|
|
16
|
+
import isArray from '../utils/is-array';
|
|
17
|
+
import isNumber from '../utils/is-number';
|
|
18
|
+
import mod from '../utils/mod';
|
|
19
|
+
import indexOf from '../utils/index-of';
|
|
20
|
+
import { createUTC } from '../create/utc';
|
|
21
|
+
import getParsingFlags from '../create/parsing-flags';
|
|
22
|
+
import { isLeapYear } from '../utils/is-leap-year';
|
|
23
|
+
|
|
24
|
+
export function daysInMonth(year, month) {
|
|
25
|
+
if (isNaN(year) || isNaN(month)) {
|
|
26
|
+
return NaN;
|
|
27
|
+
}
|
|
28
|
+
var modMonth = mod(month, 12);
|
|
29
|
+
year += (month - modMonth) / 12;
|
|
30
|
+
return modMonth === 1
|
|
31
|
+
? isLeapYear(year)
|
|
32
|
+
? 29
|
|
33
|
+
: 28
|
|
34
|
+
: 31 - ((modMonth % 7) % 2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// FORMATTING
|
|
38
|
+
|
|
39
|
+
addFormatToken('M', ['MM', 2], 'Mo', function () {
|
|
40
|
+
return this.month() + 1;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
addFormatToken('MMM', 0, 0, function (format) {
|
|
44
|
+
return this.localeData().monthsShort(this, format);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
addFormatToken('MMMM', 0, 0, function (format) {
|
|
48
|
+
return this.localeData().months(this, format);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// PARSING
|
|
52
|
+
|
|
53
|
+
addRegexToken('M', match1to2, match1to2NoLeadingZero);
|
|
54
|
+
addRegexToken('MM', match1to2, match2);
|
|
55
|
+
addRegexToken('MMM', function (isStrict, locale) {
|
|
56
|
+
return locale.monthsShortRegex(isStrict);
|
|
57
|
+
});
|
|
58
|
+
addRegexToken('MMMM', function (isStrict, locale) {
|
|
59
|
+
return locale.monthsRegex(isStrict);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
addParseToken(['M', 'MM'], function (input, array) {
|
|
63
|
+
array[MONTH] = toInt(input) - 1;
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
|
|
67
|
+
var month = config._locale.monthsParse(input, token, config._strict);
|
|
68
|
+
// if we didn't find a month name, mark the date as invalid.
|
|
69
|
+
if (month != null) {
|
|
70
|
+
array[MONTH] = month;
|
|
71
|
+
} else {
|
|
72
|
+
getParsingFlags(config).invalidMonth = input;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// LOCALES
|
|
77
|
+
|
|
78
|
+
var defaultLocaleMonths =
|
|
79
|
+
'January_February_March_April_May_June_July_August_September_October_November_December'.split(
|
|
80
|
+
'_'
|
|
81
|
+
),
|
|
82
|
+
defaultLocaleMonthsShort =
|
|
83
|
+
'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
|
84
|
+
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
|
|
85
|
+
defaultMonthsShortRegex = matchWord,
|
|
86
|
+
defaultMonthsRegex = matchWord;
|
|
87
|
+
|
|
88
|
+
export { defaultLocaleMonths, defaultLocaleMonthsShort };
|
|
89
|
+
|
|
90
|
+
export function localeMonths(m, format) {
|
|
91
|
+
if (!m) {
|
|
92
|
+
return isArray(this._months)
|
|
93
|
+
? this._months
|
|
94
|
+
: this._months['standalone'];
|
|
95
|
+
}
|
|
96
|
+
return isArray(this._months)
|
|
97
|
+
? this._months[m.month()]
|
|
98
|
+
: this._months[
|
|
99
|
+
(this._months.isFormat || MONTHS_IN_FORMAT).test(format)
|
|
100
|
+
? 'format'
|
|
101
|
+
: 'standalone'
|
|
102
|
+
][m.month()];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function localeMonthsShort(m, format) {
|
|
106
|
+
if (!m) {
|
|
107
|
+
return isArray(this._monthsShort)
|
|
108
|
+
? this._monthsShort
|
|
109
|
+
: this._monthsShort['standalone'];
|
|
110
|
+
}
|
|
111
|
+
return isArray(this._monthsShort)
|
|
112
|
+
? this._monthsShort[m.month()]
|
|
113
|
+
: this._monthsShort[
|
|
114
|
+
MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
|
|
115
|
+
][m.month()];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function handleStrictParse(monthName, format, strict) {
|
|
119
|
+
var i,
|
|
120
|
+
ii,
|
|
121
|
+
mom,
|
|
122
|
+
llc = monthName.toLocaleLowerCase();
|
|
123
|
+
if (!this._monthsParse) {
|
|
124
|
+
// this is not used
|
|
125
|
+
this._monthsParse = [];
|
|
126
|
+
this._longMonthsParse = [];
|
|
127
|
+
this._shortMonthsParse = [];
|
|
128
|
+
for (i = 0; i < 12; ++i) {
|
|
129
|
+
mom = createUTC([2000, i]);
|
|
130
|
+
this._shortMonthsParse[i] = this.monthsShort(
|
|
131
|
+
mom,
|
|
132
|
+
''
|
|
133
|
+
).toLocaleLowerCase();
|
|
134
|
+
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (strict) {
|
|
139
|
+
if (format === 'MMM') {
|
|
140
|
+
ii = indexOf.call(this._shortMonthsParse, llc);
|
|
141
|
+
return ii !== -1 ? ii : null;
|
|
142
|
+
} else {
|
|
143
|
+
ii = indexOf.call(this._longMonthsParse, llc);
|
|
144
|
+
return ii !== -1 ? ii : null;
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
if (format === 'MMM') {
|
|
148
|
+
ii = indexOf.call(this._shortMonthsParse, llc);
|
|
149
|
+
if (ii !== -1) {
|
|
150
|
+
return ii;
|
|
151
|
+
}
|
|
152
|
+
ii = indexOf.call(this._longMonthsParse, llc);
|
|
153
|
+
return ii !== -1 ? ii : null;
|
|
154
|
+
} else {
|
|
155
|
+
ii = indexOf.call(this._longMonthsParse, llc);
|
|
156
|
+
if (ii !== -1) {
|
|
157
|
+
return ii;
|
|
158
|
+
}
|
|
159
|
+
ii = indexOf.call(this._shortMonthsParse, llc);
|
|
160
|
+
return ii !== -1 ? ii : null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function localeMonthsParse(monthName, format, strict) {
|
|
166
|
+
var i, mom, regex;
|
|
167
|
+
|
|
168
|
+
if (this._monthsParseExact) {
|
|
169
|
+
return handleStrictParse.call(this, monthName, format, strict);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!this._monthsParse) {
|
|
173
|
+
this._monthsParse = [];
|
|
174
|
+
this._longMonthsParse = [];
|
|
175
|
+
this._shortMonthsParse = [];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// TODO: add sorting
|
|
179
|
+
// Sorting makes sure if one month (or abbr) is a prefix of another
|
|
180
|
+
// see sorting in computeMonthsParse
|
|
181
|
+
for (i = 0; i < 12; i++) {
|
|
182
|
+
// make the regex if we don't have it already
|
|
183
|
+
mom = createUTC([2000, i]);
|
|
184
|
+
if (strict && !this._longMonthsParse[i]) {
|
|
185
|
+
this._longMonthsParse[i] = new RegExp(
|
|
186
|
+
'^' + this.months(mom, '').replace('.', '') + '$',
|
|
187
|
+
'i'
|
|
188
|
+
);
|
|
189
|
+
this._shortMonthsParse[i] = new RegExp(
|
|
190
|
+
'^' + this.monthsShort(mom, '').replace('.', '') + '$',
|
|
191
|
+
'i'
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
if (!strict && !this._monthsParse[i]) {
|
|
195
|
+
regex =
|
|
196
|
+
'^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
|
|
197
|
+
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
|
|
198
|
+
}
|
|
199
|
+
// test the regex
|
|
200
|
+
if (
|
|
201
|
+
strict &&
|
|
202
|
+
format === 'MMMM' &&
|
|
203
|
+
this._longMonthsParse[i].test(monthName)
|
|
204
|
+
) {
|
|
205
|
+
return i;
|
|
206
|
+
} else if (
|
|
207
|
+
strict &&
|
|
208
|
+
format === 'MMM' &&
|
|
209
|
+
this._shortMonthsParse[i].test(monthName)
|
|
210
|
+
) {
|
|
211
|
+
return i;
|
|
212
|
+
} else if (!strict && this._monthsParse[i].test(monthName)) {
|
|
213
|
+
return i;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// MOMENTS
|
|
219
|
+
|
|
220
|
+
export function setMonth(mom, value) {
|
|
221
|
+
if (!mom.isValid()) {
|
|
222
|
+
// No op
|
|
223
|
+
return mom;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (typeof value === 'string') {
|
|
227
|
+
if (/^\d+$/.test(value)) {
|
|
228
|
+
value = toInt(value);
|
|
229
|
+
} else {
|
|
230
|
+
value = mom.localeData().monthsParse(value);
|
|
231
|
+
// TODO: Another silent failure?
|
|
232
|
+
if (!isNumber(value)) {
|
|
233
|
+
return mom;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
var month = value,
|
|
239
|
+
date = mom.date();
|
|
240
|
+
|
|
241
|
+
date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
|
|
242
|
+
void (mom._isUTC
|
|
243
|
+
? mom._d.setUTCMonth(month, date)
|
|
244
|
+
: mom._d.setMonth(month, date));
|
|
245
|
+
return mom;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function getSetMonth(value) {
|
|
249
|
+
if (value != null) {
|
|
250
|
+
setMonth(this, value);
|
|
251
|
+
hooks.updateOffset(this, true);
|
|
252
|
+
return this;
|
|
253
|
+
} else {
|
|
254
|
+
return get(this, 'Month');
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function getDaysInMonth() {
|
|
259
|
+
return daysInMonth(this.year(), this.month());
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export function monthsShortRegex(isStrict) {
|
|
263
|
+
if (this._monthsParseExact) {
|
|
264
|
+
if (!hasOwnProp(this, '_monthsRegex')) {
|
|
265
|
+
computeMonthsParse.call(this);
|
|
266
|
+
}
|
|
267
|
+
if (isStrict) {
|
|
268
|
+
return this._monthsShortStrictRegex;
|
|
269
|
+
} else {
|
|
270
|
+
return this._monthsShortRegex;
|
|
271
|
+
}
|
|
272
|
+
} else {
|
|
273
|
+
if (!hasOwnProp(this, '_monthsShortRegex')) {
|
|
274
|
+
this._monthsShortRegex = defaultMonthsShortRegex;
|
|
275
|
+
}
|
|
276
|
+
return this._monthsShortStrictRegex && isStrict
|
|
277
|
+
? this._monthsShortStrictRegex
|
|
278
|
+
: this._monthsShortRegex;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export function monthsRegex(isStrict) {
|
|
283
|
+
if (this._monthsParseExact) {
|
|
284
|
+
if (!hasOwnProp(this, '_monthsRegex')) {
|
|
285
|
+
computeMonthsParse.call(this);
|
|
286
|
+
}
|
|
287
|
+
if (isStrict) {
|
|
288
|
+
return this._monthsStrictRegex;
|
|
289
|
+
} else {
|
|
290
|
+
return this._monthsRegex;
|
|
291
|
+
}
|
|
292
|
+
} else {
|
|
293
|
+
if (!hasOwnProp(this, '_monthsRegex')) {
|
|
294
|
+
this._monthsRegex = defaultMonthsRegex;
|
|
295
|
+
}
|
|
296
|
+
return this._monthsStrictRegex && isStrict
|
|
297
|
+
? this._monthsStrictRegex
|
|
298
|
+
: this._monthsRegex;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function computeMonthsParse() {
|
|
303
|
+
function cmpLenRev(a, b) {
|
|
304
|
+
return b.length - a.length;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
var shortPieces = [],
|
|
308
|
+
longPieces = [],
|
|
309
|
+
mixedPieces = [],
|
|
310
|
+
i,
|
|
311
|
+
mom,
|
|
312
|
+
shortP,
|
|
313
|
+
longP;
|
|
314
|
+
for (i = 0; i < 12; i++) {
|
|
315
|
+
// make the regex if we don't have it already
|
|
316
|
+
mom = createUTC([2000, i]);
|
|
317
|
+
shortP = regexEscape(this.monthsShort(mom, ''));
|
|
318
|
+
longP = regexEscape(this.months(mom, ''));
|
|
319
|
+
shortPieces.push(shortP);
|
|
320
|
+
longPieces.push(longP);
|
|
321
|
+
mixedPieces.push(longP);
|
|
322
|
+
mixedPieces.push(shortP);
|
|
323
|
+
}
|
|
324
|
+
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
|
325
|
+
// will match the longer piece.
|
|
326
|
+
shortPieces.sort(cmpLenRev);
|
|
327
|
+
longPieces.sort(cmpLenRev);
|
|
328
|
+
mixedPieces.sort(cmpLenRev);
|
|
329
|
+
|
|
330
|
+
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
|
|
331
|
+
this._monthsShortRegex = this._monthsRegex;
|
|
332
|
+
this._monthsStrictRegex = new RegExp(
|
|
333
|
+
'^(' + longPieces.join('|') + ')',
|
|
334
|
+
'i'
|
|
335
|
+
);
|
|
336
|
+
this._monthsShortStrictRegex = new RegExp(
|
|
337
|
+
'^(' + shortPieces.join('|') + ')',
|
|
338
|
+
'i'
|
|
339
|
+
);
|
|
340
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import zeroFill from '../utils/zero-fill';
|
|
2
|
+
import { createDuration } from '../duration/create';
|
|
3
|
+
import { addSubtract } from '../moment/add-subtract';
|
|
4
|
+
import { isMoment, copyConfig } from '../moment/constructor';
|
|
5
|
+
import { addFormatToken } from '../format/format';
|
|
6
|
+
import { addRegexToken, matchOffset, matchShortOffset } from '../parse/regex';
|
|
7
|
+
import { addParseToken } from '../parse/token';
|
|
8
|
+
import { createLocal } from '../create/local';
|
|
9
|
+
import { prepareConfig } from '../create/from-anything';
|
|
10
|
+
import { createUTC } from '../create/utc';
|
|
11
|
+
import isDate from '../utils/is-date';
|
|
12
|
+
import toInt from '../utils/to-int';
|
|
13
|
+
import isUndefined from '../utils/is-undefined';
|
|
14
|
+
import compareArrays from '../utils/compare-arrays';
|
|
15
|
+
import { hooks } from '../utils/hooks';
|
|
16
|
+
|
|
17
|
+
// FORMATTING
|
|
18
|
+
|
|
19
|
+
function offset(token, separator) {
|
|
20
|
+
addFormatToken(token, 0, 0, function () {
|
|
21
|
+
var offset = this.utcOffset(),
|
|
22
|
+
sign = '+';
|
|
23
|
+
if (offset < 0) {
|
|
24
|
+
offset = -offset;
|
|
25
|
+
sign = '-';
|
|
26
|
+
}
|
|
27
|
+
return (
|
|
28
|
+
sign +
|
|
29
|
+
zeroFill(~~(offset / 60), 2) +
|
|
30
|
+
separator +
|
|
31
|
+
zeroFill(~~offset % 60, 2)
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
offset('Z', ':');
|
|
37
|
+
offset('ZZ', '');
|
|
38
|
+
|
|
39
|
+
// PARSING
|
|
40
|
+
|
|
41
|
+
addRegexToken('Z', matchShortOffset);
|
|
42
|
+
addRegexToken('ZZ', matchShortOffset);
|
|
43
|
+
addParseToken(['Z', 'ZZ'], function (input, array, config) {
|
|
44
|
+
config._useUTC = true;
|
|
45
|
+
config._tzm = offsetFromString(matchShortOffset, input);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// HELPERS
|
|
49
|
+
|
|
50
|
+
// timezone chunker
|
|
51
|
+
// '+10:00' > ['10', '00']
|
|
52
|
+
// '-1530' > ['-15', '30']
|
|
53
|
+
var chunkOffset = /([\+\-]|\d\d)/gi;
|
|
54
|
+
|
|
55
|
+
function offsetFromString(matcher, string) {
|
|
56
|
+
var matches = (string || '').match(matcher),
|
|
57
|
+
chunk,
|
|
58
|
+
parts,
|
|
59
|
+
minutes;
|
|
60
|
+
|
|
61
|
+
if (matches === null) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
chunk = matches[matches.length - 1] || [];
|
|
66
|
+
parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
|
|
67
|
+
minutes = +(parts[1] * 60) + toInt(parts[2]);
|
|
68
|
+
|
|
69
|
+
return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Return a moment from input, that is local/utc/zone equivalent to model.
|
|
73
|
+
export function cloneWithOffset(input, model) {
|
|
74
|
+
var res, diff;
|
|
75
|
+
if (model._isUTC) {
|
|
76
|
+
res = model.clone();
|
|
77
|
+
diff =
|
|
78
|
+
(isMoment(input) || isDate(input)
|
|
79
|
+
? input.valueOf()
|
|
80
|
+
: createLocal(input).valueOf()) - res.valueOf();
|
|
81
|
+
// Use low-level api, because this fn is low-level api.
|
|
82
|
+
res._d.setTime(res._d.valueOf() + diff);
|
|
83
|
+
hooks.updateOffset(res, false);
|
|
84
|
+
return res;
|
|
85
|
+
} else {
|
|
86
|
+
return createLocal(input).local();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function getDateOffset(m) {
|
|
91
|
+
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
|
|
92
|
+
// https://github.com/moment/moment/pull/1871
|
|
93
|
+
return -Math.round(m._d.getTimezoneOffset());
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// HOOKS
|
|
97
|
+
|
|
98
|
+
// This function will be called whenever a moment is mutated.
|
|
99
|
+
// It is intended to keep the offset in sync with the timezone.
|
|
100
|
+
hooks.updateOffset = function () {};
|
|
101
|
+
|
|
102
|
+
// MOMENTS
|
|
103
|
+
|
|
104
|
+
// keepLocalTime = true means only change the timezone, without
|
|
105
|
+
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
|
|
106
|
+
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
|
|
107
|
+
// +0200, so we adjust the time as needed, to be valid.
|
|
108
|
+
//
|
|
109
|
+
// Keeping the time actually adds/subtracts (one hour)
|
|
110
|
+
// from the actual represented time. That is why we call updateOffset
|
|
111
|
+
// a second time. In case it wants us to change the offset again
|
|
112
|
+
// _changeInProgress == true case, then we have to adjust, because
|
|
113
|
+
// there is no such time in the given timezone.
|
|
114
|
+
export function getSetOffset(input, keepLocalTime, keepMinutes) {
|
|
115
|
+
var offset = this._offset || 0,
|
|
116
|
+
localAdjust;
|
|
117
|
+
if (!this.isValid()) {
|
|
118
|
+
return input != null ? this : NaN;
|
|
119
|
+
}
|
|
120
|
+
if (input != null) {
|
|
121
|
+
if (typeof input === 'string') {
|
|
122
|
+
input = offsetFromString(matchShortOffset, input);
|
|
123
|
+
if (input === null) {
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
} else if (Math.abs(input) < 16 && !keepMinutes) {
|
|
127
|
+
input = input * 60;
|
|
128
|
+
}
|
|
129
|
+
if (!this._isUTC && keepLocalTime) {
|
|
130
|
+
localAdjust = getDateOffset(this);
|
|
131
|
+
}
|
|
132
|
+
this._offset = input;
|
|
133
|
+
this._isUTC = true;
|
|
134
|
+
if (localAdjust != null) {
|
|
135
|
+
this.add(localAdjust, 'm');
|
|
136
|
+
}
|
|
137
|
+
if (offset !== input) {
|
|
138
|
+
if (!keepLocalTime || this._changeInProgress) {
|
|
139
|
+
addSubtract(
|
|
140
|
+
this,
|
|
141
|
+
createDuration(input - offset, 'm'),
|
|
142
|
+
1,
|
|
143
|
+
false
|
|
144
|
+
);
|
|
145
|
+
} else if (!this._changeInProgress) {
|
|
146
|
+
this._changeInProgress = true;
|
|
147
|
+
hooks.updateOffset(this, true);
|
|
148
|
+
this._changeInProgress = null;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return this;
|
|
152
|
+
} else {
|
|
153
|
+
return this._isUTC ? offset : getDateOffset(this);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function getSetZone(input, keepLocalTime) {
|
|
158
|
+
if (input != null) {
|
|
159
|
+
if (typeof input !== 'string') {
|
|
160
|
+
input = -input;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
this.utcOffset(input, keepLocalTime);
|
|
164
|
+
|
|
165
|
+
return this;
|
|
166
|
+
} else {
|
|
167
|
+
return -this.utcOffset();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function setOffsetToUTC(keepLocalTime) {
|
|
172
|
+
return this.utcOffset(0, keepLocalTime);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function setOffsetToLocal(keepLocalTime) {
|
|
176
|
+
if (this._isUTC) {
|
|
177
|
+
this.utcOffset(0, keepLocalTime);
|
|
178
|
+
this._isUTC = false;
|
|
179
|
+
|
|
180
|
+
if (keepLocalTime) {
|
|
181
|
+
this.subtract(getDateOffset(this), 'm');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return this;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function setOffsetToParsedOffset() {
|
|
188
|
+
if (this._tzm != null) {
|
|
189
|
+
this.utcOffset(this._tzm, false, true);
|
|
190
|
+
} else if (typeof this._i === 'string') {
|
|
191
|
+
var tZone = offsetFromString(matchOffset, this._i);
|
|
192
|
+
if (tZone != null) {
|
|
193
|
+
this.utcOffset(tZone);
|
|
194
|
+
} else {
|
|
195
|
+
this.utcOffset(0, true);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return this;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function hasAlignedHourOffset(input) {
|
|
202
|
+
if (!this.isValid()) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
input = input ? createLocal(input).utcOffset() : 0;
|
|
206
|
+
|
|
207
|
+
return (this.utcOffset() - input) % 60 === 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function isDaylightSavingTime() {
|
|
211
|
+
return (
|
|
212
|
+
this.utcOffset() > this.clone().month(0).utcOffset() ||
|
|
213
|
+
this.utcOffset() > this.clone().month(5).utcOffset()
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function isDaylightSavingTimeShifted() {
|
|
218
|
+
if (!isUndefined(this._isDSTShifted)) {
|
|
219
|
+
return this._isDSTShifted;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
var c = {},
|
|
223
|
+
other;
|
|
224
|
+
|
|
225
|
+
copyConfig(c, this);
|
|
226
|
+
c = prepareConfig(c);
|
|
227
|
+
|
|
228
|
+
if (c._a) {
|
|
229
|
+
other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
|
|
230
|
+
this._isDSTShifted =
|
|
231
|
+
this.isValid() && compareArrays(c._a, other.toArray()) > 0;
|
|
232
|
+
} else {
|
|
233
|
+
this._isDSTShifted = false;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return this._isDSTShifted;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function isLocal() {
|
|
240
|
+
return this.isValid() ? !this._isUTC : false;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function isUtcOffset() {
|
|
244
|
+
return this.isValid() ? this._isUTC : false;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function isUtc() {
|
|
248
|
+
return this.isValid() ? this._isUTC && this._offset === 0 : false;
|
|
249
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import hasOwnProp from '../utils/has-own-prop';
|
|
2
|
+
|
|
3
|
+
var priorities = {
|
|
4
|
+
date: 9,
|
|
5
|
+
day: 11,
|
|
6
|
+
weekday: 11,
|
|
7
|
+
isoWeekday: 11,
|
|
8
|
+
dayOfYear: 4,
|
|
9
|
+
hour: 13,
|
|
10
|
+
millisecond: 16,
|
|
11
|
+
minute: 14,
|
|
12
|
+
month: 8,
|
|
13
|
+
quarter: 7,
|
|
14
|
+
second: 15,
|
|
15
|
+
weekYear: 1,
|
|
16
|
+
isoWeekYear: 1,
|
|
17
|
+
week: 5,
|
|
18
|
+
isoWeek: 5,
|
|
19
|
+
year: 1,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function getPrioritizedUnits(unitsObj) {
|
|
23
|
+
var units = [],
|
|
24
|
+
u;
|
|
25
|
+
for (u in unitsObj) {
|
|
26
|
+
if (hasOwnProp(unitsObj, u)) {
|
|
27
|
+
units.push({ unit: u, priority: priorities[u] });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
units.sort(function (a, b) {
|
|
31
|
+
return a.priority - b.priority;
|
|
32
|
+
});
|
|
33
|
+
return units;
|
|
34
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { addFormatToken } from '../format/format';
|
|
2
|
+
import { addRegexToken, match1 } from '../parse/regex';
|
|
3
|
+
import { addParseToken } from '../parse/token';
|
|
4
|
+
import { MONTH } from './constants';
|
|
5
|
+
import toInt from '../utils/to-int';
|
|
6
|
+
|
|
7
|
+
// FORMATTING
|
|
8
|
+
|
|
9
|
+
addFormatToken('Q', 0, 'Qo', 'quarter');
|
|
10
|
+
|
|
11
|
+
// PARSING
|
|
12
|
+
|
|
13
|
+
addRegexToken('Q', match1);
|
|
14
|
+
addParseToken('Q', function (input, array) {
|
|
15
|
+
array[MONTH] = (toInt(input) - 1) * 3;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// MOMENTS
|
|
19
|
+
|
|
20
|
+
export function getSetQuarter(input) {
|
|
21
|
+
return input == null
|
|
22
|
+
? Math.ceil((this.month() + 1) / 3)
|
|
23
|
+
: this.month((input - 1) * 3 + (this.month() % 3));
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { makeGetSet } from '../moment/get-set';
|
|
2
|
+
import { addFormatToken } from '../format/format';
|
|
3
|
+
import {
|
|
4
|
+
addRegexToken,
|
|
5
|
+
match1to2,
|
|
6
|
+
match2,
|
|
7
|
+
match1to2HasZero,
|
|
8
|
+
} from '../parse/regex';
|
|
9
|
+
import { addParseToken } from '../parse/token';
|
|
10
|
+
import { SECOND } from './constants';
|
|
11
|
+
|
|
12
|
+
// FORMATTING
|
|
13
|
+
|
|
14
|
+
addFormatToken('s', ['ss', 2], 0, 'second');
|
|
15
|
+
|
|
16
|
+
// PARSING
|
|
17
|
+
|
|
18
|
+
addRegexToken('s', match1to2, match1to2HasZero);
|
|
19
|
+
addRegexToken('ss', match1to2, match2);
|
|
20
|
+
addParseToken(['s', 'ss'], SECOND);
|
|
21
|
+
|
|
22
|
+
// MOMENTS
|
|
23
|
+
|
|
24
|
+
export var getSetSecond = makeGetSet('Seconds', false);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { addFormatToken } from '../format/format';
|
|
2
|
+
import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex';
|
|
3
|
+
import { addParseToken } from '../parse/token';
|
|
4
|
+
import toInt from '../utils/to-int';
|
|
5
|
+
|
|
6
|
+
// FORMATTING
|
|
7
|
+
|
|
8
|
+
addFormatToken('X', 0, 0, 'unix');
|
|
9
|
+
addFormatToken('x', 0, 0, 'valueOf');
|
|
10
|
+
|
|
11
|
+
// PARSING
|
|
12
|
+
|
|
13
|
+
addRegexToken('x', matchSigned);
|
|
14
|
+
addRegexToken('X', matchTimestamp);
|
|
15
|
+
addParseToken('X', function (input, array, config) {
|
|
16
|
+
config._d = new Date(parseFloat(input) * 1000);
|
|
17
|
+
});
|
|
18
|
+
addParseToken('x', function (input, array, config) {
|
|
19
|
+
config._d = new Date(toInt(input));
|
|
20
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { addFormatToken } from '../format/format';
|
|
2
|
+
|
|
3
|
+
// FORMATTING
|
|
4
|
+
|
|
5
|
+
addFormatToken('z', 0, 0, 'zoneAbbr');
|
|
6
|
+
addFormatToken('zz', 0, 0, 'zoneName');
|
|
7
|
+
|
|
8
|
+
// MOMENTS
|
|
9
|
+
|
|
10
|
+
export function getZoneAbbr() {
|
|
11
|
+
return this._isUTC ? 'UTC' : '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function getZoneName() {
|
|
15
|
+
return this._isUTC ? 'Coordinated Universal Time' : '';
|
|
16
|
+
}
|