asma-core-helpers 0.1.0 → 0.1.5
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 +8 -2
- package/package.json +1 -1
- package/src/helpers/generateSrvAuthBindings.ts +16 -13
package/README.md
CHANGED
|
@@ -64,8 +64,8 @@ git commit -m "fix!: Remove deprecated methods"
|
|
|
64
64
|
|
|
65
65
|
**Smart Build**: The workflow intelligently skips build/publish when only documentation or configuration files change:
|
|
66
66
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
67
|
+
- **Triggers build**: Changes to `src/`, `package.json`, `pnpm-lock.yaml`, `tsconfig.json`, `.npmignore`
|
|
68
|
+
- **Skips build**: Changes to `README.md`, `.github/`, `.vscode/`, `.prettierrc`, `cspell.json`, etc.
|
|
69
69
|
|
|
70
70
|
**Note**: The workflow uses [conventional commit](https://www.conventionalcommits.org/) format and follows the project's commit policy (validated by lefthook pre-commit hooks).
|
|
71
71
|
|
|
@@ -93,6 +93,12 @@ If you're migrating from `asma-helpers`:
|
|
|
93
93
|
import { ... } from 'asma-core-helpers'
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
## Testing Parallel Operations
|
|
97
|
+
|
|
98
|
+
This is a test message to verify parallel AI commit message generation and git push operations work correctly with up to 20 workers. 🚀
|
|
99
|
+
|
|
100
|
+
**Update 2**: Testing after fixing GitHub workflow access and adopus-gql-directory remote URL! ✨
|
|
101
|
+
|
|
96
102
|
## License
|
|
97
103
|
|
|
98
104
|
MIT
|
package/package.json
CHANGED
|
@@ -442,6 +442,7 @@ export function generateSrvAuthBindings<FE extends string>(logout?: () => void)
|
|
|
442
442
|
}
|
|
443
443
|
return undefined
|
|
444
444
|
}
|
|
445
|
+
|
|
445
446
|
function getFeatures() {
|
|
446
447
|
if (!metadata?.features) {
|
|
447
448
|
console.warn('no features present in the metadata', 'metadata: ', metadata)
|
|
@@ -449,6 +450,7 @@ export function generateSrvAuthBindings<FE extends string>(logout?: () => void)
|
|
|
449
450
|
}
|
|
450
451
|
return Array.from(metadata.features)
|
|
451
452
|
}
|
|
453
|
+
|
|
452
454
|
function getSrvUrls() {
|
|
453
455
|
if (!metadata?.srv_urls) {
|
|
454
456
|
console.warn('no srv_urls present in the metadata', 'metadata: ', metadata)
|
|
@@ -683,21 +685,22 @@ function deepEqual(x: Record<string, string>, y: Record<string, string>) {
|
|
|
683
685
|
function sortStringify(x: Record<string, string>) {
|
|
684
686
|
Object.keys(x)
|
|
685
687
|
.sort()
|
|
686
|
-
.reduce(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
},
|
|
695
|
-
{} as Record<string, string>,
|
|
696
|
-
)
|
|
688
|
+
.reduce((acc, key) => {
|
|
689
|
+
const x_key = x?.[key]
|
|
690
|
+
if (x_key) {
|
|
691
|
+
acc[key] = x_key
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
return acc
|
|
695
|
+
}, {} as Record<string, string>)
|
|
697
696
|
|
|
698
697
|
return JSON.stringify(x)
|
|
699
698
|
}
|
|
700
|
-
|
|
699
|
+
/**
|
|
700
|
+
*
|
|
701
|
+
* @param headers
|
|
702
|
+
* @returns
|
|
703
|
+
*/
|
|
701
704
|
function attachAdditionalHeaders(headers: Record<string, string>) {
|
|
702
705
|
const predefined_debug_user_secret = localStorage.getItem('predefined-debug-user-secret') || undefined
|
|
703
706
|
|
|
@@ -719,7 +722,7 @@ function attachAdditionalHeaders(headers: Record<string, string>) {
|
|
|
719
722
|
const genesis_user_secret = localStorage.getItem('genesis-user-secret') || undefined
|
|
720
723
|
|
|
721
724
|
if (domain === 'advoca' && genesis_user_secret) {
|
|
722
|
-
headers = { ...headers, 'genesis-user-secret': `
|
|
725
|
+
headers = { ...headers, 'genesis-user-secret': `genesis_user-secret.${genesis_user_secret}` }
|
|
723
726
|
}
|
|
724
727
|
|
|
725
728
|
return headers
|