Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'

- name: Install pnpm
run: npm install -g pnpm
Expand Down
121 changes: 115 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@azure/app-configuration-importer-file-source",
"author": "Microsoft Corporation",
"description": "A client library for importing/exporting key-values between configuration file sources and Azure App Configuration service",
"version": "3.0.1-preview",
"version": "3.0.2-preview",
"sdk-type": "client",
"keywords": [
"node",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@azure/app-configuration": "^1.9.0",
"@azure/app-configuration-importer": "3.0.1-preview"
"@azure/app-configuration-importer": "3.0.2-preview"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.22.2",
Expand Down
4 changes: 2 additions & 2 deletions libraries/azure-app-configuration-importer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@azure/app-configuration-importer",
"author": "Microsoft Corporation",
"description": "A client library for importing/exporting key-values between configuration sources and Azure App Configuration service",
"version": "3.0.1-preview",
"version": "3.0.2-preview",
"sdk-type": "client",
"keywords": [
"node",
Expand Down Expand Up @@ -35,7 +35,7 @@
"clean": "rimraf dist dist-* types *.tgz *.log"
},
"dependencies": {
"@azure/app-configuration": "^1.9.0",
"@azure/app-configuration": "^1.12.1",
"@azure/core-client": "^1.9.2",
"@azure/core-paging": "^1.4.0",
"@azure/core-rest-pipeline": "^1.6.0",
Comment thread
MaryanneNjeri marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class KvSetConfigurationSettingsConverter implements ConfigurationSetting
key: element.key,
value: element.value,
label: element.label,
description: element.description,
Comment thread
ChristineWanjau marked this conversation as resolved.
contentType: element.content_type,
tags: element.tags
});
Expand All @@ -60,6 +61,9 @@ export class KvSetConfigurationSettingsConverter implements ConfigurationSetting
if (element.value && typeof element.value !== "string") {
throw new ArgumentError(`The 'value' for the key '${element.key}' is not a string.`);
}
if (element.description && typeof element.description !== "string") {
throw new ArgumentError(`The 'description' for the key '${element.key}' is not a string.`);
}
if (element.content_type && typeof element.content_type !== "string") {
throw new ArgumentError(`The 'content_type' for the key '${element.key}' is not a string.`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function isConfigSettingEqual(settingA: SetConfigurationSettingParam<stri
settingB.contentType == featureFlagContentType &&
settingA.value !== undefined &&
settingB.value !== undefined) {
Comment thread
ChristineWanjau marked this conversation as resolved.
valueIsEqual = isFeatureFlagValueEqual(settingA.value as string | FeatureFlagValue, settingB.value);
valueIsEqual = isFeatureFlagValueEqual(settingA.value as string | MsFeatureFlagValue, settingB.value);
Comment thread
ChristineWanjau marked this conversation as resolved.
}

return valueIsEqual &&
Expand Down
1 change: 1 addition & 0 deletions libraries/azure-app-configuration-importer/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type KvSetConfigurationItem = {
key: string;
value?: string;
label?: string;
description?: string;
content_type?: string;
tags?: { [propertyName: string]: string };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export class IterableConfigurationSettingsSource implements ConfigurationSetting
result.push({
key: generatedKey,
label: this.options.label || configuration.label,
description: configuration.description,
value: configuration.value,
contentType: contentType,
tags: configuration.tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ describe("Iterator configuration source test", () => {
assert.equal(configurationSettings[0].key, "testPrefixapp:Settings:FontSize");
assert.equal(configurationSettings[0].label, "TestLabel");
assert.equal(configurationSettings[0].contentType, "text");
assert.equal(configurationSettings[0].description, "");
assert.equal(configurationSettings[1].key, "testPrefixapp:Settings:BackgroundColor");
assert.equal(configurationSettings[1].label, "TestLabel");
assert.equal(configurationSettings[1].description, "This is description");
assert.equal(configurationSettings[1].contentType, "text");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ describe("Parse kvset format file", () => {
assert.equal(configurationSettings[1].key, "Database:ConnectionString");
assert.equal(configurationSettings[1].contentType, secretReferenceContentType);
assert.equal(configurationSettings[1].label, "test");
assert.equal(configurationSettings[1].description, "DB connection string");
const secret = JSON.parse(configurationSettings[1].value as string) as JsonSecretReferenceValue;
assert.equal(secret.uri, "https://keyvault.vault.azure.net/secrets/db-secret");

assert.equal(configurationSettings[2].key, "TestEnv");
assert.equal(configurationSettings[2].value, "Debug");
assert.equal(configurationSettings[2].description, "");
assert.equal(configurationSettings[2].contentType, null);
assert.equal(configurationSettings[2].label, "dev");
assert.equal(JSON.stringify(configurationSettings[2].tags), "{\"tag1\":\"value1\",\"tag2\":\"value2\"}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
"key": "Database:ConnectionString",
"value": "{\"uri\":\"https://keyvault.vault.azure.net/secrets/db-secret\"}",
"label": "test",
"description": "DB connection string",
"content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8",
"tags": {}
},
{
"key": "TestEnv",
"value": "Debug",
"label": "dev",
"description": "",
"content_type": null,
"tags": {
"tag1": "value1",
Expand Down
6 changes: 6 additions & 0 deletions libraries/azure-app-configuration-importer/tests/utlis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const items: ConfigurationSetting[] = [
key: "app:Settings:FontSize",
label: "Dev",
contentType: undefined,
description: "",
value: "45",
lastModified: undefined,
etag: "",
Expand All @@ -22,6 +23,7 @@ const items: ConfigurationSetting[] = [
label: "Dev",
contentType: undefined,
value: "yellow",
description: "This is description",
lastModified: undefined,
tags: {},
etag: "",
Expand All @@ -32,6 +34,7 @@ const items: ConfigurationSetting[] = [
label: "Dev",
contentType: undefined,
value: "yellow",
description: "Font color description",
lastModified: undefined,
tags: {
tag1: "value1",
Expand All @@ -46,6 +49,7 @@ const items: ConfigurationSetting[] = [
contentType: "application/vnd.microsoft.appconfig.ff+json;charset=utf-8",
value: "{\"id\":\"Test\",\"description\":\"Test feature\",\"enabled\":true,\"conditions\":{\"client_filters\":[]}}",
lastModified: undefined,
description: undefined,
tags: {},
etag: "",
isReadOnly: false
Expand All @@ -54,6 +58,7 @@ const items: ConfigurationSetting[] = [
key: "TestEnv",
label: "dev",
contentType: undefined,
description: "",
value: "Debug",
lastModified: undefined,
tags: {
Expand All @@ -68,6 +73,7 @@ const items: ConfigurationSetting[] = [
label: "test",
contentType: "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8",
value: "{\"uri\":\"https://keyvault.vault.azure.net/secrets/db-secret\"}",
description: "DB connection string",
lastModified: undefined,
etag: "",
isReadOnly: false
Expand Down
2 changes: 1 addition & 1 deletion rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* LTS schedule: https://nodejs.org/en/about/releases/
* LTS versions: https://nodejs.org/en/download/releases/
*/
"nodeSupportedVersionRange": ">=14.15.0 <15.0.0 || >=16.13.0 <17.0.0 || >=18.15.0 <19.0.0",
"nodeSupportedVersionRange": ">=14.15.0 <15.0.0 || >=16.13.0 <17.0.0 || >=18.15.0 <19.0.0 || >=20.14.0",

/**
* If the version check above fails, Rush will display a message showing the current
Expand Down
Loading