@jahands/dagger-helpers 0.3.0 → 0.5.0
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/convert/camel-to-snake.d.ts +53 -0
- package/dist/convert/camel-to-snake.d.ts.map +1 -0
- package/dist/convert/camel-to-snake.js +66 -0
- package/dist/convert/camel-to-snake.js.map +1 -0
- package/dist/convert/snake-to-camel.d.ts +34 -0
- package/dist/convert/snake-to-camel.d.ts.map +1 -0
- package/dist/convert/snake-to-camel.js +77 -0
- package/dist/convert/snake-to-camel.js.map +1 -0
- package/dist/env.d.ts +2 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/path.d.ts +12 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +33 -0
- package/dist/path.js.map +1 -0
- package/dist/shell.d.ts +15 -0
- package/dist/shell.d.ts.map +1 -1
- package/dist/shell.js +26 -0
- package/dist/shell.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
type IsLower<C extends string> = Lowercase<C> extends Uppercase<C> ? false : C extends Lowercase<C> ? true : false;
|
|
2
|
+
type IsUpper<C extends string> = Lowercase<C> extends Uppercase<C> ? false : C extends Uppercase<C> ? true : false;
|
|
3
|
+
type IsDigit<C extends string> = C extends `${number}` ? true : false;
|
|
4
|
+
type CamelToSnakeInner<S extends string, PrevChar extends string = ''> = S extends '' ? '' : S extends `${infer First}${infer Rest}` ? IsUpper<First> extends true ? IsLower<PrevChar> extends true ? `_${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : IsDigit<PrevChar> extends true ? `_${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : Rest extends `${infer NextChar}${string}` ? IsLower<NextChar> extends true ? `_${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : `${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : `${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : IsDigit<First> extends true ? IsLower<PrevChar> extends true ? `_${First}${CamelToSnakeInner<Rest, First>}` : `${First}${CamelToSnakeInner<Rest, First>}` : `${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : '';
|
|
5
|
+
/**
|
|
6
|
+
* Type helper to convert a camelCase/PascalCase string literal type
|
|
7
|
+
* to an UPPER_SNAKE_CASE string literal type. Handles common cases
|
|
8
|
+
* including transitions from lower to upper, letters to digits, and basic acronyms.
|
|
9
|
+
*
|
|
10
|
+
* Examples:
|
|
11
|
+
* 'userId' -> 'USER_ID'
|
|
12
|
+
* 'userName' -> 'USER_NAME'
|
|
13
|
+
* 'isActive' -> 'IS_ACTIVE'
|
|
14
|
+
* 'APIKey' -> 'API_KEY'
|
|
15
|
+
* 'version10' -> 'VERSION_10'
|
|
16
|
+
* 'apiV2Client' -> 'API_V2_CLIENT'
|
|
17
|
+
*/
|
|
18
|
+
type CamelToSnakeCase<S extends string> = S extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${CamelToSnakeInner<Rest, First>}` : Uppercase<S>;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a camelCase or PascalCase string to UPPER_SNAKE_CASE.
|
|
21
|
+
* Handles acronyms and numbers within the string.
|
|
22
|
+
*
|
|
23
|
+
* **Examples:**
|
|
24
|
+
* ```
|
|
25
|
+
* 'helloWorld' -> 'HELLO_WORLD'
|
|
26
|
+
* 'HelloWorld' -> 'HELLO_WORLD'
|
|
27
|
+
* 'someAPIKey' -> 'SOME_API_KEY'
|
|
28
|
+
* 'getHttpResponseCode' -> 'GET_HTTP_RESPONSE_CODE'
|
|
29
|
+
* 'version10' -> 'VERSION_10' // Fixed
|
|
30
|
+
* 'version10Alpha' -> 'VERSION_10_ALPHA' // Fixed
|
|
31
|
+
* 'apiV2Client' -> 'API_V2_CLIENT'
|
|
32
|
+
* 'releaseV10' -> 'RELEASE_V10'
|
|
33
|
+
* 'version2Data' -> 'VERSION_2_DATA' // Fixed
|
|
34
|
+
* 'word' -> 'WORD'
|
|
35
|
+
*```
|
|
36
|
+
* @param str The input string in camelCase or PascalCase format.
|
|
37
|
+
* @returns The converted string in UPPER_SNAKE_CASE format.
|
|
38
|
+
*/
|
|
39
|
+
export declare function camelToSnake(str: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Converts an object's keys from camelCase/PascalCase to UPPER_SNAKE_CASE.
|
|
42
|
+
* Provides compile-time type safety for the converted keys based on common patterns.
|
|
43
|
+
*
|
|
44
|
+
* @template T The type of the input object.
|
|
45
|
+
* @param input The object with camelCase/PascalCase keys.
|
|
46
|
+
* @returns A new object with the same values but UPPER_SNAKE_CASE keys,
|
|
47
|
+
* with an inferred type reflecting the key transformation.
|
|
48
|
+
*/
|
|
49
|
+
export declare function convertToSnake<T extends Record<string, any>>(input: T): {
|
|
50
|
+
[K in keyof T as CamelToSnakeCase<K & string>]: T[K];
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=camel-to-snake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camel-to-snake.d.ts","sourceRoot":"","sources":["../../src/convert/camel-to-snake.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAC5B,SAAS,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAElF,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAC5B,SAAS,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAElF,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,KAAK,CAAA;AAIrE,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,SAAS,MAAM,GAAG,EAAE,IAEpE,CAAC,SAAS,EAAE,GACT,EAAE,GAEH,CAAC,SAAS,GAAG,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,GAItC,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,GAE1B,OAAO,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC5B,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC7B,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAExD,IAAI,SAAS,GAAG,MAAM,QAAQ,GAAG,MAAM,EAAE,GACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC7B,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GACvD,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAExD,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAEzD,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,GAE1B,OAAO,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC5B,IAAI,KAAK,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAE7C,GAAG,KAAK,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAG5C,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAExD,EAAE,CAAA;AAEN;;;;;;;;;;;;GAYG;AACH,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,GAE/E,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,GAEtD,SAAS,CAAC,CAAC,CAAC,CAAA;AAEd;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAoBhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3D,KAAK,EAAE,CAAC,GAEN;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAe1D"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/**
|
|
3
|
+
* Converts a camelCase or PascalCase string to UPPER_SNAKE_CASE.
|
|
4
|
+
* Handles acronyms and numbers within the string.
|
|
5
|
+
*
|
|
6
|
+
* **Examples:**
|
|
7
|
+
* ```
|
|
8
|
+
* 'helloWorld' -> 'HELLO_WORLD'
|
|
9
|
+
* 'HelloWorld' -> 'HELLO_WORLD'
|
|
10
|
+
* 'someAPIKey' -> 'SOME_API_KEY'
|
|
11
|
+
* 'getHttpResponseCode' -> 'GET_HTTP_RESPONSE_CODE'
|
|
12
|
+
* 'version10' -> 'VERSION_10' // Fixed
|
|
13
|
+
* 'version10Alpha' -> 'VERSION_10_ALPHA' // Fixed
|
|
14
|
+
* 'apiV2Client' -> 'API_V2_CLIENT'
|
|
15
|
+
* 'releaseV10' -> 'RELEASE_V10'
|
|
16
|
+
* 'version2Data' -> 'VERSION_2_DATA' // Fixed
|
|
17
|
+
* 'word' -> 'WORD'
|
|
18
|
+
*```
|
|
19
|
+
* @param str The input string in camelCase or PascalCase format.
|
|
20
|
+
* @returns The converted string in UPPER_SNAKE_CASE format.
|
|
21
|
+
*/
|
|
22
|
+
export function camelToSnake(str) {
|
|
23
|
+
if (!str) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
// The sequence matters:
|
|
27
|
+
const result = str
|
|
28
|
+
// 1. Add _ before an uppercase letter that is followed by a lowercase letter,
|
|
29
|
+
// but only if the uppercase letter is not the start of the string and
|
|
30
|
+
// is preceded by another uppercase letter (handles acronyms like APIKey -> API_Key).
|
|
31
|
+
.replace(/([A-Z])([A-Z][a-z])/g, '$1_$2')
|
|
32
|
+
// 2. Add _ before an uppercase letter that is preceded by a lowercase letter or a digit.
|
|
33
|
+
// (handles helloWorld -> hello_World, version10Update -> version10_Update, apiV2Client -> api_V2Client)
|
|
34
|
+
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
|
|
35
|
+
// 3. Add _ between a lowercase letter and a number.
|
|
36
|
+
// (handles version10 -> version_10, but NOT V10 -> V_10 because V is uppercase)
|
|
37
|
+
.replace(/([a-z])(\d)/g, '$1_$2');
|
|
38
|
+
// Convert the entire result to uppercase
|
|
39
|
+
return result.toUpperCase();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Converts an object's keys from camelCase/PascalCase to UPPER_SNAKE_CASE.
|
|
43
|
+
* Provides compile-time type safety for the converted keys based on common patterns.
|
|
44
|
+
*
|
|
45
|
+
* @template T The type of the input object.
|
|
46
|
+
* @param input The object with camelCase/PascalCase keys.
|
|
47
|
+
* @returns A new object with the same values but UPPER_SNAKE_CASE keys,
|
|
48
|
+
* with an inferred type reflecting the key transformation.
|
|
49
|
+
*/
|
|
50
|
+
export function convertToSnake(input
|
|
51
|
+
// Apply the mapped type with key remapping using the type helper
|
|
52
|
+
) {
|
|
53
|
+
const output = {}; // Initialize as 'any' or '{}'
|
|
54
|
+
for (const key in input) {
|
|
55
|
+
if (Object.prototype.hasOwnProperty.call(input, key)) {
|
|
56
|
+
const snakeCaseKey = camelToSnake(key); // Runtime conversion
|
|
57
|
+
output[snakeCaseKey] = input[key];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Type assertion: We trust the runtime `camelToSnake` logic produces keys
|
|
61
|
+
// matching the structure defined by the `CamelToSnakeCase` type helper.
|
|
62
|
+
// This is needed because TS can't perfectly verify the runtime logic
|
|
63
|
+
// against the complex type-level logic for all possible inputs.
|
|
64
|
+
return output;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=camel-to-snake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camel-to-snake.js","sourceRoot":"","sources":["../../src/convert/camel-to-snake.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAmEvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,IAAI,CAAC,GAAG,EAAE,CAAC;QACV,OAAO,EAAE,CAAA;IACV,CAAC;IAED,wBAAwB;IACxB,MAAM,MAAM,GAAG,GAAG;QACjB,8EAA8E;QAC9E,yEAAyE;QACzE,wFAAwF;SACvF,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;QACzC,yFAAyF;QACzF,2GAA2G;SAC1G,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC;QACtC,oDAAoD;QACpD,mFAAmF;SAClF,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;IAElC,yCAAyC;IACzC,OAAO,MAAM,CAAC,WAAW,EAAE,CAAA;AAC5B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC7B,KAAQ;AACR,iEAAiE;;IAEjE,MAAM,MAAM,GAAQ,EAAE,CAAA,CAAC,8BAA8B;IAErD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YACtD,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA,CAAC,qBAAqB;YAC5D,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;QAClC,CAAC;IACF,CAAC;IAED,0EAA0E;IAC1E,wEAAwE;IACxE,qEAAqE;IACrE,gEAAgE;IAChE,OAAO,MAAkE,CAAA;AAC1E,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper type to capitalize the first letter of a string literal type.
|
|
3
|
+
* e.g., 'hello' -> 'Hello'
|
|
4
|
+
*/
|
|
5
|
+
type CapitalizeString<S extends string> = S extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${Rest}` : S;
|
|
6
|
+
/**
|
|
7
|
+
* Recursively transforms a snake_case string literal type to camelCase.
|
|
8
|
+
* e.g., 'SOME_API_KEY' -> 'someApiKey'
|
|
9
|
+
* 'HELLO_WORLD' -> 'helloWorld'
|
|
10
|
+
* 'WORD' -> 'word'
|
|
11
|
+
*/
|
|
12
|
+
type SnakeToCamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${Lowercase<T>}${CapitalizeString<SnakeToCamelCase<U>>}` : Lowercase<S>;
|
|
13
|
+
/**
|
|
14
|
+
* Converts a string from snake_case, UPPER_SNAKE_CASE, PascalCase,
|
|
15
|
+
* or ALL_CAPS to camelCase at runtime.
|
|
16
|
+
* If the string is already camelCase or lowercase, it remains unchanged.
|
|
17
|
+
*
|
|
18
|
+
* @param str The input string in snake_case format.
|
|
19
|
+
* @returns The converted string in camelCase format.
|
|
20
|
+
*/
|
|
21
|
+
export declare function snakeToCamel(str: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Converts an object's keys from snake_case or UPPER_SNAKE_CASE to camelCase.
|
|
24
|
+
* The return type precisely maps the input keys to their camelCase versions.
|
|
25
|
+
*
|
|
26
|
+
* @template T The type of the input object, expected to have string keys.
|
|
27
|
+
* @param input The object with snake_case keys.
|
|
28
|
+
* @returns A new object with the same values but camelCase keys, with a specific inferred type.
|
|
29
|
+
*/
|
|
30
|
+
export declare function convertToCamel<T extends Record<string, any>>(input: T): {
|
|
31
|
+
[K in keyof T as SnakeToCamelCase<K & string>]: T[K];
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=snake-to-camel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snake-to-camel.d.ts","sourceRoot":"","sources":["../../src/convert/snake-to-camel.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,GAC9E,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,GAC5B,CAAC,CAAA;AAEJ;;;;;GAKG;AACH,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,GACxE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,GACzD,SAAS,CAAC,CAAC,CAAC,CAAA;AAEf;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA+ChD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3D,KAAK,EAAE,CAAC,GACN;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAe1D"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/**
|
|
3
|
+
* Converts a string from snake_case, UPPER_SNAKE_CASE, PascalCase,
|
|
4
|
+
* or ALL_CAPS to camelCase at runtime.
|
|
5
|
+
* If the string is already camelCase or lowercase, it remains unchanged.
|
|
6
|
+
*
|
|
7
|
+
* @param str The input string in snake_case format.
|
|
8
|
+
* @returns The converted string in camelCase format.
|
|
9
|
+
*/
|
|
10
|
+
export function snakeToCamel(str) {
|
|
11
|
+
if (!str) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
// Case 1: String contains underscores (snake_case)
|
|
15
|
+
if (str.includes('_')) {
|
|
16
|
+
let result = '';
|
|
17
|
+
const parts = str.split('_');
|
|
18
|
+
for (let i = 0; i < parts.length; i++) {
|
|
19
|
+
const part = parts[i];
|
|
20
|
+
if (part) {
|
|
21
|
+
// Skip empty parts from multiple underscores
|
|
22
|
+
if (result.length === 0) {
|
|
23
|
+
// First non-empty part: lowercase the whole part
|
|
24
|
+
result += part.toLowerCase();
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// Subsequent non-empty parts: capitalize first letter, rest lowercase
|
|
28
|
+
result += part[0].toUpperCase() + part.slice(1).toLowerCase();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// Handle case like "_SOME_WORD_" -> "someWord"
|
|
33
|
+
// If the first character of the original string was '_' and result is empty,
|
|
34
|
+
// it means the string was only underscores, return ''
|
|
35
|
+
// If the first part was empty ('_WORD'), result starts lowercase correctly.
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
// Case 2: String does NOT contain underscores
|
|
39
|
+
// Check if it's ALL_CAPS (allowing for numbers)
|
|
40
|
+
const isAllCaps = /^[A-Z0-9]+$/.test(str);
|
|
41
|
+
if (isAllCaps) {
|
|
42
|
+
// e.g., "WORD", "TOKEN123" -> "word", "token123"
|
|
43
|
+
return str.toLowerCase();
|
|
44
|
+
}
|
|
45
|
+
// Check if it's PascalCase or already camelCase/lowercase
|
|
46
|
+
// If the first letter is already lowercase, assume it's camelCase or lowercase
|
|
47
|
+
if (str[0] === str[0].toLowerCase()) {
|
|
48
|
+
// e.g., "helloWorld", "word" -> stays the same
|
|
49
|
+
return str;
|
|
50
|
+
}
|
|
51
|
+
// Otherwise, assume it's PascalCase: Lowercase only the first character
|
|
52
|
+
// e.g., "HelloWorld", "SomeValue" -> "helloWorld", "someValue"
|
|
53
|
+
return str[0].toLowerCase() + str.slice(1);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Converts an object's keys from snake_case or UPPER_SNAKE_CASE to camelCase.
|
|
57
|
+
* The return type precisely maps the input keys to their camelCase versions.
|
|
58
|
+
*
|
|
59
|
+
* @template T The type of the input object, expected to have string keys.
|
|
60
|
+
* @param input The object with snake_case keys.
|
|
61
|
+
* @returns A new object with the same values but camelCase keys, with a specific inferred type.
|
|
62
|
+
*/
|
|
63
|
+
export function convertToCamel(input) {
|
|
64
|
+
const output = {};
|
|
65
|
+
for (const key in input) {
|
|
66
|
+
if (Object.prototype.hasOwnProperty.call(input, key)) {
|
|
67
|
+
const camelCaseKey = snakeToCamel(key);
|
|
68
|
+
output[camelCaseKey] = input[key];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// We use a type assertion here. While our runtime logic creates the correct
|
|
72
|
+
// shape, TypeScript's analysis within the loop isn't powerful enough to
|
|
73
|
+
// automatically verify that 'output' perfectly matches the complex mapped type.
|
|
74
|
+
// The return type annotation guarantees the type for the caller.
|
|
75
|
+
return output;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=snake-to-camel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snake-to-camel.js","sourceRoot":"","sources":["../../src/convert/snake-to-camel.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAoBvD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,IAAI,CAAC,GAAG,EAAE,CAAC;QACV,OAAO,EAAE,CAAA;IACV,CAAC;IAED,mDAAmD;IACnD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YACrB,IAAI,IAAI,EAAE,CAAC;gBACV,6CAA6C;gBAC7C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBACzB,iDAAiD;oBACjD,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,CAAA;gBAC7B,CAAC;qBAAM,CAAC;oBACP,sEAAsE;oBACtE,MAAM,IAAI,IAAI,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;gBAC/D,CAAC;YACF,CAAC;QACF,CAAC;QACD,+CAA+C;QAC/C,6EAA6E;QAC7E,sDAAsD;QACtD,4EAA4E;QAC5E,OAAO,MAAM,CAAA;IACd,CAAC;IAED,8CAA8C;IAC9C,gDAAgD;IAChD,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACzC,IAAI,SAAS,EAAE,CAAC;QACf,iDAAiD;QACjD,OAAO,GAAG,CAAC,WAAW,EAAE,CAAA;IACzB,CAAC;IAED,0DAA0D;IAC1D,+EAA+E;IAC/E,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,+CAA+C;QAC/C,OAAO,GAAG,CAAA;IACX,CAAC;IAED,wEAAwE;IACxE,+DAA+D;IAC/D,OAAO,GAAG,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC7B,KAAQ;IAER,MAAM,MAAM,GAAQ,EAAE,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YACtD,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YACtC,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;QAClC,CAAC;IACF,CAAC;IAED,4EAA4E;IAC5E,wEAAwE;IACxE,gFAAgF;IAChF,iEAAiE;IACjE,OAAO,MAAkE,CAAA;AAC1E,CAAC"}
|
package/dist/env.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
1
2
|
import type { Secret } from '@dagger.io/dagger';
|
|
2
3
|
/**
|
|
3
4
|
* Structure stored in AsyncLocalStorage, containing both the fully merged
|
|
@@ -11,7 +12,7 @@ export interface EnvContext {
|
|
|
11
12
|
/**
|
|
12
13
|
* Store for environment variables accessible via AsyncLocalStorage
|
|
13
14
|
*/
|
|
14
|
-
export declare const envStorage:
|
|
15
|
+
export declare const envStorage: AsyncLocalStorage<EnvContext>;
|
|
15
16
|
/**
|
|
16
17
|
* Helper to extract parameter names from a function's source code.
|
|
17
18
|
* Note: This approach using Function.toString() can be fragile and might
|
package/dist/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAA;CACtD;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,+BAAsC,CAAA;AAE7D;;;;GAIG;AAEH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,CA8B1D;AAED;;;GAGG;AAEH,wBAAgB,WAAW,IAAI,eAAe,CA6D7C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { constants } from './constants.js';
|
|
2
2
|
export { ParamsToEnv, envStorage } from './env.js';
|
|
3
3
|
export type { EnvContext } from './env.js';
|
|
4
|
-
export { sh } from './shell.js';
|
|
4
|
+
export { sh, shell } from './shell.js';
|
|
5
|
+
export { getModulePath } from './path.js';
|
|
6
|
+
export { convertToCamel } from './convert/snake-to-camel.js';
|
|
7
|
+
export { convertToSnake } from './convert/camel-to-snake.js';
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { constants } from './constants.js';
|
|
2
2
|
export { ParamsToEnv, envStorage } from './env.js';
|
|
3
|
-
export { sh } from './shell.js';
|
|
3
|
+
export { sh, shell } from './shell.js';
|
|
4
|
+
export { getModulePath } from './path.js';
|
|
5
|
+
export { convertToCamel } from './convert/snake-to-camel.js';
|
|
6
|
+
export { convertToSnake } from './convert/camel-to-snake.js';
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGlD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGlD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA"}
|
package/dist/path.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function getRepoRoot(cwd?: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Get the path to the dagger module.
|
|
4
|
+
*
|
|
5
|
+
* Requires `pnpm-lock.yaml` to exist in the repo root.
|
|
6
|
+
*
|
|
7
|
+
* @param cwd - The current working directory. **Default:** `process.cwd()`
|
|
8
|
+
*
|
|
9
|
+
* @returns The path to the dagger module relative to the repo root
|
|
10
|
+
*/
|
|
11
|
+
export declare function getModulePath(cwd?: string): string;
|
|
12
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAShD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAelD"}
|
package/dist/path.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { up } from 'empathic/find';
|
|
3
|
+
export function getRepoRoot(cwd) {
|
|
4
|
+
cwd = cwd ?? process.cwd();
|
|
5
|
+
const lockfile = up('pnpm-lock.yaml', { cwd });
|
|
6
|
+
if (!lockfile) {
|
|
7
|
+
throw new Error('could not determine repo root path: unable to find pnpm-lock.yaml');
|
|
8
|
+
}
|
|
9
|
+
return path.dirname(lockfile);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get the path to the dagger module.
|
|
13
|
+
*
|
|
14
|
+
* Requires `pnpm-lock.yaml` to exist in the repo root.
|
|
15
|
+
*
|
|
16
|
+
* @param cwd - The current working directory. **Default:** `process.cwd()`
|
|
17
|
+
*
|
|
18
|
+
* @returns The path to the dagger module relative to the repo root
|
|
19
|
+
*/
|
|
20
|
+
export function getModulePath(cwd) {
|
|
21
|
+
cwd = cwd ?? process.cwd();
|
|
22
|
+
const lockfile = up('pnpm-lock.yaml', { cwd });
|
|
23
|
+
if (!lockfile) {
|
|
24
|
+
throw new Error('could not determine repo root path: unable to find pnpm-lock.yaml');
|
|
25
|
+
}
|
|
26
|
+
const repoRoot = path.dirname(lockfile);
|
|
27
|
+
const daggerJson = up('dagger.json', { cwd, stop: repoRoot });
|
|
28
|
+
if (!daggerJson) {
|
|
29
|
+
throw new Error('could not determine dagger.json path: unable to find dagger.json');
|
|
30
|
+
}
|
|
31
|
+
return path.relative(repoRoot, path.dirname(daggerJson));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=path.js.map
|
package/dist/path.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAElC,MAAM,UAAU,WAAW,CAAC,GAAY;IACvC,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAE1B,MAAM,QAAQ,GAAG,EAAE,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;IAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAA;IACrF,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC9B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY;IACzC,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAE1B,MAAM,QAAQ,GAAG,EAAE,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;IAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAA;IACrF,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAEvC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC7D,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAA;IACpF,CAAC;IAED,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAA;AACzD,CAAC"}
|
package/dist/shell.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Run command with bash
|
|
3
3
|
*
|
|
4
|
+
* @deprecated use shell() instead
|
|
5
|
+
*
|
|
4
6
|
* @example
|
|
5
7
|
*
|
|
6
8
|
* ```ts
|
|
@@ -8,4 +10,17 @@
|
|
|
8
10
|
* ```
|
|
9
11
|
*/
|
|
10
12
|
export declare function sh(input: string | string[]): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Create a new shell helper with the given shell type
|
|
15
|
+
*
|
|
16
|
+
* @param shellName - The name of the shell to use
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* const sh = shell('bash')
|
|
22
|
+
* .withExec(sh('echo hello world!'))
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function shell(shellName: 'sh' | 'bash' | 'zsh'): (input: string | string[]) => string[];
|
|
11
26
|
//# sourceMappingURL=shell.d.ts.map
|
package/dist/shell.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAUrD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,KAAK,WACtC,MAAM,GAAG,MAAM,EAAE,KAAG,MAAM,EAAE,CAW3C"}
|
package/dist/shell.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Run command with bash
|
|
3
3
|
*
|
|
4
|
+
* @deprecated use shell() instead
|
|
5
|
+
*
|
|
4
6
|
* @example
|
|
5
7
|
*
|
|
6
8
|
* ```ts
|
|
@@ -10,9 +12,33 @@
|
|
|
10
12
|
export function sh(input) {
|
|
11
13
|
const inputAr = Array.isArray(input) ? input : [input];
|
|
12
14
|
const trimmedInput = inputAr.map((i) => i
|
|
15
|
+
.trim()
|
|
13
16
|
.split('\n')
|
|
14
17
|
.map((l) => l.trim())
|
|
15
18
|
.join('\n'));
|
|
16
19
|
return ['bash', '-c', trimmedInput].flat();
|
|
17
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a new shell helper with the given shell type
|
|
23
|
+
*
|
|
24
|
+
* @param shellName - The name of the shell to use
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* const sh = shell('bash')
|
|
30
|
+
* .withExec(sh('echo hello world!'))
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export function shell(shellName) {
|
|
34
|
+
return (input) => {
|
|
35
|
+
const inputAr = Array.isArray(input) ? input : [input];
|
|
36
|
+
const trimmedInput = inputAr.map((i) => i
|
|
37
|
+
.trim()
|
|
38
|
+
.split('\n')
|
|
39
|
+
.map((l) => l.trim())
|
|
40
|
+
.join('\n'));
|
|
41
|
+
return [shellName, '-c', trimmedInput].flat();
|
|
42
|
+
};
|
|
43
|
+
}
|
|
18
44
|
//# sourceMappingURL=shell.js.map
|
package/dist/shell.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,EAAE,CAAC,KAAwB;IAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACtD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACtC,CAAC;SACC,IAAI,EAAE;SACN,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,IAAI,CAAC,IAAI,CAAC,CACZ,CAAA;IACD,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,KAAK,CAAC,SAAgC;IACrD,OAAO,CAAC,KAAwB,EAAY,EAAE;QAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;QACtD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACtC,CAAC;aACC,IAAI,EAAE;aACN,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,CACZ,CAAA;QACD,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,IAAI,EAAE,CAAA;IAC9C,CAAC,CAAA;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jahands/dagger-helpers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "dagger.io helpers for my own projects - not meant for public use",
|
|
6
6
|
"keywords": [
|
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
"files": [
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"empathic": "1.0.0"
|
|
38
|
+
},
|
|
36
39
|
"devDependencies": {
|
|
40
|
+
"@types/node": "20.8.3",
|
|
37
41
|
"typescript": "5.5.4",
|
|
38
42
|
"vitest": "2.1.1",
|
|
39
43
|
"@repo/tools": "0.8.1",
|