@azure/arm-rediscache 8.0.0 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/CHANGELOG.md +21 -10
  2. package/LICENSE +1 -1
  3. package/dist/index.js +1195 -1218
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/accessPolicyAssignmentCreateUpdateSample.js +3 -3
  8. package/dist-esm/samples-dev/accessPolicyAssignmentCreateUpdateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/accessPolicyAssignmentDeleteSample.js +1 -1
  10. package/dist-esm/samples-dev/accessPolicyAssignmentGetSample.js +1 -1
  11. package/dist-esm/samples-dev/accessPolicyAssignmentListSample.js +5 -10
  12. package/dist-esm/samples-dev/accessPolicyAssignmentListSample.js.map +1 -1
  13. package/dist-esm/samples-dev/accessPolicyCreateUpdateSample.js +2 -2
  14. package/dist-esm/samples-dev/accessPolicyCreateUpdateSample.js.map +1 -1
  15. package/dist-esm/samples-dev/accessPolicyDeleteSample.js +1 -1
  16. package/dist-esm/samples-dev/accessPolicyGetSample.js +1 -1
  17. package/dist-esm/samples-dev/accessPolicyListSample.js +5 -10
  18. package/dist-esm/samples-dev/accessPolicyListSample.js.map +1 -1
  19. package/dist-esm/samples-dev/asyncOperationStatusGetSample.js +1 -1
  20. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js +3 -3
  21. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js.map +1 -1
  22. package/dist-esm/samples-dev/firewallRulesDeleteSample.js +1 -1
  23. package/dist-esm/samples-dev/firewallRulesGetSample.js +1 -1
  24. package/dist-esm/samples-dev/firewallRulesListSample.js +5 -10
  25. package/dist-esm/samples-dev/firewallRulesListSample.js.map +1 -1
  26. package/dist-esm/samples-dev/linkedServerCreateSample.js +3 -3
  27. package/dist-esm/samples-dev/linkedServerCreateSample.js.map +1 -1
  28. package/dist-esm/samples-dev/linkedServerDeleteSample.js +1 -1
  29. package/dist-esm/samples-dev/linkedServerGetSample.js +1 -1
  30. package/dist-esm/samples-dev/linkedServerListSample.js +5 -10
  31. package/dist-esm/samples-dev/linkedServerListSample.js.map +1 -1
  32. package/dist-esm/samples-dev/operationsListSample.js +5 -10
  33. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  34. package/dist-esm/samples-dev/patchSchedulesCreateOrUpdateSample.js +4 -4
  35. package/dist-esm/samples-dev/patchSchedulesCreateOrUpdateSample.js.map +1 -1
  36. package/dist-esm/samples-dev/patchSchedulesDeleteSample.js +1 -1
  37. package/dist-esm/samples-dev/patchSchedulesGetSample.js +1 -1
  38. package/dist-esm/samples-dev/patchSchedulesListByRedisResourceSample.js +5 -10
  39. package/dist-esm/samples-dev/patchSchedulesListByRedisResourceSample.js.map +1 -1
  40. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  41. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  42. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +5 -10
  43. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
  44. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +4 -4
  45. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -1
  46. package/dist-esm/samples-dev/privateLinkResourcesListByRedisCacheSample.js +5 -10
  47. package/dist-esm/samples-dev/privateLinkResourcesListByRedisCacheSample.js.map +1 -1
  48. package/dist-esm/samples-dev/redisCheckNameAvailabilitySample.js +3 -3
  49. package/dist-esm/samples-dev/redisCheckNameAvailabilitySample.js.map +1 -1
  50. package/dist-esm/samples-dev/redisCreateSample.js +7 -7
  51. package/dist-esm/samples-dev/redisCreateSample.js.map +1 -1
  52. package/dist-esm/samples-dev/redisDeleteSample.js +1 -1
  53. package/dist-esm/samples-dev/redisExportDataSample.js +3 -3
  54. package/dist-esm/samples-dev/redisExportDataSample.js.map +1 -1
  55. package/dist-esm/samples-dev/redisFlushCacheSample.js +1 -1
  56. package/dist-esm/samples-dev/redisForceRebootSample.js +3 -3
  57. package/dist-esm/samples-dev/redisForceRebootSample.js.map +1 -1
  58. package/dist-esm/samples-dev/redisGetSample.js +1 -1
  59. package/dist-esm/samples-dev/redisImportDataSample.js +3 -3
  60. package/dist-esm/samples-dev/redisImportDataSample.js.map +1 -1
  61. package/dist-esm/samples-dev/redisListByResourceGroupSample.js +5 -10
  62. package/dist-esm/samples-dev/redisListByResourceGroupSample.js.map +1 -1
  63. package/dist-esm/samples-dev/redisListBySubscriptionSample.js +5 -10
  64. package/dist-esm/samples-dev/redisListBySubscriptionSample.js.map +1 -1
  65. package/dist-esm/samples-dev/redisListKeysSample.js +1 -1
  66. package/dist-esm/samples-dev/redisListUpgradeNotificationsSample.js +5 -10
  67. package/dist-esm/samples-dev/redisListUpgradeNotificationsSample.js.map +1 -1
  68. package/dist-esm/samples-dev/redisRegenerateKeySample.js +2 -2
  69. package/dist-esm/samples-dev/redisRegenerateKeySample.js.map +1 -1
  70. package/dist-esm/samples-dev/redisUpdateSample.js +3 -3
  71. package/dist-esm/samples-dev/redisUpdateSample.js.map +1 -1
  72. package/dist-esm/src/lroImpl.js +1 -1
  73. package/dist-esm/src/models/index.d.ts +15 -5
  74. package/dist-esm/src/models/index.d.ts.map +1 -1
  75. package/dist-esm/src/models/index.js.map +1 -1
  76. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  77. package/dist-esm/src/models/mappers.js +700 -667
  78. package/dist-esm/src/models/mappers.js.map +1 -1
  79. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  80. package/dist-esm/src/models/parameters.js +75 -75
  81. package/dist-esm/src/models/parameters.js.map +1 -1
  82. package/dist-esm/src/operations/accessPolicy.d.ts.map +1 -1
  83. package/dist-esm/src/operations/accessPolicy.js +41 -46
  84. package/dist-esm/src/operations/accessPolicy.js.map +1 -1
  85. package/dist-esm/src/operations/accessPolicyAssignment.d.ts.map +1 -1
  86. package/dist-esm/src/operations/accessPolicyAssignment.js +42 -47
  87. package/dist-esm/src/operations/accessPolicyAssignment.js.map +1 -1
  88. package/dist-esm/src/operations/asyncOperationStatus.js +5 -5
  89. package/dist-esm/src/operations/asyncOperationStatus.js.map +1 -1
  90. package/dist-esm/src/operations/firewallRules.js +29 -34
  91. package/dist-esm/src/operations/firewallRules.js.map +1 -1
  92. package/dist-esm/src/operations/linkedServer.d.ts.map +1 -1
  93. package/dist-esm/src/operations/linkedServer.js +40 -45
  94. package/dist-esm/src/operations/linkedServer.js.map +1 -1
  95. package/dist-esm/src/operations/operations.js +12 -17
  96. package/dist-esm/src/operations/operations.js.map +1 -1
  97. package/dist-esm/src/operations/patchSchedules.js +29 -34
  98. package/dist-esm/src/operations/patchSchedules.js.map +1 -1
  99. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  100. package/dist-esm/src/operations/privateEndpointConnections.js +32 -37
  101. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  102. package/dist-esm/src/operations/privateLinkResources.js +9 -14
  103. package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
  104. package/dist-esm/src/operations/redis.d.ts.map +1 -1
  105. package/dist-esm/src/operations/redis.js +125 -140
  106. package/dist-esm/src/operations/redis.js.map +1 -1
  107. package/dist-esm/src/pagingHelper.js.map +1 -1
  108. package/dist-esm/src/redisManagementClient.d.ts.map +1 -1
  109. package/dist-esm/src/redisManagementClient.js +9 -9
  110. package/dist-esm/src/redisManagementClient.js.map +1 -1
  111. package/dist-esm/test/redis_examples.d.ts.map +1 -1
  112. package/dist-esm/test/redis_examples.js +47 -51
  113. package/dist-esm/test/redis_examples.js.map +1 -1
  114. package/package.json +19 -25
  115. package/review/arm-rediscache.api.md +5 -0
  116. package/src/lroImpl.ts +3 -3
  117. package/src/models/index.ts +47 -28
  118. package/src/models/mappers.ts +819 -783
  119. package/src/models/parameters.ts +79 -77
  120. package/src/operations/accessPolicy.ts +75 -81
  121. package/src/operations/accessPolicyAssignment.ts +76 -82
  122. package/src/operations/asyncOperationStatus.ts +9 -10
  123. package/src/operations/firewallRules.ts +47 -51
  124. package/src/operations/linkedServer.ts +73 -79
  125. package/src/operations/operations.ts +16 -16
  126. package/src/operations/patchSchedules.ts +49 -53
  127. package/src/operations/privateEndpointConnections.ts +57 -61
  128. package/src/operations/privateLinkResources.ts +17 -18
  129. package/src/operations/redis.ts +228 -247
  130. package/src/operationsInterfaces/accessPolicy.ts +7 -7
  131. package/src/operationsInterfaces/accessPolicyAssignment.ts +7 -7
  132. package/src/operationsInterfaces/asyncOperationStatus.ts +2 -2
  133. package/src/operationsInterfaces/firewallRules.ts +5 -5
  134. package/src/operationsInterfaces/linkedServer.ts +7 -7
  135. package/src/operationsInterfaces/operations.ts +1 -1
  136. package/src/operationsInterfaces/patchSchedules.ts +5 -5
  137. package/src/operationsInterfaces/privateEndpointConnections.ts +6 -6
  138. package/src/operationsInterfaces/privateLinkResources.ts +2 -2
  139. package/src/operationsInterfaces/redis.ts +21 -21
  140. package/src/pagingHelper.ts +1 -1
  141. package/src/redisManagementClient.ts +18 -17
  142. package/types/arm-rediscache.d.ts +15 -5
  143. package/types/tsdoc-metadata.json +1 -1
  144. package/rollup.config.js +0 -122
