@ductape/sdk 0.1.155 → 0.1.157
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/apps/utils/credential-manager.d.ts +7 -0
- package/dist/apps/utils/credential-manager.js +30 -1
- package/dist/apps/utils/credential-manager.js.map +1 -1
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +2 -2
- package/dist/processor/services/processor.service.js +21 -20
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/products/services/products.service.js +11 -7
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/productsBuilder.types.d.ts +2 -0
- package/dist/types/productsBuilder.types.js.map +1 -1
- package/package.json +1 -1
|
@@ -2700,27 +2700,31 @@ class ProductsBuilderService {
|
|
|
2700
2700
|
if (!appEnv) {
|
|
2701
2701
|
throw new Error(`app_slug ${env.app_env_slug} not found`);
|
|
2702
2702
|
}
|
|
2703
|
-
|
|
2703
|
+
const updates = auth ? this.validateAppAuth(auth, version) : null;
|
|
2704
2704
|
this.validateVariablesSchema(env.variables, version.variables, appEnv.base_url_variables);
|
|
2705
2705
|
this.validateVariablesValues(env.variables, version.variables);
|
|
2706
2706
|
this.validateBaseUrlVariablesRequired(env.variables, appEnv.base_url_variables);
|
|
2707
|
-
|
|
2708
|
-
|
|
2707
|
+
if (updates && updates.data && env.auth) {
|
|
2708
|
+
env.auth.data = updates.data;
|
|
2709
|
+
}
|
|
2710
|
+
if (updates && updates.values && env.auth) {
|
|
2711
|
+
env.auth.values = updates.values;
|
|
2709
2712
|
}
|
|
2710
|
-
|
|
2711
|
-
if (updates && updates.values) {
|
|
2712
|
-
env.auth.values = updates.values;
|
|
2713
|
-
}*/
|
|
2714
2713
|
return env;
|
|
2715
2714
|
});
|
|
2716
2715
|
}
|
|
2717
2716
|
validateAppAuth(auth, version) {
|
|
2717
|
+
var _a;
|
|
2718
2718
|
const { auths: appAuth, actions } = version;
|
|
2719
2719
|
const exists = appAuth.find((appAuth) => appAuth.tag === auth.auth_tag);
|
|
2720
2720
|
if (!exists) {
|
|
2721
2721
|
throw new Error(`app_auth ${auth.auth_tag} not found`);
|
|
2722
2722
|
}
|
|
2723
2723
|
const { data } = auth;
|
|
2724
|
+
// Existing mappings are already encrypted. Updates that do not replace auth
|
|
2725
|
+
// must preserve the ciphertext instead of attempting to validate/encrypt it again.
|
|
2726
|
+
if (typeof data === 'string')
|
|
2727
|
+
return { data, values: (_a = auth.values) !== null && _a !== void 0 ? _a : null };
|
|
2724
2728
|
let bodySchema;
|
|
2725
2729
|
let headerSchema;
|
|
2726
2730
|
let paramsSchema;
|