@myvitalrx/metadata-runtime 1.20.3 → 1.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.d.ts +276 -165
- package/dist/index.js +618 -102
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createHash } from 'crypto';
|
|
3
|
-
import { createLogger, createOperationalLogger, createPerformanceTimer, getContext } from '@
|
|
3
|
+
import { createLogger, createOperationalLogger, createPerformanceTimer, getContext } from '@myvitalrx/observability';
|
|
4
4
|
import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3';
|
|
5
5
|
|
|
6
6
|
// ../../libs/runtime-metadata/src/lib/constants/RuntimeMetadataConstants.ts
|
|
@@ -60,7 +60,10 @@ var RUNTIME_METADATA_EVENTS = {
|
|
|
60
60
|
FRESHNESS_REJECTED: "runtimeMetadata.freshness.rejected",
|
|
61
61
|
PROVIDER_SELECTED: "runtimeMetadata.provider.selected",
|
|
62
62
|
PROVIDER_FALLBACK: "runtimeMetadata.provider.fallback",
|
|
63
|
-
PROVIDER_RECOVERED: "runtimeMetadata.provider.recovered"
|
|
63
|
+
PROVIDER_RECOVERED: "runtimeMetadata.provider.recovered",
|
|
64
|
+
LOCALIZATION_ENSURE_START: "runtimeMetadata.localization.ensure.start",
|
|
65
|
+
LOCALIZATION_ENSURE_COMPLETE: "runtimeMetadata.localization.ensure.complete",
|
|
66
|
+
LOCALIZATION_ENSURE_FAILED: "runtimeMetadata.localization.ensure.failed"
|
|
64
67
|
};
|
|
65
68
|
|
|
66
69
|
// ../../libs/metadata-projection/src/lib/constants/ProjectionConstants.ts
|
|
@@ -68,8 +71,13 @@ var PROJECTION_SCHEMA_VERSION = 2;
|
|
|
68
71
|
var PROJECTION_VERSION = "1.0";
|
|
69
72
|
var DEFAULT_STORAGE_PREFIX = "metadata-projections";
|
|
70
73
|
var PERMISSION_REGISTRY_FILE_NAME = "permission-registry.json";
|
|
71
|
-
var
|
|
72
|
-
|
|
74
|
+
var PUBLICATION_STATUS = {
|
|
75
|
+
UPDATING: "updating",
|
|
76
|
+
READY: "ready"
|
|
77
|
+
};
|
|
78
|
+
var CURRENT_FOLDER_NAME = "current";
|
|
79
|
+
var ARCHIVE_FOLDER_NAME = "archive";
|
|
80
|
+
var STAGING_FOLDER_NAME = "_staging";
|
|
73
81
|
var PROJECTION_TYPE = {
|
|
74
82
|
/** @deprecated Legacy — Metadata Type `Condition`. */
|
|
75
83
|
CONDITION: "Condition",
|
|
@@ -785,6 +793,7 @@ function requiredToken(value, field) {
|
|
|
785
793
|
}
|
|
786
794
|
|
|
787
795
|
// ../../libs/metadata-projection/src/lib/path/ProjectionPathBuilder.ts
|
|
796
|
+
var MANIFEST_FILE_NAME = PROJECTION_FILE_NAME[PROJECTION_TYPE.MANIFEST];
|
|
788
797
|
var ProjectionPathBuilder = class {
|
|
789
798
|
prefix;
|
|
790
799
|
environment;
|
|
@@ -806,24 +815,58 @@ var ProjectionPathBuilder = class {
|
|
|
806
815
|
environmentRoot() {
|
|
807
816
|
return `${this.prefix}/${this.environment}`;
|
|
808
817
|
}
|
|
809
|
-
/** `{prefix}/{environment}/current
|
|
818
|
+
/** `{prefix}/{environment}/current` */
|
|
819
|
+
currentRoot() {
|
|
820
|
+
return `${this.environmentRoot()}/${CURRENT_FOLDER_NAME}`;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Publication-status marker. Facade name kept for callers that used the
|
|
824
|
+
* old pointer key. The object is `current/manifest.json`, not a root pointer.
|
|
825
|
+
*/
|
|
810
826
|
currentPointerKey() {
|
|
811
|
-
return
|
|
827
|
+
return this.currentArtifactKey(MANIFEST_FILE_NAME);
|
|
812
828
|
}
|
|
813
|
-
/** `{prefix}/{environment}/
|
|
814
|
-
|
|
815
|
-
|
|
829
|
+
/** `{prefix}/{environment}/current/{fileName}` */
|
|
830
|
+
currentArtifactKey(fileName) {
|
|
831
|
+
this.assertSafeArtifactPath(fileName, "fileName");
|
|
832
|
+
return `${this.currentRoot()}/${fileName.trim()}`;
|
|
816
833
|
}
|
|
817
|
-
/** `{prefix}/{environment}/
|
|
818
|
-
|
|
819
|
-
this.
|
|
820
|
-
return `${this.releasesRoot()}/${releaseId.trim()}`;
|
|
834
|
+
/** `{prefix}/{environment}/archive` */
|
|
835
|
+
archiveRoot() {
|
|
836
|
+
return `${this.environmentRoot()}/${ARCHIVE_FOLDER_NAME}`;
|
|
821
837
|
}
|
|
822
|
-
/** `{prefix}/{environment}/
|
|
823
|
-
|
|
824
|
-
this.assertSafeSegment(
|
|
838
|
+
/** `{prefix}/{environment}/archive/{changeRevision}` */
|
|
839
|
+
archiveReleaseRoot(changeRevision) {
|
|
840
|
+
this.assertSafeSegment(changeRevision, "changeRevision");
|
|
841
|
+
return `${this.archiveRoot()}/${changeRevision.trim()}`;
|
|
842
|
+
}
|
|
843
|
+
/** `{prefix}/{environment}/archive/{changeRevision}/{fileName}` */
|
|
844
|
+
archiveArtifactKey(changeRevision, fileName) {
|
|
845
|
+
this.assertSafeSegment(changeRevision, "changeRevision");
|
|
825
846
|
this.assertSafeArtifactPath(fileName, "fileName");
|
|
826
|
-
return `${this.
|
|
847
|
+
return `${this.archiveReleaseRoot(changeRevision)}/${fileName.trim()}`;
|
|
848
|
+
}
|
|
849
|
+
/** `{prefix}/{environment}/_staging` */
|
|
850
|
+
stagingRoot() {
|
|
851
|
+
return `${this.environmentRoot()}/${STAGING_FOLDER_NAME}`;
|
|
852
|
+
}
|
|
853
|
+
/** `{prefix}/{environment}/_staging/{changeRevision}` */
|
|
854
|
+
stagingReleaseRoot(changeRevision) {
|
|
855
|
+
this.assertSafeSegment(changeRevision, "changeRevision");
|
|
856
|
+
return `${this.stagingRoot()}/${changeRevision.trim()}`;
|
|
857
|
+
}
|
|
858
|
+
/** `{prefix}/{environment}/_staging/{changeRevision}/{fileName}` */
|
|
859
|
+
stagingArtifactKey(changeRevision, fileName) {
|
|
860
|
+
this.assertSafeSegment(changeRevision, "changeRevision");
|
|
861
|
+
this.assertSafeArtifactPath(fileName, "fileName");
|
|
862
|
+
return `${this.stagingReleaseRoot(changeRevision)}/${fileName.trim()}`;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* History key for a change revision.
|
|
866
|
+
* Serving bytes for the active publication live under {@link currentArtifactKey}.
|
|
867
|
+
*/
|
|
868
|
+
releaseArtifactKey(changeRevision, fileName) {
|
|
869
|
+
return this.archiveArtifactKey(changeRevision, fileName);
|
|
827
870
|
}
|
|
828
871
|
assertSafeSegment(value, field) {
|
|
829
872
|
const trimmed = value?.trim() ?? "";
|
|
@@ -1167,7 +1210,9 @@ function parseTypedRelationshipFile(parsed, expected) {
|
|
|
1167
1210
|
// ../../libs/metadata-projection/src/lib/runtime-query/publishedValueListing.ts
|
|
1168
1211
|
var PUBLISHED_VALUE_LIST_LIMITS = {
|
|
1169
1212
|
MAX_PAGE_SIZE: 500,
|
|
1170
|
-
MAX_COMPLETE_SIZE: 2e3
|
|
1213
|
+
MAX_COMPLETE_SIZE: 2e3,
|
|
1214
|
+
MAX_BATCH_TYPES: 50
|
|
1215
|
+
};
|
|
1171
1216
|
var PUBLISHED_VALUE_SORT = {
|
|
1172
1217
|
SORT_ORDER: "sortOrder",
|
|
1173
1218
|
VALUE_CODE: "valueCode",
|
|
@@ -1849,7 +1894,7 @@ var runtimeMetadataConfigSchema = z.object({
|
|
|
1849
1894
|
expectedProjectionVersion: z.string().min(1).optional(),
|
|
1850
1895
|
/**
|
|
1851
1896
|
* When set, startup loads this release id.
|
|
1852
|
-
* When omitted, resolves via `{prefix}/{environment}/current.json`.
|
|
1897
|
+
* When omitted, resolves via `{prefix}/{environment}/current/manifest.json`.
|
|
1853
1898
|
*/
|
|
1854
1899
|
revision: z.string().min(1).optional(),
|
|
1855
1900
|
/** Periodic manifest check interval in ms. `0` / omitted disables auto timer. */
|
|
@@ -1984,6 +2029,21 @@ var MetadataExtensionContractError = class extends RuntimeMetadataError {
|
|
|
1984
2029
|
this.name = "MetadataExtensionContractError";
|
|
1985
2030
|
}
|
|
1986
2031
|
};
|
|
2032
|
+
var MetadataExtensionProtocolError = class extends RuntimeMetadataError {
|
|
2033
|
+
constructor(expectedProtocolVersion, actualProtocolVersion) {
|
|
2034
|
+
super(
|
|
2035
|
+
"Metadata extension protocol version is incompatible",
|
|
2036
|
+
503,
|
|
2037
|
+
"METADATA_EXTENSION_PROTOCOL_INCOMPATIBLE",
|
|
2038
|
+
void 0,
|
|
2039
|
+
{
|
|
2040
|
+
retryable: true,
|
|
2041
|
+
metadata: { expectedProtocolVersion, actualProtocolVersion: actualProtocolVersion ?? null }
|
|
2042
|
+
}
|
|
2043
|
+
);
|
|
2044
|
+
this.name = "MetadataExtensionProtocolError";
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
1987
2047
|
var MetadataDiscoveryError = class extends RuntimeMetadataError {
|
|
1988
2048
|
constructor(message, code = "METADATA_DISCOVERY_INVALID") {
|
|
1989
2049
|
super(message, code === "METADATA_TYPE_INCOMPLETE" ? 503 : 400, code, void 0, {
|
|
@@ -2920,10 +2980,10 @@ var MetadataDownloader = class {
|
|
|
2920
2980
|
});
|
|
2921
2981
|
}
|
|
2922
2982
|
buildKey(releaseId, fileName) {
|
|
2923
|
-
return this.pathBuilder.
|
|
2983
|
+
return this.pathBuilder.currentArtifactKey(fileName);
|
|
2924
2984
|
}
|
|
2925
2985
|
/**
|
|
2926
|
-
* Resolve the active
|
|
2986
|
+
* Resolve the active change revision from `current/manifest.json`.
|
|
2927
2987
|
*/
|
|
2928
2988
|
async discoverLatestRevision() {
|
|
2929
2989
|
const pointer = await this.downloadCurrentPointer();
|
|
@@ -2936,29 +2996,57 @@ var MetadataDownloader = class {
|
|
|
2936
2996
|
try {
|
|
2937
2997
|
parsed = JSON.parse(body);
|
|
2938
2998
|
} catch {
|
|
2939
|
-
throw new ProjectionDownloadError("Malformed current.json", {
|
|
2999
|
+
throw new ProjectionDownloadError("Malformed current/manifest.json", {
|
|
2940
3000
|
retryable: false,
|
|
2941
3001
|
metadata: { key }
|
|
2942
3002
|
});
|
|
2943
3003
|
}
|
|
2944
|
-
if (
|
|
3004
|
+
if (parsed.publicationStatus === PUBLICATION_STATUS.UPDATING) {
|
|
3005
|
+
throw new ProjectionDownloadError(
|
|
3006
|
+
"Metadata publication is updating; serving bytes are not ready",
|
|
3007
|
+
{ retryable: true, metadata: { key, publicationStatus: parsed.publicationStatus } }
|
|
3008
|
+
);
|
|
3009
|
+
}
|
|
3010
|
+
if (parsed.publicationStatus && parsed.publicationStatus !== PUBLICATION_STATUS.READY) {
|
|
2945
3011
|
throw new ProjectionDownloadError(
|
|
2946
|
-
"current.json
|
|
3012
|
+
"current/manifest.json is not ready",
|
|
3013
|
+
{ retryable: false, metadata: { key, publicationStatus: parsed.publicationStatus } }
|
|
3014
|
+
);
|
|
3015
|
+
}
|
|
3016
|
+
const changeRevision = (parsed.changeRevision || parsed.releaseId || parsed.currentRelease || "").trim();
|
|
3017
|
+
if (!changeRevision) {
|
|
3018
|
+
throw new ProjectionDownloadError(
|
|
3019
|
+
"current/manifest.json is missing changeRevision",
|
|
2947
3020
|
{ retryable: false, metadata: { key } }
|
|
2948
3021
|
);
|
|
2949
3022
|
}
|
|
2950
|
-
return
|
|
3023
|
+
return {
|
|
3024
|
+
currentRelease: changeRevision,
|
|
3025
|
+
generatedAt: parsed.generatedAt,
|
|
3026
|
+
projectionVersion: parsed.projectionVersion
|
|
3027
|
+
};
|
|
2951
3028
|
}
|
|
2952
3029
|
/**
|
|
2953
3030
|
* Download + validate manifest.json for a release (lookupIndex + integrity catalog).
|
|
2954
3031
|
*/
|
|
2955
3032
|
async downloadManifest(releaseId) {
|
|
2956
3033
|
const fileName = PROJECTION_FILE_NAME[PROJECTION_TYPE.MANIFEST];
|
|
2957
|
-
const
|
|
2958
|
-
|
|
3034
|
+
const key = this.buildKey(releaseId, fileName);
|
|
3035
|
+
const body = await this.getObjectBody(key);
|
|
3036
|
+
const manifest = this.loader.parseAndValidate(body);
|
|
3037
|
+
if (manifest.publicationStatus === PUBLICATION_STATUS.UPDATING) {
|
|
3038
|
+
throw new ProjectionDownloadError(
|
|
3039
|
+
"Metadata publication is updating; serving bytes are not ready",
|
|
3040
|
+
{
|
|
3041
|
+
retryable: true,
|
|
3042
|
+
metadata: { key, publicationStatus: manifest.publicationStatus }
|
|
3043
|
+
}
|
|
3044
|
+
);
|
|
3045
|
+
}
|
|
3046
|
+
return manifest;
|
|
2959
3047
|
}
|
|
2960
3048
|
/**
|
|
2961
|
-
* Bootstrap: resolve
|
|
3049
|
+
* Bootstrap: resolve `current/manifest.json` only.
|
|
2962
3050
|
*
|
|
2963
3051
|
* Manifest supplies lookupIndex, metadataTypes, and integrity hashes.
|
|
2964
3052
|
* `common.json` is **not** loaded — enrichment resolves from domain projections.
|
|
@@ -2966,9 +3054,15 @@ var MetadataDownloader = class {
|
|
|
2966
3054
|
* {@link downloadDomainProjections}.
|
|
2967
3055
|
*/
|
|
2968
3056
|
async loadBootstrap(releaseId) {
|
|
2969
|
-
const
|
|
2970
|
-
|
|
2971
|
-
|
|
3057
|
+
const forced = releaseId?.trim();
|
|
3058
|
+
if (!forced) {
|
|
3059
|
+
const manifest2 = await this.downloadManifest("current");
|
|
3060
|
+
const target = (manifest2.changeRevision || manifest2.releaseId).trim();
|
|
3061
|
+
this.assertManifestMatchesRelease(manifest2, target);
|
|
3062
|
+
return this.downloadBootstrapBundle(manifest2);
|
|
3063
|
+
}
|
|
3064
|
+
const manifest = await this.downloadManifest(forced);
|
|
3065
|
+
this.assertManifestMatchesRelease(manifest, forced);
|
|
2972
3066
|
return this.downloadBootstrapBundle(manifest);
|
|
2973
3067
|
}
|
|
2974
3068
|
/**
|
|
@@ -3689,6 +3783,82 @@ var MetadataCache = class {
|
|
|
3689
3783
|
this.status = CACHE_STATUS.READY;
|
|
3690
3784
|
return snapshot;
|
|
3691
3785
|
}
|
|
3786
|
+
/**
|
|
3787
|
+
* Merge localization catalogs for one or more locales into the active snapshot.
|
|
3788
|
+
* Does not touch domain projection files. Same-release writes only when guarded.
|
|
3789
|
+
*/
|
|
3790
|
+
mergeLocalizationMaps(maps, guard) {
|
|
3791
|
+
if (!this.snapshot) {
|
|
3792
|
+
throw new Error("Cannot merge localization into an empty metadata cache");
|
|
3793
|
+
}
|
|
3794
|
+
if (maps.size === 0) {
|
|
3795
|
+
return this.snapshot;
|
|
3796
|
+
}
|
|
3797
|
+
if (!this.guardAllowsWrite(guard)) {
|
|
3798
|
+
return this.snapshot;
|
|
3799
|
+
}
|
|
3800
|
+
const localization = new Map(
|
|
3801
|
+
[...this.snapshot.localization?.entries() ?? []].map(([locale, map]) => [
|
|
3802
|
+
locale,
|
|
3803
|
+
new Map(map)
|
|
3804
|
+
])
|
|
3805
|
+
);
|
|
3806
|
+
const additionalFiles = [];
|
|
3807
|
+
for (const [locale, incoming] of maps) {
|
|
3808
|
+
const existing = localization.get(locale) ?? /* @__PURE__ */ new Map();
|
|
3809
|
+
for (const [key, value] of incoming) {
|
|
3810
|
+
if (typeof value === "string") {
|
|
3811
|
+
existing.set(key, value);
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
localization.set(locale, existing);
|
|
3815
|
+
additionalFiles.push(`localization/${locale}.json`);
|
|
3816
|
+
}
|
|
3817
|
+
const defaultLocale = this.snapshot.manifest.localization?.defaultLocale ?? "en-US";
|
|
3818
|
+
const existingLocalization = this.snapshot.manifest.localization;
|
|
3819
|
+
const supportedLocales = [
|
|
3820
|
+
.../* @__PURE__ */ new Set([
|
|
3821
|
+
...existingLocalization?.supportedLocales ?? [],
|
|
3822
|
+
...localization.keys()
|
|
3823
|
+
])
|
|
3824
|
+
].sort((a, b) => a.localeCompare(b));
|
|
3825
|
+
const loadedFiles = Object.freeze(
|
|
3826
|
+
[
|
|
3827
|
+
.../* @__PURE__ */ new Set([...this.snapshot.loadedFiles, ...additionalFiles])
|
|
3828
|
+
].sort((a, b) => a.localeCompare(b))
|
|
3829
|
+
);
|
|
3830
|
+
const snapshot = Object.freeze({
|
|
3831
|
+
...this.snapshot,
|
|
3832
|
+
loadedFiles,
|
|
3833
|
+
manifest: Object.freeze({
|
|
3834
|
+
...this.snapshot.manifest,
|
|
3835
|
+
localization: Object.freeze({
|
|
3836
|
+
defaultLocale,
|
|
3837
|
+
supportedLocales,
|
|
3838
|
+
files: Object.freeze({
|
|
3839
|
+
...existingLocalization?.files ?? {},
|
|
3840
|
+
...Object.fromEntries(
|
|
3841
|
+
supportedLocales.map((locale) => [
|
|
3842
|
+
locale,
|
|
3843
|
+
existingLocalization?.files?.[locale] ?? `localization/${locale}.json`
|
|
3844
|
+
])
|
|
3845
|
+
)
|
|
3846
|
+
})
|
|
3847
|
+
})
|
|
3848
|
+
}),
|
|
3849
|
+
localization: Object.freeze(
|
|
3850
|
+
new Map(
|
|
3851
|
+
[...localization.entries()].map(([locale, map]) => [
|
|
3852
|
+
locale,
|
|
3853
|
+
Object.freeze(new Map(map))
|
|
3854
|
+
])
|
|
3855
|
+
)
|
|
3856
|
+
)
|
|
3857
|
+
});
|
|
3858
|
+
this.snapshot = snapshot;
|
|
3859
|
+
this.status = CACHE_STATUS.READY;
|
|
3860
|
+
return snapshot;
|
|
3861
|
+
}
|
|
3692
3862
|
/**
|
|
3693
3863
|
* Merge type-catalog fields (e.g. valueDataType) into the synthetic extension
|
|
3694
3864
|
* manifest so synchronous helpers can read them after listTypeValues.
|
|
@@ -3775,8 +3945,11 @@ var MetadataResolver = class {
|
|
|
3775
3945
|
* O(1) localization lookup using in-memory locale map.
|
|
3776
3946
|
* Resolves by key `<typeCode>.<valueCode>`.
|
|
3777
3947
|
* Falls back to default locale if requested locale does not have the key.
|
|
3948
|
+
*
|
|
3949
|
+
* When `catalogOnly` is true, never reads domain projection entries — a
|
|
3950
|
+
* missing localization key returns undefined.
|
|
3778
3951
|
*/
|
|
3779
|
-
resolveLocalization(typeCode, valueCode, locale) {
|
|
3952
|
+
resolveLocalization(typeCode, valueCode, locale, options) {
|
|
3780
3953
|
this.assertReady();
|
|
3781
3954
|
const targetLocale = locale?.trim() || this.cache.getManifest()?.localization?.defaultLocale || "en-US";
|
|
3782
3955
|
const locMap = this.cache.getLocalizationMap(targetLocale);
|
|
@@ -3791,6 +3964,9 @@ var MetadataResolver = class {
|
|
|
3791
3964
|
return defaultMap.get(key);
|
|
3792
3965
|
}
|
|
3793
3966
|
}
|
|
3967
|
+
if (options?.catalogOnly) {
|
|
3968
|
+
return void 0;
|
|
3969
|
+
}
|
|
3794
3970
|
const file = this.cache.getDomainFile(typeCode);
|
|
3795
3971
|
const record = file?.records[valueCode];
|
|
3796
3972
|
const entry = record?.versions[String(record.latestVersion)];
|
|
@@ -4028,18 +4204,18 @@ var MetadataRefreshService = class {
|
|
|
4028
4204
|
return this.lastRefreshError;
|
|
4029
4205
|
}
|
|
4030
4206
|
/**
|
|
4031
|
-
* Demand-driven bootstrap: current
|
|
4207
|
+
* Demand-driven bootstrap: current/manifest.json → atomic cache replace.
|
|
4032
4208
|
* Domain projection files and common.json are not loaded here.
|
|
4033
4209
|
*/
|
|
4034
4210
|
async initialize(revision) {
|
|
4035
|
-
const
|
|
4211
|
+
const forced = revision?.trim() || this.configuredRevision;
|
|
4036
4212
|
const logs = createOperationalLogger(this.logger);
|
|
4037
4213
|
const started = Date.now();
|
|
4038
4214
|
logs.debug(RUNTIME_METADATA_EVENTS.INIT_START, {
|
|
4039
|
-
revision:
|
|
4215
|
+
revision: forced || "current"
|
|
4040
4216
|
});
|
|
4041
4217
|
try {
|
|
4042
|
-
const bundle = await this.downloader.loadBootstrap(
|
|
4218
|
+
const bundle = forced ? await this.downloader.loadBootstrap(forced) : await this.downloader.loadBootstrap();
|
|
4043
4219
|
this.cache.replace(bundle);
|
|
4044
4220
|
this.refreshStatus = REFRESH_STATUS.SUCCEEDED;
|
|
4045
4221
|
this.lastRefreshError = null;
|
|
@@ -4071,14 +4247,14 @@ var MetadataRefreshService = class {
|
|
|
4071
4247
|
this.lastRefreshError = err instanceof Error ? err.message : String(err);
|
|
4072
4248
|
createOperationalLogger(this.logger).error(RUNTIME_METADATA_EVENTS.INIT_FAILED, {
|
|
4073
4249
|
err: err instanceof Error ? err : void 0,
|
|
4074
|
-
revision:
|
|
4250
|
+
revision: forced || "current",
|
|
4075
4251
|
message: this.lastRefreshError
|
|
4076
4252
|
});
|
|
4077
4253
|
throw err;
|
|
4078
4254
|
}
|
|
4079
4255
|
}
|
|
4080
4256
|
/**
|
|
4081
|
-
* Event strategy: MetadataProjectionCompleted → reload via current.json → atomic swap.
|
|
4257
|
+
* Event strategy: MetadataProjectionCompleted → reload via current/manifest.json → atomic swap.
|
|
4082
4258
|
* `releaseId` is diagnostic; the pointer is the source of truth.
|
|
4083
4259
|
* Returns true when the cache was updated.
|
|
4084
4260
|
*/
|
|
@@ -4086,7 +4262,7 @@ var MetadataRefreshService = class {
|
|
|
4086
4262
|
return this.runRefresh(void 0, "event");
|
|
4087
4263
|
}
|
|
4088
4264
|
/**
|
|
4089
|
-
* Periodic strategy: re-read current.json; reload only if changed.
|
|
4265
|
+
* Periodic strategy: re-read current/manifest.json; reload only if changed.
|
|
4090
4266
|
*/
|
|
4091
4267
|
async checkAndRefresh(preferredRevision) {
|
|
4092
4268
|
const current = this.cache.getManifest();
|
|
@@ -4400,6 +4576,7 @@ function metadataValueToReference(value) {
|
|
|
4400
4576
|
// ../../libs/runtime-metadata/src/lib/provider/ExtensionMetadataProvider.ts
|
|
4401
4577
|
var DEFAULT_READY_TIMEOUT_MS = 5e3;
|
|
4402
4578
|
var DEFAULT_REQUEST_TIMEOUT_MS = 2e3;
|
|
4579
|
+
var REQUIRED_METADATA_EXTENSION_PROTOCOL_VERSION = "2";
|
|
4403
4580
|
var RELATED_BATCH_LIMIT = 200;
|
|
4404
4581
|
var ExtensionMetadataProvider = class {
|
|
4405
4582
|
baseUrl;
|
|
@@ -4455,7 +4632,7 @@ var ExtensionMetadataProvider = class {
|
|
|
4455
4632
|
break;
|
|
4456
4633
|
}
|
|
4457
4634
|
} catch (err) {
|
|
4458
|
-
if (err instanceof MetadataExtensionContractError) {
|
|
4635
|
+
if (err instanceof MetadataExtensionContractError || err instanceof MetadataExtensionProtocolError) {
|
|
4459
4636
|
throw err;
|
|
4460
4637
|
}
|
|
4461
4638
|
lastError = err;
|
|
@@ -4494,6 +4671,12 @@ var ExtensionMetadataProvider = class {
|
|
|
4494
4671
|
"GET",
|
|
4495
4672
|
"/v1/status"
|
|
4496
4673
|
);
|
|
4674
|
+
if (body.protocolVersion !== REQUIRED_METADATA_EXTENSION_PROTOCOL_VERSION) {
|
|
4675
|
+
throw new MetadataExtensionProtocolError(
|
|
4676
|
+
REQUIRED_METADATA_EXTENSION_PROTOCOL_VERSION,
|
|
4677
|
+
body.protocolVersion
|
|
4678
|
+
);
|
|
4679
|
+
}
|
|
4497
4680
|
const state = body.state ?? "UNKNOWN";
|
|
4498
4681
|
const releaseId = body.releaseId ?? null;
|
|
4499
4682
|
if (isFreshProjectionState(state) && releaseId) {
|
|
@@ -4778,8 +4961,15 @@ var ExtensionMetadataProvider = class {
|
|
|
4778
4961
|
throw err;
|
|
4779
4962
|
}
|
|
4780
4963
|
}
|
|
4781
|
-
async getPermissionRegistry() {
|
|
4782
|
-
const
|
|
4964
|
+
async getPermissionRegistry(options) {
|
|
4965
|
+
const params = new URLSearchParams();
|
|
4966
|
+
if (options?.releaseId) params.set("releaseId", options.releaseId);
|
|
4967
|
+
if (options?.readPolicy) params.set("readPolicy", options.readPolicy);
|
|
4968
|
+
const query = params.toString();
|
|
4969
|
+
const body = await this.requestJson(
|
|
4970
|
+
"GET",
|
|
4971
|
+
`/v1/permission-registry${query ? `?${query}` : ""}`
|
|
4972
|
+
);
|
|
4783
4973
|
return parsePermissionRegistryDocument(body);
|
|
4784
4974
|
}
|
|
4785
4975
|
async getLocalizationValue(keyOrTypeCode, valueCodeOrLocale, maybeLocale) {
|
|
@@ -5723,11 +5913,11 @@ var S3MetadataProvider = class {
|
|
|
5723
5913
|
options?.locale
|
|
5724
5914
|
);
|
|
5725
5915
|
} catch (err) {
|
|
5726
|
-
if (err instanceof MetadataLookupError) {
|
|
5727
|
-
|
|
5916
|
+
if (!(err instanceof MetadataLookupError)) {
|
|
5917
|
+
throw err;
|
|
5728
5918
|
}
|
|
5729
|
-
throw err;
|
|
5730
5919
|
}
|
|
5920
|
+
return null;
|
|
5731
5921
|
}
|
|
5732
5922
|
const entry = findPublishedEntry(
|
|
5733
5923
|
this.cache.getDomainFile(typeCode),
|
|
@@ -5736,6 +5926,10 @@ var S3MetadataProvider = class {
|
|
|
5736
5926
|
);
|
|
5737
5927
|
return entry ? projectionEntryToMetadataValue(typeCode, valueCode, entry, options?.locale) : null;
|
|
5738
5928
|
}
|
|
5929
|
+
/**
|
|
5930
|
+
* In-process multi-get by metadata reference (not DynamoDB BatchGetCommand).
|
|
5931
|
+
* UnprocessedItems / UnprocessedKeys do not apply.
|
|
5932
|
+
*/
|
|
5739
5933
|
async batchGet(references, options) {
|
|
5740
5934
|
const invalidReferences = [];
|
|
5741
5935
|
const parsedRefs = [];
|
|
@@ -5823,14 +6017,23 @@ var S3MetadataProvider = class {
|
|
|
5823
6017
|
});
|
|
5824
6018
|
return values;
|
|
5825
6019
|
}
|
|
5826
|
-
async getPermissionRegistry() {
|
|
6020
|
+
async getPermissionRegistry(options) {
|
|
6021
|
+
const status = await this.getStatus();
|
|
6022
|
+
assertMetadataReadPolicy(options?.readPolicy, status.state, status.releaseId);
|
|
6023
|
+
assertReleasePin(options?.releaseId, status.releaseId);
|
|
5827
6024
|
const manifest = this.cache.getManifest();
|
|
5828
6025
|
if (!manifest) {
|
|
5829
6026
|
throw new ProjectionDownloadError("Projection manifest is not loaded", {
|
|
5830
6027
|
retryable: true
|
|
5831
6028
|
});
|
|
5832
6029
|
}
|
|
5833
|
-
|
|
6030
|
+
const document = await this.downloader.downloadPermissionRegistry(manifest);
|
|
6031
|
+
const releaseId = this.cache.getReleaseId();
|
|
6032
|
+
assertReleasePin(options?.releaseId, releaseId);
|
|
6033
|
+
if (document.releaseId !== releaseId) {
|
|
6034
|
+
throw new MetadataReleaseMismatchError(releaseId ?? "", document.releaseId);
|
|
6035
|
+
}
|
|
6036
|
+
return document;
|
|
5834
6037
|
}
|
|
5835
6038
|
async getRelatedValueGroups(sourceTypeCode, sourceValueCodes, targetTypeCode, options) {
|
|
5836
6039
|
if (sourceValueCodes.length === 0) {
|
|
@@ -5887,9 +6090,9 @@ var S3MetadataProvider = class {
|
|
|
5887
6090
|
return this.listLoadedType(typeCode, releaseId, options);
|
|
5888
6091
|
}
|
|
5889
6092
|
async listValuesByTypes(typeCodes, options) {
|
|
5890
|
-
if (typeCodes.length === 0 || typeCodes.length >
|
|
6093
|
+
if (typeCodes.length === 0 || typeCodes.length > PUBLISHED_VALUE_LIST_LIMITS.MAX_BATCH_TYPES) {
|
|
5891
6094
|
throw new MetadataDiscoveryError(
|
|
5892
|
-
|
|
6095
|
+
`typeCodes must contain between 1 and ${PUBLISHED_VALUE_LIST_LIMITS.MAX_BATCH_TYPES} metadata types`
|
|
5893
6096
|
);
|
|
5894
6097
|
}
|
|
5895
6098
|
const normalized = typeCodes.map((typeCode) => typeCode.trim());
|
|
@@ -6176,9 +6379,9 @@ var RuntimeMetadataService = class {
|
|
|
6176
6379
|
healthService;
|
|
6177
6380
|
config;
|
|
6178
6381
|
logger;
|
|
6179
|
-
/** Coalesce concurrent cold bootstrap (current
|
|
6382
|
+
/** Coalesce concurrent cold bootstrap (`current/manifest.json`). */
|
|
6180
6383
|
initializeInFlight = null;
|
|
6181
|
-
permissionRegistryInFlight =
|
|
6384
|
+
permissionRegistryInFlight = /* @__PURE__ */ new Map();
|
|
6182
6385
|
permissionRegistryCache = null;
|
|
6183
6386
|
/**
|
|
6184
6387
|
* In-flight selective downloads keyed by MetadataTypeCode.
|
|
@@ -6186,8 +6389,17 @@ var RuntimeMetadataService = class {
|
|
|
6186
6389
|
* for the lifetime of the Lambda execution context.
|
|
6187
6390
|
*/
|
|
6188
6391
|
domainLoadInFlight = /* @__PURE__ */ new Map();
|
|
6189
|
-
/**
|
|
6190
|
-
|
|
6392
|
+
/**
|
|
6393
|
+
* Coalesce concurrent localization catalog loads for the same release+locales.
|
|
6394
|
+
* Key: `${releaseId}:${locale1,locale2}`.
|
|
6395
|
+
*/
|
|
6396
|
+
localizationLoadInFlight = /* @__PURE__ */ new Map();
|
|
6397
|
+
/**
|
|
6398
|
+
* Coalesce common.json downloads only for the snapshot they started against.
|
|
6399
|
+
* A cache replacement/clear increments generation, so an A promise can never
|
|
6400
|
+
* be reused by a caller observing B (or an empty cache).
|
|
6401
|
+
*/
|
|
6402
|
+
commonLoadInFlight = /* @__PURE__ */ new Map();
|
|
6191
6403
|
/**
|
|
6192
6404
|
* Types soft-skipped for the current release (no manifest integrity entry).
|
|
6193
6405
|
* Prevents ensureProjectionTypesLoaded from retrying unsupported types forever.
|
|
@@ -6255,6 +6467,7 @@ var RuntimeMetadataService = class {
|
|
|
6255
6467
|
logger: this.logger,
|
|
6256
6468
|
recoveryCooldownMs: recoveryCooldownMs(options.env),
|
|
6257
6469
|
onFallbackActivated: async () => {
|
|
6470
|
+
this.logCacheTransition("clear", "extension-to-s3-fallback");
|
|
6258
6471
|
this.cache.clear();
|
|
6259
6472
|
this.startS3PeriodicCheck();
|
|
6260
6473
|
},
|
|
@@ -6273,7 +6486,7 @@ var RuntimeMetadataService = class {
|
|
|
6273
6486
|
});
|
|
6274
6487
|
}
|
|
6275
6488
|
/**
|
|
6276
|
-
* Load current
|
|
6489
|
+
* Load `current/manifest.json` into cache (no domain projections, no common.json).
|
|
6277
6490
|
* Called on demand when a response needs metadata — not from beforeHandler.
|
|
6278
6491
|
* Concurrent callers share one in-flight initialize.
|
|
6279
6492
|
*/
|
|
@@ -6335,7 +6548,7 @@ var RuntimeMetadataService = class {
|
|
|
6335
6548
|
this.startS3PeriodicCheck();
|
|
6336
6549
|
}
|
|
6337
6550
|
/**
|
|
6338
|
-
* Handle MetadataProjectionCompleted — reload bootstrap via current.json.
|
|
6551
|
+
* Handle MetadataProjectionCompleted — reload bootstrap via current/manifest.json.
|
|
6339
6552
|
*
|
|
6340
6553
|
* This refreshes the current execution environment only. It cannot fan-out
|
|
6341
6554
|
* to every warm Lambda. Warm environments learn about new releases via the
|
|
@@ -6366,7 +6579,7 @@ var RuntimeMetadataService = class {
|
|
|
6366
6579
|
}
|
|
6367
6580
|
return this.refreshService.refreshFromEvent(releaseId);
|
|
6368
6581
|
}
|
|
6369
|
-
/** Periodic / manual current.json check + conditional snapshot reload. */
|
|
6582
|
+
/** Periodic / manual current/manifest.json check + conditional snapshot reload. */
|
|
6370
6583
|
async checkForUpdates(revision) {
|
|
6371
6584
|
if (this.usesExtensionTransport()) {
|
|
6372
6585
|
try {
|
|
@@ -6477,6 +6690,143 @@ var RuntimeMetadataService = class {
|
|
|
6477
6690
|
}
|
|
6478
6691
|
await this.ensureProjectionTypesLoaded(typeCodes);
|
|
6479
6692
|
}
|
|
6693
|
+
/**
|
|
6694
|
+
* Ensure localization catalogs needed for HTTP response labelling are in cache.
|
|
6695
|
+
*
|
|
6696
|
+
* - Does **not** download `{typeCode}.json` domain projection files.
|
|
6697
|
+
* - Does **not** load common.json, relationships, typed-relations, or permissions.
|
|
6698
|
+
* - Extension transport: fetches locale maps via the local extension HTTP API and
|
|
6699
|
+
* merges them into {@link MetadataCache} (in-flight coalesced per release+locales).
|
|
6700
|
+
* - S3 transport: bootstrap already installs published localization files; a missing
|
|
6701
|
+
* locale map means that locale file was absent (fall back at lookup time).
|
|
6702
|
+
*
|
|
6703
|
+
* Catalog/extension failures throw {@link MetadataProjectionUnavailableError}.
|
|
6704
|
+
* A missing individual localization key is not a failure — callers leave the field.
|
|
6705
|
+
*/
|
|
6706
|
+
async ensureLocalizationForResponse(options) {
|
|
6707
|
+
const started = Date.now();
|
|
6708
|
+
const logs = createOperationalLogger(this.logger);
|
|
6709
|
+
logs.debug(RUNTIME_METADATA_EVENTS.LOCALIZATION_ENSURE_START, {
|
|
6710
|
+
stage: "ensureLocalizationForResponse",
|
|
6711
|
+
locale: options?.locale ?? null
|
|
6712
|
+
});
|
|
6713
|
+
try {
|
|
6714
|
+
if (!this.cache.isReady()) {
|
|
6715
|
+
await this.initialize();
|
|
6716
|
+
}
|
|
6717
|
+
if (!this.cache.isReady()) {
|
|
6718
|
+
throw new MetadataProjectionUnavailableError(
|
|
6719
|
+
"Metadata localization catalog is unavailable",
|
|
6720
|
+
{
|
|
6721
|
+
retryable: true,
|
|
6722
|
+
metadata: { operation: "ensureLocalizationForResponse" }
|
|
6723
|
+
}
|
|
6724
|
+
);
|
|
6725
|
+
}
|
|
6726
|
+
const defaultLocale = this.cache.getManifest()?.localization?.defaultLocale ?? "en-US";
|
|
6727
|
+
const requested = options?.locale?.trim() || defaultLocale;
|
|
6728
|
+
const locales = [.../* @__PURE__ */ new Set([requested, defaultLocale])];
|
|
6729
|
+
const missing = locales.filter(
|
|
6730
|
+
(locale) => this.cache.getLocalization(locale) === void 0
|
|
6731
|
+
);
|
|
6732
|
+
if (missing.length === 0) {
|
|
6733
|
+
logs.debug(RUNTIME_METADATA_EVENTS.LOCALIZATION_ENSURE_COMPLETE, {
|
|
6734
|
+
stage: "ensureLocalizationForResponse",
|
|
6735
|
+
durationMs: Date.now() - started,
|
|
6736
|
+
locales,
|
|
6737
|
+
cacheHit: true,
|
|
6738
|
+
transport: this.providerCoordinator.getActiveKind()
|
|
6739
|
+
});
|
|
6740
|
+
return;
|
|
6741
|
+
}
|
|
6742
|
+
if (!this.usesExtensionTransport()) {
|
|
6743
|
+
logs.debug(RUNTIME_METADATA_EVENTS.LOCALIZATION_ENSURE_COMPLETE, {
|
|
6744
|
+
stage: "ensureLocalizationForResponse",
|
|
6745
|
+
durationMs: Date.now() - started,
|
|
6746
|
+
locales,
|
|
6747
|
+
missingLocales: missing,
|
|
6748
|
+
cacheHit: false,
|
|
6749
|
+
transport: "s3"
|
|
6750
|
+
});
|
|
6751
|
+
return;
|
|
6752
|
+
}
|
|
6753
|
+
const releaseId = this.cache.getReleaseId() ?? "";
|
|
6754
|
+
const flightKey = `${releaseId}:${[...missing].sort().join(",")}`;
|
|
6755
|
+
let flight = this.localizationLoadInFlight.get(flightKey);
|
|
6756
|
+
if (!flight) {
|
|
6757
|
+
flight = this.loadExtensionLocalizationLocales(missing).finally(() => {
|
|
6758
|
+
this.localizationLoadInFlight.delete(flightKey);
|
|
6759
|
+
});
|
|
6760
|
+
this.localizationLoadInFlight.set(flightKey, flight);
|
|
6761
|
+
}
|
|
6762
|
+
await flight;
|
|
6763
|
+
const durationMs = Date.now() - started;
|
|
6764
|
+
logs.info(RUNTIME_METADATA_EVENTS.LOCALIZATION_ENSURE_COMPLETE, {
|
|
6765
|
+
stage: "ensureLocalizationForResponse",
|
|
6766
|
+
durationMs,
|
|
6767
|
+
locales,
|
|
6768
|
+
loadedLocales: missing,
|
|
6769
|
+
cacheHit: false,
|
|
6770
|
+
transport: "extension"
|
|
6771
|
+
});
|
|
6772
|
+
} catch (err) {
|
|
6773
|
+
logs.warn(RUNTIME_METADATA_EVENTS.LOCALIZATION_ENSURE_FAILED, {
|
|
6774
|
+
stage: "ensureLocalizationForResponse",
|
|
6775
|
+
durationMs: Date.now() - started,
|
|
6776
|
+
error: err instanceof Error ? err.message : String(err)
|
|
6777
|
+
});
|
|
6778
|
+
throw err;
|
|
6779
|
+
}
|
|
6780
|
+
}
|
|
6781
|
+
/**
|
|
6782
|
+
* Fetch locale dictionaries from the extension and merge into cache.
|
|
6783
|
+
* A missing locale file installs an empty map so warm calls do not re-fetch.
|
|
6784
|
+
*/
|
|
6785
|
+
async loadExtensionLocalizationLocales(locales) {
|
|
6786
|
+
const provider = await this.activeProvider();
|
|
6787
|
+
const reader = provider.getLocalizationMap;
|
|
6788
|
+
if (typeof reader !== "function") {
|
|
6789
|
+
throw new MetadataProjectionUnavailableError(
|
|
6790
|
+
"Localization maps are not available from the active metadata provider",
|
|
6791
|
+
{
|
|
6792
|
+
retryable: false,
|
|
6793
|
+
metadata: { operation: "ensureLocalizationForResponse" }
|
|
6794
|
+
}
|
|
6795
|
+
);
|
|
6796
|
+
}
|
|
6797
|
+
const maps = /* @__PURE__ */ new Map();
|
|
6798
|
+
await Promise.all(
|
|
6799
|
+
locales.map(async (locale) => {
|
|
6800
|
+
try {
|
|
6801
|
+
const dictionary = await reader.call(provider, locale);
|
|
6802
|
+
maps.set(
|
|
6803
|
+
locale,
|
|
6804
|
+
new Map(
|
|
6805
|
+
Object.entries(dictionary ?? {}).filter(
|
|
6806
|
+
(entry) => typeof entry[1] === "string"
|
|
6807
|
+
)
|
|
6808
|
+
)
|
|
6809
|
+
);
|
|
6810
|
+
} catch (err) {
|
|
6811
|
+
if (isLocalizationNotFound(err)) {
|
|
6812
|
+
maps.set(locale, /* @__PURE__ */ new Map());
|
|
6813
|
+
return;
|
|
6814
|
+
}
|
|
6815
|
+
throw err instanceof MetadataProjectionUnavailableError ? err : new MetadataProjectionUnavailableError(
|
|
6816
|
+
err instanceof Error ? err.message : "Metadata localization catalog is unavailable",
|
|
6817
|
+
{
|
|
6818
|
+
retryable: true,
|
|
6819
|
+
metadata: {
|
|
6820
|
+
operation: "ensureLocalizationForResponse",
|
|
6821
|
+
locale
|
|
6822
|
+
}
|
|
6823
|
+
}
|
|
6824
|
+
);
|
|
6825
|
+
}
|
|
6826
|
+
})
|
|
6827
|
+
);
|
|
6828
|
+
this.cache.mergeLocalizationMaps(maps, this.currentWriteGuard());
|
|
6829
|
+
}
|
|
6480
6830
|
/**
|
|
6481
6831
|
* Ensure domain projection files for the given MetadataTypeCodes are present in cache.
|
|
6482
6832
|
* Filenames are `{MetadataTypeCode}.json` — not discovered from the manifest.
|
|
@@ -6547,16 +6897,26 @@ var RuntimeMetadataService = class {
|
|
|
6547
6897
|
if (cached && cached.releaseId === releaseId) {
|
|
6548
6898
|
return cached;
|
|
6549
6899
|
}
|
|
6550
|
-
if (!
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6900
|
+
if (!releaseId) {
|
|
6901
|
+
throw new ProjectionDownloadError("Cannot load common.json without an active release", {
|
|
6902
|
+
retryable: true
|
|
6903
|
+
});
|
|
6904
|
+
}
|
|
6905
|
+
const generation = this.cache.getGeneration();
|
|
6906
|
+
const key = this.commonLoadKey(releaseId, generation);
|
|
6907
|
+
const existing = this.commonLoadInFlight.get(key);
|
|
6908
|
+
if (existing) {
|
|
6909
|
+
await existing;
|
|
6910
|
+
} else {
|
|
6911
|
+
let created;
|
|
6912
|
+
created = this.downloadAndMergeCommon(releaseId, generation).finally(() => {
|
|
6913
|
+
if (this.commonLoadInFlight.get(key) === created) {
|
|
6914
|
+
this.commonLoadInFlight.delete(key);
|
|
6915
|
+
}
|
|
6557
6916
|
});
|
|
6917
|
+
this.commonLoadInFlight.set(key, created);
|
|
6918
|
+
await created;
|
|
6558
6919
|
}
|
|
6559
|
-
await this.commonLoadInFlight;
|
|
6560
6920
|
}
|
|
6561
6921
|
const common = this.cache.getCommon();
|
|
6562
6922
|
if (common && common.releaseId === this.cache.getReleaseId()) {
|
|
@@ -6574,23 +6934,71 @@ var RuntimeMetadataService = class {
|
|
|
6574
6934
|
return this.cache.getRelationshipIndex();
|
|
6575
6935
|
}
|
|
6576
6936
|
async downloadAndMergeCommon(expectedReleaseId, expectedGeneration) {
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
throw new ProjectionDownloadError("Projection manifest is not loaded", {
|
|
6937
|
+
if (!expectedReleaseId) {
|
|
6938
|
+
throw new ProjectionDownloadError("Cannot load common.json without an active release", {
|
|
6580
6939
|
retryable: true
|
|
6581
6940
|
});
|
|
6582
6941
|
}
|
|
6583
|
-
|
|
6942
|
+
const cachedManifest = this.cache.getManifest();
|
|
6943
|
+
const cachedManifestHasCommon = cachedManifest?.files.some(
|
|
6944
|
+
(file) => file.fileName === "common.json"
|
|
6945
|
+
) ?? false;
|
|
6946
|
+
const manifest = cachedManifestHasCommon ? cachedManifest : await this.downloader.downloadManifest(expectedReleaseId);
|
|
6947
|
+
const logs = createOperationalLogger(this.logger);
|
|
6948
|
+
logs.info("runtimeMetadata.common.load.start", {
|
|
6949
|
+
providerMode: this.usesExtensionTransport() ? "extension" : "s3",
|
|
6950
|
+
cachedReleaseId: this.cache.getReleaseId(),
|
|
6951
|
+
manifestReleaseId: manifest.releaseId,
|
|
6952
|
+
manifestRevision: manifest.revision,
|
|
6953
|
+
cacheGeneration: expectedGeneration,
|
|
6954
|
+
manifestFileCount: manifest.files.length,
|
|
6955
|
+
commonPresent: manifest.files.some((file) => file.fileName === "common.json"),
|
|
6956
|
+
manifestSource: cachedManifestHasCommon ? "cache" : "s3-authoritative-repair",
|
|
6957
|
+
...correlationFields()
|
|
6958
|
+
});
|
|
6959
|
+
if (manifest.releaseId !== expectedReleaseId || this.cache.getReleaseId() !== expectedReleaseId || this.cache.getGeneration() !== expectedGeneration) {
|
|
6960
|
+
logs.warn("runtimeMetadata.common.load.stale", {
|
|
6961
|
+
reason: "manifest-or-cache-identity-changed",
|
|
6962
|
+
expectedReleaseId,
|
|
6963
|
+
manifestReleaseId: manifest.releaseId,
|
|
6964
|
+
cachedReleaseId: this.cache.getReleaseId(),
|
|
6965
|
+
expectedGeneration,
|
|
6966
|
+
cacheGeneration: this.cache.getGeneration(),
|
|
6967
|
+
...correlationFields()
|
|
6968
|
+
});
|
|
6584
6969
|
return;
|
|
6585
6970
|
}
|
|
6586
6971
|
const common = await this.downloader.downloadCommon(manifest);
|
|
6587
|
-
if (
|
|
6972
|
+
if (this.cache.getReleaseId() !== expectedReleaseId || this.cache.getGeneration() !== expectedGeneration) {
|
|
6973
|
+
logs.warn("runtimeMetadata.common.load.stale", {
|
|
6974
|
+
reason: "cache-replaced-during-common-download",
|
|
6975
|
+
expectedReleaseId,
|
|
6976
|
+
cachedReleaseId: this.cache.getReleaseId(),
|
|
6977
|
+
expectedGeneration,
|
|
6978
|
+
cacheGeneration: this.cache.getGeneration(),
|
|
6979
|
+
...correlationFields()
|
|
6980
|
+
});
|
|
6588
6981
|
return;
|
|
6589
6982
|
}
|
|
6590
6983
|
this.cache.mergeCommon(common, {
|
|
6591
6984
|
releaseId: manifest.releaseId,
|
|
6592
6985
|
generation: expectedGeneration
|
|
6593
6986
|
});
|
|
6987
|
+
logs.info("runtimeMetadata.common.load.complete", {
|
|
6988
|
+
releaseId: expectedReleaseId,
|
|
6989
|
+
manifestRevision: manifest.revision,
|
|
6990
|
+
cacheGeneration: expectedGeneration,
|
|
6991
|
+
...correlationFields()
|
|
6992
|
+
});
|
|
6993
|
+
}
|
|
6994
|
+
/**
|
|
6995
|
+
* In-flight common loads are keyed by release and cache generation.
|
|
6996
|
+
* `releaseId` is the serving changeRevision (`current/manifest.json`).
|
|
6997
|
+
* A generation bump drops an older in-flight promise so helper caches
|
|
6998
|
+
* cannot outlive the extension snapshot.
|
|
6999
|
+
*/
|
|
7000
|
+
commonLoadKey(releaseId, generation) {
|
|
7001
|
+
return `${releaseId}:${generation}`;
|
|
6594
7002
|
}
|
|
6595
7003
|
syncUnsupportedProjectionRelease(releaseId) {
|
|
6596
7004
|
const id = releaseId ?? null;
|
|
@@ -6659,8 +7067,23 @@ var RuntimeMetadataService = class {
|
|
|
6659
7067
|
supportsType(typeCode) {
|
|
6660
7068
|
return this.resolver.supportsType(typeCode);
|
|
6661
7069
|
}
|
|
6662
|
-
resolveLocalization(typeCode, valueCode, locale) {
|
|
6663
|
-
return this.resolver.resolveLocalization(
|
|
7070
|
+
resolveLocalization(typeCode, valueCode, locale, options) {
|
|
7071
|
+
return this.resolver.resolveLocalization(
|
|
7072
|
+
typeCode,
|
|
7073
|
+
valueCode,
|
|
7074
|
+
locale,
|
|
7075
|
+
options
|
|
7076
|
+
);
|
|
7077
|
+
}
|
|
7078
|
+
/**
|
|
7079
|
+
* Localization catalog lookup only (`<typeCode>.<valueCode>`).
|
|
7080
|
+
* Never reads domain projection entries. Missing key → undefined.
|
|
7081
|
+
* Uninitialized / unavailable cache → typed error from the resolver.
|
|
7082
|
+
*/
|
|
7083
|
+
lookupLocalizationCatalog(typeCode, valueCode, locale) {
|
|
7084
|
+
return this.resolver.resolveLocalization(typeCode, valueCode, locale, {
|
|
7085
|
+
catalogOnly: true
|
|
7086
|
+
});
|
|
6664
7087
|
}
|
|
6665
7088
|
getLocalizationValue(keyOrTypeCode, valueCodeOrLocale, maybeLocale) {
|
|
6666
7089
|
if (keyOrTypeCode.includes(".")) {
|
|
@@ -6838,44 +7261,103 @@ var RuntimeMetadataService = class {
|
|
|
6838
7261
|
}
|
|
6839
7262
|
}
|
|
6840
7263
|
/**
|
|
6841
|
-
* Permission vocabulary for the
|
|
6842
|
-
*
|
|
6843
|
-
*
|
|
7264
|
+
* Permission vocabulary for one release. Pass the session returned by
|
|
7265
|
+
* beginMetadataRead() so every document in that session is release-pinned.
|
|
7266
|
+
* Omitting options preserves the legacy active-release read behavior.
|
|
6844
7267
|
*/
|
|
6845
|
-
async getPermissionRegistry() {
|
|
6846
|
-
|
|
6847
|
-
|
|
7268
|
+
async getPermissionRegistry(options) {
|
|
7269
|
+
const provider = await this.activeProvider();
|
|
7270
|
+
const status = await provider.getStatus();
|
|
7271
|
+
assertMetadataReadPolicy(options?.readPolicy, status.state, status.releaseId);
|
|
7272
|
+
assertReleasePin(options?.releaseId, status.releaseId);
|
|
7273
|
+
const releaseId = options?.releaseId ?? status.releaseId ?? "";
|
|
7274
|
+
if (!releaseId) {
|
|
7275
|
+
throw new MetadataProjectionUnavailableError(
|
|
7276
|
+
"Metadata projection release is unavailable"
|
|
7277
|
+
);
|
|
6848
7278
|
}
|
|
6849
|
-
const releaseId = this.cache.getReleaseId() ?? "";
|
|
6850
7279
|
const cached = this.permissionRegistryCache;
|
|
6851
|
-
if (cached && cached.releaseId === releaseId
|
|
7280
|
+
if (cached && cached.releaseId === releaseId) {
|
|
6852
7281
|
return cached.document;
|
|
6853
7282
|
}
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
this.permissionRegistryInFlight = null;
|
|
6858
|
-
}
|
|
6859
|
-
);
|
|
7283
|
+
const inFlight = this.permissionRegistryInFlight.get(releaseId);
|
|
7284
|
+
if (inFlight) {
|
|
7285
|
+
return inFlight;
|
|
6860
7286
|
}
|
|
6861
|
-
|
|
7287
|
+
const pending = this.loadPermissionRegistry(
|
|
7288
|
+
releaseId,
|
|
7289
|
+
options?.readPolicy,
|
|
7290
|
+
provider,
|
|
7291
|
+
status.cacheAgeMs
|
|
7292
|
+
).finally(
|
|
7293
|
+
() => this.permissionRegistryInFlight.delete(releaseId)
|
|
7294
|
+
);
|
|
7295
|
+
this.permissionRegistryInFlight.set(releaseId, pending);
|
|
7296
|
+
return pending;
|
|
6862
7297
|
}
|
|
6863
|
-
async loadPermissionRegistry(expectedReleaseId) {
|
|
6864
|
-
const
|
|
6865
|
-
const
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
7298
|
+
async loadPermissionRegistry(expectedReleaseId, readPolicy, provider, cacheAgeMs) {
|
|
7299
|
+
const selectedProvider = provider ?? await this.activeProvider();
|
|
7300
|
+
const started = Date.now();
|
|
7301
|
+
let document;
|
|
7302
|
+
try {
|
|
7303
|
+
document = await selectedProvider.getPermissionRegistry({
|
|
7304
|
+
releaseId: expectedReleaseId,
|
|
7305
|
+
readPolicy
|
|
7306
|
+
});
|
|
7307
|
+
} catch (err) {
|
|
7308
|
+
if (err instanceof MetadataReleaseMismatchError) {
|
|
7309
|
+
const actual = err.metadata?.actualReleaseId ?? null;
|
|
7310
|
+
this.logPermissionRegistryMismatch(
|
|
7311
|
+
expectedReleaseId,
|
|
7312
|
+
actual,
|
|
7313
|
+
selectedProvider,
|
|
7314
|
+
cacheAgeMs
|
|
7315
|
+
);
|
|
7316
|
+
}
|
|
7317
|
+
throw err;
|
|
6869
7318
|
}
|
|
6870
|
-
if (
|
|
6871
|
-
|
|
7319
|
+
if (document.releaseId !== expectedReleaseId) {
|
|
7320
|
+
this.logPermissionRegistryMismatch(
|
|
7321
|
+
expectedReleaseId,
|
|
7322
|
+
document.releaseId,
|
|
7323
|
+
selectedProvider,
|
|
7324
|
+
cacheAgeMs
|
|
7325
|
+
);
|
|
7326
|
+
throw new MetadataReleaseMismatchError(expectedReleaseId, document.releaseId);
|
|
6872
7327
|
}
|
|
6873
7328
|
this.permissionRegistryCache = {
|
|
6874
7329
|
releaseId: document.releaseId,
|
|
6875
7330
|
document
|
|
6876
7331
|
};
|
|
7332
|
+
createOperationalLogger(this.logger).observe({
|
|
7333
|
+
event: "runtimeMetadata.permissionRegistryRead",
|
|
7334
|
+
durationMs: Date.now() - started,
|
|
7335
|
+
thresholdMs: createOperationalLogger(this.logger).policy.slowLookupMs,
|
|
7336
|
+
fields: {
|
|
7337
|
+
sessionRelease: expectedReleaseId,
|
|
7338
|
+
registryRelease: document.releaseId,
|
|
7339
|
+
source: this.providerCoordinator.getActiveKind(),
|
|
7340
|
+
cacheLayer: "release-keyed-sdk-cache",
|
|
7341
|
+
cacheAgeMs: cacheAgeMs ?? null
|
|
7342
|
+
}
|
|
7343
|
+
});
|
|
6877
7344
|
return document;
|
|
6878
7345
|
}
|
|
7346
|
+
logPermissionRegistryMismatch(sessionRelease, registryRelease, provider, cacheAgeMs) {
|
|
7347
|
+
createOperationalLogger(this.logger).error("runtimeMetadata.releaseMismatch", {
|
|
7348
|
+
metric: "MetadataReleaseMismatch",
|
|
7349
|
+
sessionRelease,
|
|
7350
|
+
registryRelease,
|
|
7351
|
+
source: this.providerCoordinator.getActiveKind(),
|
|
7352
|
+
cacheLayer: provider.constructor.name,
|
|
7353
|
+
cacheAgeMs: cacheAgeMs ?? null,
|
|
7354
|
+
metadataExtensionLayerArn: process.env.METADATA_EXTENSION_LAYER_ARN ?? "unknown",
|
|
7355
|
+
extensionProtocolVersion: "2",
|
|
7356
|
+
functionName: process.env.AWS_LAMBDA_FUNCTION_NAME ?? "local",
|
|
7357
|
+
functionVersion: process.env.AWS_LAMBDA_FUNCTION_VERSION ?? "local",
|
|
7358
|
+
logStream: process.env.AWS_LAMBDA_LOG_STREAM_NAME ?? "local"
|
|
7359
|
+
});
|
|
7360
|
+
}
|
|
6879
7361
|
async getRelatedValueGroups(sourceTypeCode, sourceValueCodes, targetTypeCode, options) {
|
|
6880
7362
|
try {
|
|
6881
7363
|
const provider = await this.activeProvider();
|
|
@@ -7281,6 +7763,7 @@ var RuntimeMetadataService = class {
|
|
|
7281
7763
|
loadedFiles: ["manifest.json"],
|
|
7282
7764
|
downloadedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7283
7765
|
};
|
|
7766
|
+
this.logCacheTransition("replace", "extension-bootstrap", releaseId);
|
|
7284
7767
|
this.cache.replace(bundle);
|
|
7285
7768
|
this.syncUnsupportedProjectionRelease(releaseId);
|
|
7286
7769
|
this.logInstalledManifest("extension");
|
|
@@ -7296,10 +7779,16 @@ var RuntimeMetadataService = class {
|
|
|
7296
7779
|
releaseId: this.cache.getReleaseId(),
|
|
7297
7780
|
transport,
|
|
7298
7781
|
hasManifest: manifest != null,
|
|
7782
|
+
manifestReleaseId: manifest?.releaseId ?? null,
|
|
7783
|
+
manifestRevision: manifest?.revision ?? null,
|
|
7784
|
+
cacheGeneration: this.cache.getGeneration(),
|
|
7785
|
+
manifestFileCount: manifest?.files.length ?? 0,
|
|
7786
|
+
commonPresent: manifest?.files.some((file) => file.fileName === "common.json") ?? false,
|
|
7299
7787
|
metadataTypeCount,
|
|
7300
7788
|
lookupIndexCount,
|
|
7301
7789
|
cacheStatus: this.cache.getStatus(),
|
|
7302
7790
|
catalogAvailable,
|
|
7791
|
+
...correlationFields(),
|
|
7303
7792
|
...catalogAvailable ? {} : { reason: "catalog-empty" }
|
|
7304
7793
|
};
|
|
7305
7794
|
if (!catalogAvailable) {
|
|
@@ -7308,6 +7797,23 @@ var RuntimeMetadataService = class {
|
|
|
7308
7797
|
}
|
|
7309
7798
|
logs.info(RUNTIME_METADATA_EVENTS.METADATA_MANIFEST_LOADED, payload);
|
|
7310
7799
|
}
|
|
7800
|
+
logCacheTransition(operation, reason, newReleaseId) {
|
|
7801
|
+
const manifest = this.cache.getManifest();
|
|
7802
|
+
createOperationalLogger(this.logger).info("runtimeMetadata.cache.transition", {
|
|
7803
|
+
operation,
|
|
7804
|
+
reason,
|
|
7805
|
+
oldReleaseId: this.cache.getReleaseId(),
|
|
7806
|
+
newReleaseId: newReleaseId ?? null,
|
|
7807
|
+
cachedReleaseId: this.cache.getReleaseId(),
|
|
7808
|
+
manifestReleaseId: manifest?.releaseId ?? null,
|
|
7809
|
+
manifestRevision: manifest?.revision ?? null,
|
|
7810
|
+
cacheGeneration: this.cache.getGeneration(),
|
|
7811
|
+
manifestFileCount: manifest?.files.length ?? 0,
|
|
7812
|
+
commonPresent: manifest?.files.some((file) => file.fileName === "common.json") ?? false,
|
|
7813
|
+
lambdaLogStreamName: process.env.AWS_LAMBDA_LOG_STREAM_NAME,
|
|
7814
|
+
...correlationFields()
|
|
7815
|
+
});
|
|
7816
|
+
}
|
|
7311
7817
|
hydrateProviderValues(values, guard) {
|
|
7312
7818
|
if (!this.cache.isReady() || values.length === 0 || !guard.releaseId) {
|
|
7313
7819
|
return;
|
|
@@ -7400,15 +7906,19 @@ var RuntimeMetadataService = class {
|
|
|
7400
7906
|
return true;
|
|
7401
7907
|
}
|
|
7402
7908
|
};
|
|
7909
|
+
function isLocalizationNotFound(err) {
|
|
7910
|
+
return err.code === "RUNTIME_METADATA_NOT_FOUND";
|
|
7911
|
+
}
|
|
7403
7912
|
function recoveryCooldownMs(env) {
|
|
7404
7913
|
return resolveExtensionRecoveryIntervalMs(env);
|
|
7405
7914
|
}
|
|
7406
7915
|
function correlationFields() {
|
|
7407
7916
|
const correlationId = getContext().correlationId;
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7917
|
+
return {
|
|
7918
|
+
...correlationId && correlationId !== "unknown" ? { correlationId } : {},
|
|
7919
|
+
...process.env.AWS_LAMBDA_LOG_STREAM_NAME ? { lambdaLogStreamName: process.env.AWS_LAMBDA_LOG_STREAM_NAME } : {},
|
|
7920
|
+
...process.env.AWS_REQUEST_ID ? { requestId: process.env.AWS_REQUEST_ID } : {}
|
|
7921
|
+
};
|
|
7412
7922
|
}
|
|
7413
7923
|
function performanceCounters(provider) {
|
|
7414
7924
|
const candidate = provider;
|
|
@@ -7618,6 +8128,10 @@ var InMemoryMetadataProvider = class {
|
|
|
7618
8128
|
options?.locale
|
|
7619
8129
|
);
|
|
7620
8130
|
}
|
|
8131
|
+
/**
|
|
8132
|
+
* In-process multi-get by metadata reference (not DynamoDB BatchGetCommand).
|
|
8133
|
+
* UnprocessedItems / UnprocessedKeys do not apply. maxRetries N/A (no retry loop).
|
|
8134
|
+
*/
|
|
7621
8135
|
async batchGet(references, options) {
|
|
7622
8136
|
const invalidReferences = [];
|
|
7623
8137
|
const items = {};
|
|
@@ -7707,13 +8221,15 @@ var InMemoryMetadataProvider = class {
|
|
|
7707
8221
|
if (!dictionary) return void 0;
|
|
7708
8222
|
return { ...dictionary };
|
|
7709
8223
|
}
|
|
7710
|
-
async getPermissionRegistry() {
|
|
8224
|
+
async getPermissionRegistry(options) {
|
|
8225
|
+
this.assertReadable(options?.readPolicy, options?.releaseId);
|
|
7711
8226
|
if (this.unavailable || !this.permissionRegistry) {
|
|
7712
8227
|
throw new MetadataProjectionUnavailableError(
|
|
7713
8228
|
"Permission registry is not available",
|
|
7714
8229
|
{ retryable: this.unavailable }
|
|
7715
8230
|
);
|
|
7716
8231
|
}
|
|
8232
|
+
assertReleasePin(options?.releaseId, this.permissionRegistry.releaseId);
|
|
7717
8233
|
return this.permissionRegistry;
|
|
7718
8234
|
}
|
|
7719
8235
|
async getRelatedValueGroups(sourceTypeCode, sourceValueCodes, targetTypeCode, options) {
|
|
@@ -7821,10 +8337,10 @@ var InMemoryMetadataProvider = class {
|
|
|
7821
8337
|
}
|
|
7822
8338
|
async listValuesByTypes(typeCodes, options) {
|
|
7823
8339
|
this.assertReadable(options?.readPolicy, options?.releaseId);
|
|
7824
|
-
if (typeCodes.length === 0 || typeCodes.length >
|
|
8340
|
+
if (typeCodes.length === 0 || typeCodes.length > PUBLISHED_VALUE_LIST_LIMITS.MAX_BATCH_TYPES) {
|
|
7825
8341
|
throwPublishedListFailure({
|
|
7826
8342
|
code: "METADATA_DISCOVERY_INVALID",
|
|
7827
|
-
message:
|
|
8343
|
+
message: `typeCodes must contain between 1 and ${PUBLISHED_VALUE_LIST_LIMITS.MAX_BATCH_TYPES} metadata types`
|
|
7828
8344
|
});
|
|
7829
8345
|
}
|
|
7830
8346
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -8002,6 +8518,6 @@ var InMemoryMetadataProvider = class {
|
|
|
8002
8518
|
}
|
|
8003
8519
|
};
|
|
8004
8520
|
|
|
8005
|
-
export { APPLIES_TO_LINKED_ENTITY_METADATA_TYPE, CACHE_STATUS, DEFAULT_EXCLUDED_CODE_FIELDS, DEFAULT_PROVIDER_RECOVERY_COOLDOWN_MS, ExtensionMetadataProvider, FIELD_KEY_METADATA_TYPE_ALIASES, InMemoryMetadataProvider, InvalidMetadataReferenceError, METADATA_ATTRIBUTE_FILTER_KEY, METADATA_PROJECTIONS_BUCKET_ENV, METADATA_PROVIDER_KIND, METADATA_READ_POLICY, METADATA_RELATION_DIRECTION, METADATA_TRAVERSAL_MAX_DEPTH, METADATA_TRAVERSAL_MAX_NODES, ManifestValidationError, MetadataCache, MetadataDiscoveryError, MetadataDownloader, MetadataExtensionContractError, MetadataFreshnessError, MetadataHealthService, MetadataLoader, MetadataLookupError, MetadataNotReadyError, MetadataProjectionUnavailableError, MetadataRefreshService, MetadataReleaseMismatchError, MetadataResolver, NON_METADATA_KEYS, PROVIDER_TRANSPORT_STATE, ProjectionDownloadError, ProviderFailoverCoordinator, REFRESH_STATUS, RELATIONSHIP_QUERY_BATCH_LIMIT, RUNTIME_METADATA_EVENTS, RUNTIME_METADATA_INTEGRATION_TARGETS, RUNTIME_METADATA_TYPE_CODE_ALIASES, RuntimeMetadataError, RuntimeMetadataService, S3MetadataProvider, UnknownMetadataTypeError, WORKFLOW_STEP_RULE_KEYS, assertMetadataReadPolicy, assertReleasePin, canonicalMetadataProjectionsBucketName, collectResponseReferences, collectResponseTypeCodes, createCodeFieldExclusionSet, createRuntimeMetadataFromEnv, defaultExtensionBaseUrl, ensureRuntimeMetadataLoaded, formatMetadataReference, getCandidateTypeCodesForKey, getRuntimeMetadataHealth, getRuntimeMetadataService, hasPotentialMetadata, isCompactMetadataReference, isExtensionEnabled, isExtensionServing, isFreshProjectionState, isLinkedEntityCodeField, isMetadataProjectionConfigured, isMetadataProjectionsBucketConfigured, isMetadataReference, isMetadataValueObject, isMetadataValueObjectArray, isTemplateRuleConfiguration, isTemplateRuleNode, isTemplateRulesMap, isWorkflowStepRecord, isWorkflowStepRuleField, linkedEntityMetadataTypeFromAppliesTo, localizedLabelFromEntry, manifestLocalizationSchema, metadataGroupFromManifest, metadataValueToReference, normalizeRuntimeMetadataTypeCode, onMetadataProjectionCompleted, parseMetadataReference, projectionEntryToMetadataValue, projectionManifestSchema, readAppliesToTypeValue, readMetadataProjectionsBucket, readModelGroupsFromManifest, relatedValueCodes, resetRuntimeMetadataBootstrapState, resolveMetadataProjectionsBucket, resolveRuntimeMetadataConfig, runtimeMetadataConfigSchema, selectMetadataProvider, supportsMetadataDiscovery, throwPublishedListFailure, tryGetRuntimeMetadataService, tryParseMetadataReference, typeCodeFromCodeFieldName };
|
|
8521
|
+
export { APPLIES_TO_LINKED_ENTITY_METADATA_TYPE, CACHE_STATUS, DEFAULT_EXCLUDED_CODE_FIELDS, DEFAULT_PROVIDER_RECOVERY_COOLDOWN_MS, ExtensionMetadataProvider, FIELD_KEY_METADATA_TYPE_ALIASES, InMemoryMetadataProvider, InvalidMetadataReferenceError, METADATA_ATTRIBUTE_FILTER_KEY, METADATA_PROJECTIONS_BUCKET_ENV, METADATA_PROVIDER_KIND, METADATA_READ_POLICY, METADATA_RELATION_DIRECTION, METADATA_TRAVERSAL_MAX_DEPTH, METADATA_TRAVERSAL_MAX_NODES, ManifestValidationError, MetadataCache, MetadataDiscoveryError, MetadataDownloader, MetadataExtensionContractError, MetadataExtensionProtocolError, MetadataFreshnessError, MetadataHealthService, MetadataLoader, MetadataLookupError, MetadataNotReadyError, MetadataProjectionUnavailableError, MetadataRefreshService, MetadataReleaseMismatchError, MetadataResolver, NON_METADATA_KEYS, PROVIDER_TRANSPORT_STATE, ProjectionDownloadError, ProviderFailoverCoordinator, REFRESH_STATUS, RELATIONSHIP_QUERY_BATCH_LIMIT, REQUIRED_METADATA_EXTENSION_PROTOCOL_VERSION, RUNTIME_METADATA_EVENTS, RUNTIME_METADATA_INTEGRATION_TARGETS, RUNTIME_METADATA_TYPE_CODE_ALIASES, RuntimeMetadataError, RuntimeMetadataService, S3MetadataProvider, UnknownMetadataTypeError, WORKFLOW_STEP_RULE_KEYS, assertMetadataReadPolicy, assertReleasePin, canonicalMetadataProjectionsBucketName, collectResponseReferences, collectResponseTypeCodes, createCodeFieldExclusionSet, createRuntimeMetadataFromEnv, defaultExtensionBaseUrl, ensureRuntimeMetadataLoaded, formatMetadataReference, getCandidateTypeCodesForKey, getRuntimeMetadataHealth, getRuntimeMetadataService, hasPotentialMetadata, isCompactMetadataReference, isExtensionEnabled, isExtensionServing, isFreshProjectionState, isLinkedEntityCodeField, isMetadataProjectionConfigured, isMetadataProjectionsBucketConfigured, isMetadataReference, isMetadataValueObject, isMetadataValueObjectArray, isTemplateRuleConfiguration, isTemplateRuleNode, isTemplateRulesMap, isWorkflowStepRecord, isWorkflowStepRuleField, linkedEntityMetadataTypeFromAppliesTo, localizedLabelFromEntry, manifestLocalizationSchema, metadataGroupFromManifest, metadataValueToReference, normalizeRuntimeMetadataTypeCode, onMetadataProjectionCompleted, parseMetadataReference, projectionEntryToMetadataValue, projectionManifestSchema, readAppliesToTypeValue, readMetadataProjectionsBucket, readModelGroupsFromManifest, relatedValueCodes, resetRuntimeMetadataBootstrapState, resolveMetadataProjectionsBucket, resolveRuntimeMetadataConfig, runtimeMetadataConfigSchema, selectMetadataProvider, supportsMetadataDiscovery, throwPublishedListFailure, tryGetRuntimeMetadataService, tryParseMetadataReference, typeCodeFromCodeFieldName };
|
|
8006
8522
|
//# sourceMappingURL=index.js.map
|
|
8007
8523
|
//# sourceMappingURL=index.js.map
|