@@ -1336,7 +1336,7 @@ export declare interface RedisCheckNameAvailabilityOptionalParams extends coreCl
1336
1336
 
1337
1337
  /** Create/Update/Get common properties of the redis cache. */
1338
1338
  export declare interface RedisCommonProperties {
1339
- /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */
1339
+ /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. */
1340
1340
  redisConfiguration?: RedisCommonPropertiesRedisConfiguration;
1341
1341
  /** Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. */
1342
1342
  redisVersion?: string;
@@ -1358,9 +1358,11 @@ export declare interface RedisCommonProperties {
1358
1358
  publicNetworkAccess?: PublicNetworkAccess;
1359
1359
  /** Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. */
1360
1360
  updateChannel?: UpdateChannel;
1361
+ /** Authentication to Redis through access keys is disabled when set as true. Default value is false. */
1362
+ disableAccessKeyAuthentication?: boolean;
1361
1363
  }
1362
1364
 
1363
- /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */
1365
+ /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. */
1364
1366
  export declare interface RedisCommonPropertiesRedisConfiguration {
1365
1367
  /** Describes unknown properties. The value of an unknown property can be of "any" type. */
1366
1368
  [property: string]: any;
@@ -1391,6 +1393,8 @@ export declare interface RedisCommonPropertiesRedisConfiguration {
1391
1393
  * NOTE: This property will not be serialized. It can only be populated by the server.
1392
1394
  */
1393
1395
  readonly maxclients?: string;
1396
+ /** The keyspace events which should be monitored. */
1397
+ notifyKeyspaceEvents?: string;
1394
1398
  /**
1395
1399
  * Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS
1396
1400
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -1431,7 +1435,7 @@ export declare interface RedisCreateParameters {
1431
1435
  };
1432
1436
  /** The identity of the resource. */
1433
1437
  identity?: ManagedServiceIdentity;
1434
- /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */
1438
+ /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. */
1435
1439
  redisConfiguration?: RedisCommonPropertiesRedisConfiguration;
1436
1440
  /** Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. */
1437
1441
  redisVersion?: string;
@@ -1453,6 +1457,8 @@ export declare interface RedisCreateParameters {
1453
1457
  publicNetworkAccess?: PublicNetworkAccess;
1454
1458
  /** Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. */
1455
1459
  updateChannel?: UpdateChannel;
1460
+ /** Authentication to Redis through access keys is disabled when set as true. Default value is false. */
1461
+ disableAccessKeyAuthentication?: boolean;
1456
1462
  /** The SKU of the Redis cache to deploy. */
1457
1463
  sku: Sku;
1458
1464
  /** The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 */
@@ -1884,7 +1890,7 @@ export declare interface RedisResource extends TrackedResource {
1884
1890
  zones?: string[];
1885
1891
  /** The identity of the resource. */
1886
1892
  identity?: ManagedServiceIdentity;
1887
- /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */
1893
+ /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. */
1888
1894
  redisConfiguration?: RedisCommonPropertiesRedisConfiguration;
1889
1895
  /** Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. */
1890
1896
  redisVersion?: string;
@@ -1906,6 +1912,8 @@ export declare interface RedisResource extends TrackedResource {
1906
1912
  publicNetworkAccess?: PublicNetworkAccess;
1907
1913
  /** Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. */
1908
1914
  updateChannel?: UpdateChannel;
1915
+ /** Authentication to Redis through access keys is disabled when set as true. Default value is false. */
1916
+ disableAccessKeyAuthentication?: boolean;
1909
1917
  /** The SKU of the Redis cache to deploy. */
1910
1918
  sku: Sku;
1911
1919
  /** The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 */
@@ -1970,7 +1978,7 @@ export declare interface RedisUpdateParameters {
1970
1978
  };
1971
1979
  /** The identity of the resource. */
1972
1980
  identity?: ManagedServiceIdentity;
1973
- /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. */
1981
+ /** All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. */
1974
1982
  redisConfiguration?: RedisCommonPropertiesRedisConfiguration;
1975
1983
  /** Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. */
1976
1984
  redisVersion?: string;
@@ -1992,6 +2000,8 @@ export declare interface RedisUpdateParameters {
1992
2000
  publicNetworkAccess?: PublicNetworkAccess;
1993
2001
  /** Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. */
1994
2002
  updateChannel?: UpdateChannel;
2003
+ /** Authentication to Redis through access keys is disabled when set as true. Default value is false. */
2004
+ disableAccessKeyAuthentication?: boolean;
1995
2005
  /** The SKU of the Redis cache to deploy. */
1996
2006
  sku?: Sku;
1997
2007
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.36.4"
8
+ "packageVersion": "7.47.1"
9
9
  }
10
10
  ]
11
11
  }
package/rollup.config.js DELETED
@@ -1,122 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
-
9
- import nodeResolve from "@rollup/plugin-node-resolve";
10
- import cjs from "@rollup/plugin-commonjs";
11
- import sourcemaps from "rollup-plugin-sourcemaps";
12
- import multiEntry from "@rollup/plugin-multi-entry";
13
- import json from "@rollup/plugin-json";
14
-
15
- import nodeBuiltins from "builtin-modules";
16
-
17
- // #region Warning Handler
18
-
19
- /**
20
- * A function that can determine whether a rollup warning should be ignored. If
21
- * the function returns `true`, then the warning will not be displayed.
22
- */
23
-
24
- function ignoreNiseSinonEval(warning) {
25
- return (
26
- warning.code === "EVAL" &&
27
- warning.id &&
28
- (warning.id.includes("node_modules/nise") ||
29
- warning.id.includes("node_modules/sinon")) === true
30
- );
31
- }
32
-
33
- function ignoreChaiCircularDependency(warning) {
34
- return (
35
- warning.code === "CIRCULAR_DEPENDENCY" &&
36
- warning.importer && warning.importer.includes("node_modules/chai") === true
37
- );
38
- }
39
-
40
- const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
41
-
42
- /**
43
- * Construct a warning handler for the shared rollup configuration
44
- * that ignores certain warnings that are not relevant to testing.
45
- */
46
- function makeOnWarnForTesting() {
47
- return (warning, warn) => {
48
- // If every inhibitor returns false (i.e. no inhibitors), then show the warning
49
- if (warningInhibitors.every((inhib) => !inhib(warning))) {
50
- warn(warning);
51
- }
52
- };
53
- }
54
-
55
- // #endregion
56
-
57
- function makeBrowserTestConfig() {
58
- const config = {
59
- input: {
60
- include: ["dist-esm/test/**/*.spec.js"],
61
- exclude: ["dist-esm/test/**/node/**"]
62
- },
63
- output: {
64
- file: `dist-test/index.browser.js`,
65
- format: "umd",
66
- sourcemap: true
67
- },
68
- preserveSymlinks: false,
69
- plugins: [
70
- multiEntry({ exports: false }),
71
- nodeResolve({
72
- mainFields: ["module", "browser"]
73
- }),
74
- cjs(),
75
- json(),
76
- sourcemaps()
77
- //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
78
- ],
79
- onwarn: makeOnWarnForTesting(),
80
- // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
81
- // rollup started respecting the "sideEffects" field in package.json. Since
82
- // our package.json sets "sideEffects=false", this also applies to test
83
- // code, which causes all tests to be removed by tree-shaking.
84
- treeshake: false
85
- };
86
-
87
- return config;
88
- }
89
-
90
- const defaultConfigurationOptions = {
91
- disableBrowserBundle: false
92
- };
93
-
94
- export function makeConfig(pkg, options) {
95
- options = {
96
- ...defaultConfigurationOptions,
97
- ...(options || {})
98
- };
99
-
100
- const baseConfig = {
101
- // Use the package's module field if it has one
102
- input: pkg["module"] || "dist-esm/src/index.js",
103
- external: [
104
- ...nodeBuiltins,
105
- ...Object.keys(pkg.dependencies),
106
- ...Object.keys(pkg.devDependencies)
107
- ],
108
- output: { file: "dist/index.js", format: "cjs", sourcemap: true },
109
- preserveSymlinks: false,
110
- plugins: [sourcemaps(), nodeResolve()]
111
- };
112
-
113
- const config = [baseConfig];
114
-
115
- if (!options.disableBrowserBundle) {
116
- config.push(makeBrowserTestConfig());
117
- }
118
-
119
- return config;
120
- }
121
-
122
- export default makeConfig(require("./package.json"));