@azure/arm-postgresql-flexible 8.0.0-beta.1 → 8.0.0-beta.3
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/CHANGELOG.md +293 -2
- package/dist/index.js +134 -115
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/checkMigrationNameAvailabilitySample.js +2 -3
- package/dist-esm/samples-dev/checkMigrationNameAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js +1 -3
- package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js.map +1 -1
- package/dist-esm/samples-dev/migrationsCreateSample.js +43 -3
- package/dist-esm/samples-dev/migrationsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/migrationsDeleteSample.js +2 -3
- package/dist-esm/samples-dev/migrationsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/migrationsGetSample.js +2 -3
- package/dist-esm/samples-dev/migrationsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/migrationsListByTargetServerSample.js +2 -3
- package/dist-esm/samples-dev/migrationsListByTargetServerSample.js.map +1 -1
- package/dist-esm/samples-dev/migrationsUpdateSample.js +23 -4
- package/dist-esm/samples-dev/migrationsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/serversCreateSample.js +2 -2
- package/dist-esm/samples-dev/serversCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/serversUpdateSample.js +2 -2
- package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +60 -49
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +20 -20
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +2 -2
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +34 -10
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/postgreSQLManagementFlexibleServerClient.d.ts +2 -1
- package/dist-esm/src/postgreSQLManagementFlexibleServerClient.d.ts.map +1 -1
- package/dist-esm/src/postgreSQLManagementFlexibleServerClient.js +8 -10
- package/dist-esm/src/postgreSQLManagementFlexibleServerClient.js.map +1 -1
- package/dist-esm/test/postgresql_flexible_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/postgresql_flexible_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/postgresql_flexible_operations_test.spec.js +55 -0
- package/dist-esm/test/postgresql_flexible_operations_test.spec.js.map +1 -0
- package/package.json +12 -18
- package/review/arm-postgresql-flexible.api.md +26 -21
- package/src/models/index.ts +60 -49
- package/src/models/mappers.ts +34 -10
- package/src/postgreSQLManagementFlexibleServerClient.ts +20 -4
- package/types/arm-postgresql-flexible.d.ts +69 -57
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/rollup.config.js +0 -122
|
@@ -273,8 +273,8 @@ export declare interface BackupStoreDetails {
|
|
|
273
273
|
* {@link KnownCancelEnum} can be used interchangeably with CancelEnum,
|
|
274
274
|
* this enum contains the known values that the service supports.
|
|
275
275
|
* ### Known values supported by the service
|
|
276
|
-
* **
|
|
277
|
-
* **
|
|
276
|
+
* **True** \
|
|
277
|
+
* **False**
|
|
278
278
|
*/
|
|
279
279
|
export declare type CancelEnum = string;
|
|
280
280
|
|
|
@@ -799,7 +799,7 @@ export declare interface DbServerMetadata {
|
|
|
799
799
|
/** Storage size in MB for database server */
|
|
800
800
|
storageMb?: number;
|
|
801
801
|
/** SKU for the database server */
|
|
802
|
-
sku?:
|
|
802
|
+
sku?: ServerSku;
|
|
803
803
|
}
|
|
804
804
|
|
|
805
805
|
/** Delegated subnet usage data. */
|
|
@@ -1153,7 +1153,7 @@ export declare interface FlexibleServerEditionCapability extends CapabilityBase
|
|
|
1153
1153
|
* List of supported server SKUs.
|
|
1154
1154
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1155
1155
|
*/
|
|
1156
|
-
readonly supportedServerSkus?:
|
|
1156
|
+
readonly supportedServerSkus?: ServerSkuCapability[];
|
|
1157
1157
|
}
|
|
1158
1158
|
|
|
1159
1159
|
/** Defines headers for FlexibleServer_startLtrBackup operation. */
|
|
@@ -1354,10 +1354,10 @@ export declare enum KnownAzureManagedDiskPerformanceTiers {
|
|
|
1354
1354
|
|
|
1355
1355
|
/** Known values of {@link CancelEnum} that the service accepts. */
|
|
1356
1356
|
export declare enum KnownCancelEnum {
|
|
1357
|
-
/**
|
|
1358
|
-
|
|
1359
|
-
/**
|
|
1360
|
-
|
|
1357
|
+
/** True */
|
|
1358
|
+
True = "True",
|
|
1359
|
+
/** False */
|
|
1360
|
+
False = "False"
|
|
1361
1361
|
}
|
|
1362
1362
|
|
|
1363
1363
|
/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */
|
|
@@ -1502,10 +1502,10 @@ export declare enum KnownKeyStatusEnum {
|
|
|
1502
1502
|
|
|
1503
1503
|
/** Known values of {@link LogicalReplicationOnSourceDbEnum} that the service accepts. */
|
|
1504
1504
|
export declare enum KnownLogicalReplicationOnSourceDbEnum {
|
|
1505
|
-
/**
|
|
1506
|
-
|
|
1507
|
-
/**
|
|
1508
|
-
|
|
1505
|
+
/** True */
|
|
1506
|
+
True = "True",
|
|
1507
|
+
/** False */
|
|
1508
|
+
False = "False"
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
1511
|
/** Known values of {@link MigrationDetailsLevel} that the service accepts. */
|
|
@@ -1606,10 +1606,10 @@ export declare enum KnownOrigin {
|
|
|
1606
1606
|
|
|
1607
1607
|
/** Known values of {@link OverwriteDbsInTargetEnum} that the service accepts. */
|
|
1608
1608
|
export declare enum KnownOverwriteDbsInTargetEnum {
|
|
1609
|
-
/**
|
|
1610
|
-
|
|
1611
|
-
/**
|
|
1612
|
-
|
|
1609
|
+
/** True */
|
|
1610
|
+
True = "True",
|
|
1611
|
+
/** False */
|
|
1612
|
+
False = "False"
|
|
1613
1613
|
}
|
|
1614
1614
|
|
|
1615
1615
|
/** Known values of {@link PasswordAuthEnum} that the service accepts. */
|
|
@@ -1720,10 +1720,10 @@ export declare enum KnownSkuTier {
|
|
|
1720
1720
|
|
|
1721
1721
|
/** Known values of {@link StartDataMigrationEnum} that the service accepts. */
|
|
1722
1722
|
export declare enum KnownStartDataMigrationEnum {
|
|
1723
|
-
/**
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
|
|
1723
|
+
/** True */
|
|
1724
|
+
True = "True",
|
|
1725
|
+
/** False */
|
|
1726
|
+
False = "False"
|
|
1727
1727
|
}
|
|
1728
1728
|
|
|
1729
1729
|
/** Known values of {@link StorageAutoGrow} that the service accepts. */
|
|
@@ -1744,10 +1744,10 @@ export declare enum KnownStorageAutoGrowthSupportedEnum {
|
|
|
1744
1744
|
|
|
1745
1745
|
/** Known values of {@link TriggerCutoverEnum} that the service accepts. */
|
|
1746
1746
|
export declare enum KnownTriggerCutoverEnum {
|
|
1747
|
-
/**
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
|
|
1747
|
+
/** True */
|
|
1748
|
+
True = "True",
|
|
1749
|
+
/** False */
|
|
1750
|
+
False = "False"
|
|
1751
1751
|
}
|
|
1752
1752
|
|
|
1753
1753
|
/** Known values of {@link ZoneRedundantHaAndGeoBackupSupportedEnum} that the service accepts. */
|
|
@@ -1842,8 +1842,8 @@ export declare type LogFilesListByServerResponse = LogFileListResult;
|
|
|
1842
1842
|
* {@link KnownLogicalReplicationOnSourceDbEnum} can be used interchangeably with LogicalReplicationOnSourceDbEnum,
|
|
1843
1843
|
* this enum contains the known values that the service supports.
|
|
1844
1844
|
* ### Known values supported by the service
|
|
1845
|
-
* **
|
|
1846
|
-
* **
|
|
1845
|
+
* **True** \
|
|
1846
|
+
* **False**
|
|
1847
1847
|
*/
|
|
1848
1848
|
export declare type LogicalReplicationOnSourceDbEnum = string;
|
|
1849
1849
|
|
|
@@ -2088,7 +2088,7 @@ export declare interface MigrationResource extends TrackedResource {
|
|
|
2088
2088
|
dbsToMigrate?: string[];
|
|
2089
2089
|
/** Indicates whether to setup LogicalReplicationOnSourceDb, if needed */
|
|
2090
2090
|
setupLogicalReplicationOnSourceDbIfNeeded?: LogicalReplicationOnSourceDbEnum;
|
|
2091
|
-
/** Indicates whether the databases on the target server can be overwritten, if already present. If set to
|
|
2091
|
+
/** Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. */
|
|
2092
2092
|
overwriteDbsInTarget?: OverwriteDbsInTargetEnum;
|
|
2093
2093
|
/** Start time in UTC for migration window */
|
|
2094
2094
|
migrationWindowStartTimeInUtc?: Date;
|
|
@@ -2096,13 +2096,13 @@ export declare interface MigrationResource extends TrackedResource {
|
|
|
2096
2096
|
migrationWindowEndTimeInUtc?: Date;
|
|
2097
2097
|
/** Indicates whether the data migration should start right away */
|
|
2098
2098
|
startDataMigration?: StartDataMigrationEnum;
|
|
2099
|
-
/** To trigger cutover for entire migration we need to send this flag as
|
|
2099
|
+
/** To trigger cutover for entire migration we need to send this flag as True */
|
|
2100
2100
|
triggerCutover?: TriggerCutoverEnum;
|
|
2101
|
-
/** When you want to trigger cutover for specific databases send triggerCutover flag as
|
|
2101
|
+
/** When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array */
|
|
2102
2102
|
dbsToTriggerCutoverOn?: string[];
|
|
2103
|
-
/** To trigger cancel for entire migration we need to send this flag as
|
|
2103
|
+
/** To trigger cancel for entire migration we need to send this flag as True */
|
|
2104
2104
|
cancel?: CancelEnum;
|
|
2105
|
-
/** When you want to trigger cancel for specific databases send cancel flag as
|
|
2105
|
+
/** When you want to trigger cancel for specific databases send cancel flag as True and database names in this array */
|
|
2106
2106
|
dbsToCancelMigrationOn?: string[];
|
|
2107
2107
|
}
|
|
2108
2108
|
|
|
@@ -2124,19 +2124,19 @@ export declare interface MigrationResourceForPatch {
|
|
|
2124
2124
|
dbsToMigrate?: string[];
|
|
2125
2125
|
/** Indicates whether to setup LogicalReplicationOnSourceDb, if needed */
|
|
2126
2126
|
setupLogicalReplicationOnSourceDbIfNeeded?: LogicalReplicationOnSourceDbEnum;
|
|
2127
|
-
/** Indicates whether the databases on the target server can be overwritten, if already present. If set to
|
|
2127
|
+
/** Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. */
|
|
2128
2128
|
overwriteDbsInTarget?: OverwriteDbsInTargetEnum;
|
|
2129
2129
|
/** Start time in UTC for migration window */
|
|
2130
2130
|
migrationWindowStartTimeInUtc?: Date;
|
|
2131
2131
|
/** Indicates whether the data migration should start right away */
|
|
2132
2132
|
startDataMigration?: StartDataMigrationEnum;
|
|
2133
|
-
/** To trigger cutover for entire migration we need to send this flag as
|
|
2133
|
+
/** To trigger cutover for entire migration we need to send this flag as True */
|
|
2134
2134
|
triggerCutover?: TriggerCutoverEnum;
|
|
2135
|
-
/** When you want to trigger cutover for specific databases send triggerCutover flag as
|
|
2135
|
+
/** When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array */
|
|
2136
2136
|
dbsToTriggerCutoverOn?: string[];
|
|
2137
|
-
/** To trigger cancel for entire migration we need to send this flag as
|
|
2137
|
+
/** To trigger cancel for entire migration we need to send this flag as True */
|
|
2138
2138
|
cancel?: CancelEnum;
|
|
2139
|
-
/** When you want to trigger cancel for specific databases send cancel flag as
|
|
2139
|
+
/** When you want to trigger cancel for specific databases send cancel flag as True and database names in this array */
|
|
2140
2140
|
dbsToCancelMigrationOn?: string[];
|
|
2141
2141
|
/** There are two types of migration modes Online and Offline */
|
|
2142
2142
|
migrationMode?: MigrationMode;
|
|
@@ -2222,6 +2222,10 @@ export declare interface MigrationsDeleteOptionalParams extends coreClient.Opera
|
|
|
2222
2222
|
export declare interface MigrationSecretParameters {
|
|
2223
2223
|
/** Admin credentials for source and target servers */
|
|
2224
2224
|
adminCredentials: AdminCredentials;
|
|
2225
|
+
/** Gets or sets the username for the source server. This user need not be an admin. */
|
|
2226
|
+
sourceServerUsername?: string;
|
|
2227
|
+
/** Gets or sets the username for the target server. This user need not be an admin. */
|
|
2228
|
+
targetServerUsername?: string;
|
|
2225
2229
|
}
|
|
2226
2230
|
|
|
2227
2231
|
/** Optional parameters. */
|
|
@@ -2327,16 +2331,16 @@ export declare interface NameAvailability extends CheckNameAvailabilityResponse
|
|
|
2327
2331
|
readonly type?: string;
|
|
2328
2332
|
}
|
|
2329
2333
|
|
|
2330
|
-
/** Network properties of a server */
|
|
2334
|
+
/** Network properties of a server. */
|
|
2331
2335
|
export declare interface Network {
|
|
2332
2336
|
/**
|
|
2333
2337
|
* public network access is enabled or not
|
|
2334
2338
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
2335
2339
|
*/
|
|
2336
2340
|
readonly publicNetworkAccess?: ServerPublicNetworkAccessState;
|
|
2337
|
-
/**
|
|
2341
|
+
/** Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. */
|
|
2338
2342
|
delegatedSubnetResourceId?: string;
|
|
2339
|
-
/**
|
|
2343
|
+
/** Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. */
|
|
2340
2344
|
privateDnsZoneArmResourceId?: string;
|
|
2341
2345
|
}
|
|
2342
2346
|
|
|
@@ -2454,8 +2458,8 @@ export declare type Origin = string;
|
|
|
2454
2458
|
* {@link KnownOverwriteDbsInTargetEnum} can be used interchangeably with OverwriteDbsInTargetEnum,
|
|
2455
2459
|
* this enum contains the known values that the service supports.
|
|
2456
2460
|
* ### Known values supported by the service
|
|
2457
|
-
* **
|
|
2458
|
-
* **
|
|
2461
|
+
* **True** \
|
|
2462
|
+
* **False**
|
|
2459
2463
|
*/
|
|
2460
2464
|
export declare type OverwriteDbsInTargetEnum = string;
|
|
2461
2465
|
|
|
@@ -2471,7 +2475,7 @@ export declare type PasswordAuthEnum = string;
|
|
|
2471
2475
|
|
|
2472
2476
|
export declare class PostgreSQLManagementFlexibleServerClient extends coreClient.ServiceClient {
|
|
2473
2477
|
$host: string;
|
|
2474
|
-
subscriptionId
|
|
2478
|
+
subscriptionId?: string;
|
|
2475
2479
|
apiVersion: string;
|
|
2476
2480
|
/**
|
|
2477
2481
|
* Initializes a new instance of the PostgreSQLManagementFlexibleServerClient class.
|
|
@@ -2480,6 +2484,7 @@ export declare class PostgreSQLManagementFlexibleServerClient extends coreClient
|
|
|
2480
2484
|
* @param options The parameter options
|
|
2481
2485
|
*/
|
|
2482
2486
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PostgreSQLManagementFlexibleServerClientOptionalParams);
|
|
2487
|
+
constructor(credentials: coreAuth.TokenCredential, options?: PostgreSQLManagementFlexibleServerClientOptionalParams);
|
|
2483
2488
|
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
2484
2489
|
private addCustomApiVersionPolicy;
|
|
2485
2490
|
/**
|
|
@@ -2647,7 +2652,7 @@ export declare interface Server extends TrackedResource {
|
|
|
2647
2652
|
dataEncryption?: DataEncryption;
|
|
2648
2653
|
/** Backup properties of a server. */
|
|
2649
2654
|
backup?: Backup;
|
|
2650
|
-
/** Network properties of a server. */
|
|
2655
|
+
/** Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server. */
|
|
2651
2656
|
network?: Network;
|
|
2652
2657
|
/** High availability properties of a server. */
|
|
2653
2658
|
highAvailability?: HighAvailability;
|
|
@@ -2746,6 +2751,8 @@ export declare interface ServerForUpdate {
|
|
|
2746
2751
|
createMode?: CreateModeForUpdate;
|
|
2747
2752
|
/** Replication role of the server */
|
|
2748
2753
|
replicationRole?: ReplicationRole;
|
|
2754
|
+
/** Network properties of a server. These are required to be passed only in case if server is a private access server. */
|
|
2755
|
+
network?: Network;
|
|
2749
2756
|
}
|
|
2750
2757
|
|
|
2751
2758
|
/**
|
|
@@ -2928,8 +2935,16 @@ export declare interface ServersGetOptionalParams extends coreClient.OperationOp
|
|
|
2928
2935
|
/** Contains response data for the get operation. */
|
|
2929
2936
|
export declare type ServersGetResponse = Server;
|
|
2930
2937
|
|
|
2938
|
+
/** Sku information related properties of a server. */
|
|
2939
|
+
export declare interface ServerSku {
|
|
2940
|
+
/** The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. */
|
|
2941
|
+
name: string;
|
|
2942
|
+
/** The tier of the particular SKU, e.g. Burstable. */
|
|
2943
|
+
tier: SkuTier;
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2931
2946
|
/** Sku capability */
|
|
2932
|
-
export declare interface
|
|
2947
|
+
export declare interface ServerSkuCapability extends CapabilityBase {
|
|
2933
2948
|
/**
|
|
2934
2949
|
* Sku name
|
|
2935
2950
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
@@ -2962,14 +2977,6 @@ export declare interface ServerSku extends CapabilityBase {
|
|
|
2962
2977
|
readonly supportedHaMode?: HaMode[];
|
|
2963
2978
|
}
|
|
2964
2979
|
|
|
2965
|
-
/** Sku information related properties of a server. */
|
|
2966
|
-
export declare interface ServerSkuAutoGenerated {
|
|
2967
|
-
/** The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. */
|
|
2968
|
-
name: string;
|
|
2969
|
-
/** The tier of the particular SKU, e.g. Burstable. */
|
|
2970
|
-
tier: SkuTier;
|
|
2971
|
-
}
|
|
2972
|
-
|
|
2973
2980
|
/** Optional parameters. */
|
|
2974
2981
|
export declare interface ServersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
|
|
2975
2982
|
}
|
|
@@ -3121,8 +3128,8 @@ export declare type SkuTier = string;
|
|
|
3121
3128
|
* {@link KnownStartDataMigrationEnum} can be used interchangeably with StartDataMigrationEnum,
|
|
3122
3129
|
* this enum contains the known values that the service supports.
|
|
3123
3130
|
* ### Known values supported by the service
|
|
3124
|
-
* **
|
|
3125
|
-
* **
|
|
3131
|
+
* **True** \
|
|
3132
|
+
* **False**
|
|
3126
3133
|
*/
|
|
3127
3134
|
export declare type StartDataMigrationEnum = string;
|
|
3128
3135
|
|
|
@@ -3133,7 +3140,7 @@ declare interface Storage_2 {
|
|
|
3133
3140
|
/** Flag to enable / disable Storage Auto grow for flexible server. */
|
|
3134
3141
|
autoGrow?: StorageAutoGrow;
|
|
3135
3142
|
/** Name of storage tier for IOPS. */
|
|
3136
|
-
|
|
3143
|
+
tier?: AzureManagedDiskPerformanceTiers;
|
|
3137
3144
|
/**
|
|
3138
3145
|
* Storage tier IOPS quantity.
|
|
3139
3146
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
@@ -3250,8 +3257,8 @@ export declare interface TrackedResource extends Resource {
|
|
|
3250
3257
|
* {@link KnownTriggerCutoverEnum} can be used interchangeably with TriggerCutoverEnum,
|
|
3251
3258
|
* this enum contains the known values that the service supports.
|
|
3252
3259
|
* ### Known values supported by the service
|
|
3253
|
-
* **
|
|
3254
|
-
* **
|
|
3260
|
+
* **True** \
|
|
3261
|
+
* **False**
|
|
3255
3262
|
*/
|
|
3256
3263
|
export declare type TriggerCutoverEnum = string;
|
|
3257
3264
|
|
|
@@ -3263,6 +3270,11 @@ export declare interface UserAssignedIdentity {
|
|
|
3263
3270
|
};
|
|
3264
3271
|
/** the types of identities associated with this resource; currently restricted to 'None and UserAssigned' */
|
|
3265
3272
|
type: IdentityType;
|
|
3273
|
+
/**
|
|
3274
|
+
* Tenant id of the server.
|
|
3275
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
3276
|
+
*/
|
|
3277
|
+
readonly tenantId?: string;
|
|
3266
3278
|
}
|
|
3267
3279
|
|
|
3268
3280
|
/** Describes a single user-assigned identity associated with the application. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.d.ts","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":""}
|
|
@@ -1,38 +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
|
-
import { __awaiter } from "tslib";
|
|
9
|
-
import { Recorder } from "@azure-tools/test-recorder";
|
|
10
|
-
const replaceableVariables = {
|
|
11
|
-
AZURE_CLIENT_ID: "azure_client_id",
|
|
12
|
-
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
13
|
-
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
14
|
-
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
15
|
-
};
|
|
16
|
-
const recorderOptions = {
|
|
17
|
-
envSetupForPlayback: replaceableVariables
|
|
18
|
-
};
|
|
19
|
-
describe("My test", () => {
|
|
20
|
-
let recorder;
|
|
21
|
-
beforeEach(function () {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
recorder = new Recorder(this.currentTest);
|
|
24
|
-
yield recorder.start(recorderOptions);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
afterEach(function () {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
yield recorder.stop();
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
it("sample test", function () {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
console.log("Hi, I'm a test!");
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=sampleTest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
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"));
|