superposition-provider 0.97.0 → 0.97.2
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/dist/index.esm.js +112 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +111 -14
- package/dist/index.js.map +1 -1
- package/dist/native-lib/libsuperposition_core-aarch64-apple-darwin.dylib +0 -0
- package/dist/native-lib/libsuperposition_core-x86_64-apple-darwin.dylib +0 -0
- package/dist/native-lib/libsuperposition_core-x86_64-pc-windows-msvc.dll +0 -0
- package/dist/native-lib/libsuperposition_core-x86_64-unknown-linux-gnu.so +0 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { OpenFeatureEventEmitter, ProviderStatus, ProviderEvents, ErrorCode } from '@openfeature/server-sdk';
|
|
2
|
-
import require$$1$3 from '../package.json';
|
|
1
|
+
import { OpenFeatureEventEmitter, ProviderStatus, ProviderEvents, ErrorCode, StandardResolutionReasons } from '@openfeature/server-sdk';
|
|
3
2
|
import os, { platform, release, homedir } from 'os';
|
|
4
3
|
import { versions, env } from 'process';
|
|
5
4
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
@@ -3127,7 +3126,7 @@ var distEs$g = /*#__PURE__*/Object.freeze({
|
|
|
3127
3126
|
|
|
3128
3127
|
var require$$3$3 = /*@__PURE__*/getAugmentedNamespace(distEs$g);
|
|
3129
3128
|
|
|
3130
|
-
var require$$1$
|
|
3129
|
+
var require$$1$3 = /*@__PURE__*/getAugmentedNamespace(distEs$m);
|
|
3131
3130
|
|
|
3132
3131
|
var hasRequiredHttpAuthSchemeProvider;
|
|
3133
3132
|
|
|
@@ -3137,7 +3136,7 @@ function requireHttpAuthSchemeProvider () {
|
|
|
3137
3136
|
Object.defineProperty(httpAuthSchemeProvider, "__esModule", { value: true });
|
|
3138
3137
|
httpAuthSchemeProvider.resolveHttpAuthSchemeConfig = httpAuthSchemeProvider.defaultSuperpositionHttpAuthSchemeProvider = httpAuthSchemeProvider.defaultSuperpositionHttpAuthSchemeParametersProvider = void 0;
|
|
3139
3138
|
const core_1 = require$$3$3;
|
|
3140
|
-
const util_middleware_1 = require$$1$
|
|
3139
|
+
const util_middleware_1 = require$$1$3;
|
|
3141
3140
|
const defaultSuperpositionHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
3142
3141
|
return {
|
|
3143
3142
|
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
@@ -3179,6 +3178,108 @@ function requireHttpAuthSchemeProvider () {
|
|
|
3179
3178
|
|
|
3180
3179
|
var runtimeConfig = {};
|
|
3181
3180
|
|
|
3181
|
+
var name = "superposition-sdk";
|
|
3182
|
+
var description = "superposition-sdk client";
|
|
3183
|
+
var version = "0.97.2";
|
|
3184
|
+
var repository = {
|
|
3185
|
+
type: "git",
|
|
3186
|
+
url: "git+https://github.com/juspay/superposition.git"
|
|
3187
|
+
};
|
|
3188
|
+
var scripts = {
|
|
3189
|
+
build: "npm run build:types && npm run build:cjs && npm run build:es",
|
|
3190
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
3191
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
3192
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
3193
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
3194
|
+
clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
3195
|
+
prepack: "npm run clean && npm run build",
|
|
3196
|
+
prepublishOnly: "npm --no-git-tag-version version $VERSION"
|
|
3197
|
+
};
|
|
3198
|
+
var main = "./dist-cjs/index.js";
|
|
3199
|
+
var types = "./dist-types/index.d.ts";
|
|
3200
|
+
var module = "./dist-es/index.js";
|
|
3201
|
+
var sideEffects = false;
|
|
3202
|
+
var dependencies = {
|
|
3203
|
+
tslib: "^2.6.2",
|
|
3204
|
+
"@aws-crypto/sha256-browser": "5.2.0",
|
|
3205
|
+
"@aws-crypto/sha256-js": "5.2.0",
|
|
3206
|
+
"@aws-sdk/core": "3.731.0",
|
|
3207
|
+
"@aws-sdk/middleware-host-header": "3.731.0",
|
|
3208
|
+
"@aws-sdk/middleware-logger": "3.731.0",
|
|
3209
|
+
"@aws-sdk/middleware-recursion-detection": "3.731.0",
|
|
3210
|
+
"@aws-sdk/middleware-user-agent": "3.731.0",
|
|
3211
|
+
"@aws-sdk/types": "3.731.0",
|
|
3212
|
+
"@aws-sdk/util-user-agent-browser": "3.731.0",
|
|
3213
|
+
"@aws-sdk/util-user-agent-node": "3.731.0",
|
|
3214
|
+
"@smithy/config-resolver": "^4.0.1",
|
|
3215
|
+
"@smithy/core": "^3.1.1",
|
|
3216
|
+
"@smithy/fetch-http-handler": "^5.0.1",
|
|
3217
|
+
"@smithy/hash-node": "^4.0.1",
|
|
3218
|
+
"@smithy/invalid-dependency": "^4.0.1",
|
|
3219
|
+
"@smithy/middleware-content-length": "^4.0.1",
|
|
3220
|
+
"@smithy/middleware-retry": "^4.0.3",
|
|
3221
|
+
"@smithy/middleware-serde": "^4.0.1",
|
|
3222
|
+
"@smithy/middleware-stack": "^4.0.1",
|
|
3223
|
+
"@smithy/node-config-provider": "^4.0.1",
|
|
3224
|
+
"@smithy/node-http-handler": "^4.0.2",
|
|
3225
|
+
"@smithy/protocol-http": "^5.0.1",
|
|
3226
|
+
"@smithy/smithy-client": "^4.1.2",
|
|
3227
|
+
"@smithy/types": "^4.1.0",
|
|
3228
|
+
"@smithy/url-parser": "^4.0.1",
|
|
3229
|
+
"@smithy/util-base64": "^4.0.0",
|
|
3230
|
+
"@smithy/util-body-length-browser": "^4.0.0",
|
|
3231
|
+
"@smithy/util-body-length-node": "^4.0.0",
|
|
3232
|
+
"@smithy/util-defaults-mode-browser": "^4.0.3",
|
|
3233
|
+
"@smithy/util-defaults-mode-node": "^4.0.3",
|
|
3234
|
+
"@smithy/util-middleware": "^4.0.1",
|
|
3235
|
+
"@smithy/util-retry": "^4.0.1",
|
|
3236
|
+
"@smithy/util-utf8": "^4.0.0"
|
|
3237
|
+
};
|
|
3238
|
+
var devDependencies = {
|
|
3239
|
+
"@tsconfig/node18": "18.2.4",
|
|
3240
|
+
concurrently: "7.0.0",
|
|
3241
|
+
"downlevel-dts": "0.10.1",
|
|
3242
|
+
rimraf: "^3.0.0",
|
|
3243
|
+
typescript: "~5.2.2",
|
|
3244
|
+
"@types/node": "^18.19.69"
|
|
3245
|
+
};
|
|
3246
|
+
var engines = {
|
|
3247
|
+
node: ">=18.0.0"
|
|
3248
|
+
};
|
|
3249
|
+
var typesVersions = {
|
|
3250
|
+
"<4.0": {
|
|
3251
|
+
"dist-types/*": [
|
|
3252
|
+
"dist-types/ts3.4/*"
|
|
3253
|
+
]
|
|
3254
|
+
}
|
|
3255
|
+
};
|
|
3256
|
+
var files = [
|
|
3257
|
+
"dist-*/**"
|
|
3258
|
+
];
|
|
3259
|
+
var browser = {
|
|
3260
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
3261
|
+
};
|
|
3262
|
+
var require$$1$2 = {
|
|
3263
|
+
name: name,
|
|
3264
|
+
description: description,
|
|
3265
|
+
version: version,
|
|
3266
|
+
repository: repository,
|
|
3267
|
+
scripts: scripts,
|
|
3268
|
+
main: main,
|
|
3269
|
+
types: types,
|
|
3270
|
+
module: module,
|
|
3271
|
+
sideEffects: sideEffects,
|
|
3272
|
+
dependencies: dependencies,
|
|
3273
|
+
devDependencies: devDependencies,
|
|
3274
|
+
engines: engines,
|
|
3275
|
+
typesVersions: typesVersions,
|
|
3276
|
+
files: files,
|
|
3277
|
+
browser: browser,
|
|
3278
|
+
"react-native": {
|
|
3279
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
3280
|
+
}
|
|
3281
|
+
};
|
|
3282
|
+
|
|
3182
3283
|
const crtAvailability = {
|
|
3183
3284
|
isCrtAvailable: false,
|
|
3184
3285
|
};
|
|
@@ -8702,7 +8803,7 @@ function requireRuntimeConfig () {
|
|
|
8702
8803
|
Object.defineProperty(runtimeConfig, "__esModule", { value: true });
|
|
8703
8804
|
runtimeConfig.getRuntimeConfig = void 0;
|
|
8704
8805
|
const tslib_1 = require$$0;
|
|
8705
|
-
const package_json_1 = tslib_1.__importDefault(require$$1$
|
|
8806
|
+
const package_json_1 = tslib_1.__importDefault(require$$1$2);
|
|
8706
8807
|
const util_user_agent_node_1 = require$$2$1;
|
|
8707
8808
|
const hash_node_1 = require$$3$2;
|
|
8708
8809
|
const middleware_retry_1 = require$$10;
|
|
@@ -9631,7 +9732,6 @@ function requireAws_restJson1 () {
|
|
|
9631
9732
|
'enable_change_reason_validation': [],
|
|
9632
9733
|
'enable_context_validation': [],
|
|
9633
9734
|
'metrics': _ => se_Document(_),
|
|
9634
|
-
'strict_mode': [],
|
|
9635
9735
|
'workspace_admin_email': [],
|
|
9636
9736
|
'workspace_name': [],
|
|
9637
9737
|
'workspace_status': [],
|
|
@@ -11206,7 +11306,6 @@ function requireAws_restJson1 () {
|
|
|
11206
11306
|
'metrics': _ => de_Document(_),
|
|
11207
11307
|
'organisation_id': smithy_client_1.expectString,
|
|
11208
11308
|
'organisation_name': smithy_client_1.expectString,
|
|
11209
|
-
'strict_mode': smithy_client_1.expectBoolean,
|
|
11210
11309
|
'workspace_admin_email': smithy_client_1.expectString,
|
|
11211
11310
|
'workspace_name': smithy_client_1.expectString,
|
|
11212
11311
|
'workspace_schema_name': smithy_client_1.expectString,
|
|
@@ -11826,7 +11925,6 @@ function requireAws_restJson1 () {
|
|
|
11826
11925
|
'metrics': _ => de_Document(_),
|
|
11827
11926
|
'organisation_id': smithy_client_1.expectString,
|
|
11828
11927
|
'organisation_name': smithy_client_1.expectString,
|
|
11829
|
-
'strict_mode': smithy_client_1.expectBoolean,
|
|
11830
11928
|
'workspace_admin_email': smithy_client_1.expectString,
|
|
11831
11929
|
'workspace_name': smithy_client_1.expectString,
|
|
11832
11930
|
'workspace_schema_name': smithy_client_1.expectString,
|
|
@@ -12062,7 +12160,6 @@ function requireAws_restJson1 () {
|
|
|
12062
12160
|
'metrics': _ => de_Document(_),
|
|
12063
12161
|
'organisation_id': smithy_client_1.expectString,
|
|
12064
12162
|
'organisation_name': smithy_client_1.expectString,
|
|
12065
|
-
'strict_mode': smithy_client_1.expectBoolean,
|
|
12066
12163
|
'workspace_admin_email': smithy_client_1.expectString,
|
|
12067
12164
|
'workspace_name': smithy_client_1.expectString,
|
|
12068
12165
|
'workspace_schema_name': smithy_client_1.expectString,
|
|
@@ -12561,7 +12658,6 @@ function requireAws_restJson1 () {
|
|
|
12561
12658
|
'metrics': _ => de_Document(_),
|
|
12562
12659
|
'organisation_id': smithy_client_1.expectString,
|
|
12563
12660
|
'organisation_name': smithy_client_1.expectString,
|
|
12564
|
-
'strict_mode': smithy_client_1.expectBoolean,
|
|
12565
12661
|
'workspace_admin_email': smithy_client_1.expectString,
|
|
12566
12662
|
'workspace_name': smithy_client_1.expectString,
|
|
12567
12663
|
'workspace_schema_name': smithy_client_1.expectString,
|
|
@@ -13203,7 +13299,6 @@ function requireAws_restJson1 () {
|
|
|
13203
13299
|
'metrics': (_) => de_Document(_),
|
|
13204
13300
|
'organisation_id': smithy_client_1.expectString,
|
|
13205
13301
|
'organisation_name': smithy_client_1.expectString,
|
|
13206
|
-
'strict_mode': smithy_client_1.expectBoolean,
|
|
13207
13302
|
'workspace_admin_email': smithy_client_1.expectString,
|
|
13208
13303
|
'workspace_name': smithy_client_1.expectString,
|
|
13209
13304
|
'workspace_schema_name': smithy_client_1.expectString,
|
|
@@ -16783,7 +16878,7 @@ class SuperpositionProvider {
|
|
|
16783
16878
|
this.status !== ProviderStatus.STALE) {
|
|
16784
16879
|
return {
|
|
16785
16880
|
value: defaultValue,
|
|
16786
|
-
reason:
|
|
16881
|
+
reason: StandardResolutionReasons.DEFAULT,
|
|
16787
16882
|
errorCode: this.status === ProviderStatus.FATAL
|
|
16788
16883
|
? ErrorCode.PROVIDER_FATAL
|
|
16789
16884
|
: ErrorCode.PROVIDER_NOT_READY,
|
|
@@ -16795,14 +16890,16 @@ class SuperpositionProvider {
|
|
|
16795
16890
|
return {
|
|
16796
16891
|
value,
|
|
16797
16892
|
reason: this.status === ProviderStatus.STALE
|
|
16798
|
-
?
|
|
16799
|
-
:
|
|
16893
|
+
? StandardResolutionReasons.STALE
|
|
16894
|
+
: value === defaultValue
|
|
16895
|
+
? StandardResolutionReasons.DEFAULT
|
|
16896
|
+
: StandardResolutionReasons.TARGETING_MATCH,
|
|
16800
16897
|
};
|
|
16801
16898
|
}
|
|
16802
16899
|
catch (error) {
|
|
16803
16900
|
return {
|
|
16804
16901
|
value: defaultValue,
|
|
16805
|
-
reason:
|
|
16902
|
+
reason: StandardResolutionReasons.ERROR,
|
|
16806
16903
|
errorCode: ErrorCode.GENERAL,
|
|
16807
16904
|
errorMessage: error instanceof Error
|
|
16808
16905
|
? error.message
|