@candlerip/shared 0.0.144 → 0.0.146

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.
@@ -1 +1 @@
1
- export declare const S3_URL_TEMPLATE = "https://s3.<AWS_REGION>.amazonaws.com";
1
+ export declare const S3_URL_TEMPLATE = "https://s3.<AWS_REGION>.amazonaws.com/<BUCKET_NAME>";
@@ -1 +1 @@
1
- export const S3_URL_TEMPLATE = `https://s3.<AWS_REGION>.amazonaws.com`;
1
+ export const S3_URL_TEMPLATE = `https://s3.<AWS_REGION>.amazonaws.com/<BUCKET_NAME>`;
@@ -1,2 +1,2 @@
1
1
  import { S3_URL_TEMPLATE } from '../../constants.js';
2
- export const composeS3Url = (awsRegion) => S3_URL_TEMPLATE.replace('<AWS_REGION>', awsRegion);
2
+ export const composeS3Url = (awsRegion, bucketName) => S3_URL_TEMPLATE.replace('<AWS_REGION>', awsRegion).replace('<BUCKET_NAME>', bucketName);
@@ -1 +1 @@
1
- export type ComposeS3Url = (awsRegion: string) => string;
1
+ export type ComposeS3Url = (region: string, bucketName: string) => string;
@@ -1,3 +1,12 @@
1
- import { isObject } from '../../type/index.js';
2
- import { revealAllObjectProps } from '../reveal-all-object-props/index.js';
3
- export const stringify = (obj) => JSON.stringify(isObject(obj) ? revealAllObjectProps(obj) : obj);
1
+ export const stringify = (obj, space = 2) => {
2
+ const seen = new WeakSet();
3
+ return JSON.stringify(obj, (key, value) => {
4
+ if (typeof value === 'object' && value !== null) {
5
+ if (seen.has(value)) {
6
+ return '[Circular]';
7
+ }
8
+ seen.add(value);
9
+ }
10
+ return value;
11
+ }, space);
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared",
3
- "version": "0.0.144",
3
+ "version": "0.0.146",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "=22.19.0"