@geekmidas/envkit 0.0.6 → 0.0.7
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.
|
@@ -275,8 +275,8 @@ const vitest = require_chunk.__toESM(require("vitest"));
|
|
|
275
275
|
name: "test-bucket"
|
|
276
276
|
};
|
|
277
277
|
const result = require_sst.normalizeResourceEnv({
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
s3_bucket_v2_1: bucket,
|
|
279
|
+
bucket_123_456: bucket
|
|
280
280
|
});
|
|
281
281
|
(0, vitest.expect)(result).toEqual({
|
|
282
282
|
S3_BUCKET_V21_NAME: "test-bucket",
|
|
@@ -274,8 +274,8 @@ describe("sst", () => {
|
|
|
274
274
|
name: "test-bucket"
|
|
275
275
|
};
|
|
276
276
|
const result = normalizeResourceEnv({
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
s3_bucket_v2_1: bucket,
|
|
278
|
+
bucket_123_456: bucket
|
|
279
279
|
});
|
|
280
280
|
expect(result).toEqual({
|
|
281
281
|
S3_BUCKET_V21_NAME: "test-bucket",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/envkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"zod": "~3.25.67",
|
|
24
23
|
"lodash.set": "~4.3.2",
|
|
25
24
|
"lodash.get": "~4.4.2",
|
|
26
25
|
"lodash.snakecase": "~4.1.1"
|
|
27
26
|
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"zod": "~3.25.67"
|
|
29
|
+
},
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@types/lodash.set": "~4.3.9",
|
|
30
32
|
"@types/lodash.get": "~4.4.9",
|
|
@@ -306,7 +306,9 @@ describe('sst', () => {
|
|
|
306
306
|
|
|
307
307
|
describe('edge cases', () => {
|
|
308
308
|
it('should warn for unknown resource types', () => {
|
|
309
|
-
const consoleWarnSpy = vi
|
|
309
|
+
const consoleWarnSpy = vi
|
|
310
|
+
.spyOn(console, 'warn')
|
|
311
|
+
.mockImplementation(() => {});
|
|
310
312
|
|
|
311
313
|
const unknownResource = {
|
|
312
314
|
type: 'unknown.resource.Type' as any,
|
|
@@ -320,7 +322,7 @@ describe('sst', () => {
|
|
|
320
322
|
expect(result).toEqual({});
|
|
321
323
|
expect(consoleWarnSpy).toHaveBeenCalledWith(
|
|
322
324
|
'No processor found for resource type: ',
|
|
323
|
-
{ value: unknownResource }
|
|
325
|
+
{ value: unknownResource },
|
|
324
326
|
);
|
|
325
327
|
|
|
326
328
|
consoleWarnSpy.mockRestore();
|
|
@@ -374,7 +376,8 @@ describe('sst', () => {
|
|
|
374
376
|
});
|
|
375
377
|
|
|
376
378
|
expect(result).toEqual({
|
|
377
|
-
THIS_IS_A_VERY_LONG_KEY_NAME_THAT_SHOULD_BE_CONVERTED_PROPERLY:
|
|
379
|
+
THIS_IS_A_VERY_LONG_KEY_NAME_THAT_SHOULD_BE_CONVERTED_PROPERLY:
|
|
380
|
+
'value',
|
|
378
381
|
});
|
|
379
382
|
});
|
|
380
383
|
|
|
@@ -385,8 +388,8 @@ describe('sst', () => {
|
|
|
385
388
|
};
|
|
386
389
|
|
|
387
390
|
const result = normalizeResourceEnv({
|
|
388
|
-
|
|
389
|
-
|
|
391
|
+
s3_bucket_v2_1: bucket,
|
|
392
|
+
bucket_123_456: bucket,
|
|
390
393
|
});
|
|
391
394
|
|
|
392
395
|
expect(result).toEqual({
|
|
@@ -412,4 +415,4 @@ describe('sst', () => {
|
|
|
412
415
|
expect(ResourceType.SSTBucket).toBe('sst:aws:Bucket');
|
|
413
416
|
});
|
|
414
417
|
});
|
|
415
|
-
});
|
|
418
|
+
});
|