@http-forge/core 0.2.10 → 0.2.12
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 +16 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +116 -116
- package/dist/index.mjs +122 -122
- package/dist/infrastructure/script/script-executor.d.ts +11 -0
- package/dist/infrastructure/test-suite/interfaces.d.ts +1 -0
- package/dist/infrastructure/test-suite/test-suite-service.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -217,6 +217,22 @@ const data = pm.response.json();
|
|
|
217
217
|
pm.environment.set('userId', data.id);
|
|
218
218
|
pm.environment.set('authToken', data.token);
|
|
219
219
|
|
|
220
|
+
// Store non-string values (auto-serialized with type safety)
|
|
221
|
+
pm.environment.set('userList', data.users); // Array → stored with type marker
|
|
222
|
+
pm.environment.set('config', { retries: 3 }); // Object → stored with type marker
|
|
223
|
+
pm.environment.set('count', 42); // Number → stored with type marker
|
|
224
|
+
|
|
225
|
+
// get() auto-deserializes back to the original type
|
|
226
|
+
const users = pm.environment.get('userList'); // → Array
|
|
227
|
+
const config = pm.environment.get('config'); // → Object
|
|
228
|
+
const count = pm.environment.get('count'); // → 42 (number)
|
|
229
|
+
|
|
230
|
+
// Strings are never misinterpreted — "true" stays a string, true stays a boolean
|
|
231
|
+
pm.environment.set('flag', true); // boolean
|
|
232
|
+
pm.environment.set('label', 'true'); // string
|
|
233
|
+
pm.environment.get('flag'); // → true (boolean)
|
|
234
|
+
pm.environment.get('label'); // → "true" (string)
|
|
235
|
+
|
|
220
236
|
// Store cookies from response
|
|
221
237
|
if (pm.response.headers.has('Set-Cookie')) {
|
|
222
238
|
pm.cookies.set('authCookie', data.authCookie);
|
package/dist/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export * from './infrastructure/collection/folder-io';
|
|
|
62
62
|
export { generateSlug } from './infrastructure/collection/folder-io';
|
|
63
63
|
export { ParserRegistry } from './infrastructure/collection/parser-registry';
|
|
64
64
|
export { JsonCollectionLoader } from './infrastructure/collection/json-collection-loader';
|
|
65
|
-
export type { Collection, ICollectionService } from './types/collection';
|
|
65
|
+
export type { Collection, CollectionFolderItem, CollectionItem, CollectionRequestItem, ICollectionService } from './types/collection';
|
|
66
66
|
export { EnvironmentConfigService } from './infrastructure/environment/environment-config-service';
|
|
67
67
|
export { isSystemEnvironmentFile, loadEnvironmentsFromFolder } from './infrastructure/environment/environment-file-loader';
|
|
68
68
|
export type { EnvironmentEntry, EnvironmentFolderData } from './infrastructure/environment/environment-file-loader';
|