@momo-kits/native-kits 0.168.1-beta.3-debug → 0.168.1-beta.4-debug

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.
@@ -27,7 +27,7 @@ kotlin {
27
27
  // AI-GENERATED START: configure the AGP 9 Android target and host tests
28
28
  android {
29
29
  namespace = "vn.momo.kits.kits"
30
- compileSdk = 35
30
+ compileSdk = 36
31
31
  minSdk = 24
32
32
  androidResources.enable = true
33
33
  withHostTest {}
@@ -48,7 +48,7 @@ kotlin {
48
48
  }
49
49
 
50
50
  cocoapods {
51
- version = "0.168.1-beta.3-debug"
51
+ version = "0.168.1-beta.4-debug"
52
52
  summary = "IOS Shared module"
53
53
  homepage = "https://momo.vn"
54
54
  ios.deploymentTarget = "15.0"
package/gradle.properties CHANGED
@@ -22,5 +22,5 @@ version=0.300.4
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
25
- gitlab.user=upload_packages
26
- gitlab.password=gldt-CtTSGmzz57sUL9cnjdaQ
25
+ gitlab.user=
26
+ gitlab.password=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.168.1-beta.3-debug",
3
+ "version": "0.168.1-beta.4-debug",
4
4
  "private": false,
5
5
  "dependeNavigationncies": {},
6
6
  "devDependencies": {},
package/publish.sh CHANGED
@@ -374,16 +374,17 @@ phase_publish_npm() {
374
374
  echo ""
375
375
  # A bad token surfaces as a 404 on the PUT, after the working tree was already rewritten
376
376
  # below — so verify auth first, before anything is touched.
377
- if ! NPM_WHOAMI_OUTPUT=$(npm whoami --registry https://registry.npmjs.org 2>&1); then
378
- echo "$NPM_WHOAMI_OUTPUT"
379
- if echo "$NPM_WHOAMI_OUTPUT" | grep -qE "E401|ENEEDAUTH"; then
380
- echo "❌ Error: npm auth failed (npm whoami). Renew the token in .npmrc / ~/.npmrc and retry."
381
- else
382
- echo "❌ Error: npm whoami failed (see above) — likely network / VPN to registry.npmjs.org. Retry in a moment."
383
- fi
377
+ if ! npm whoami --registry https://registry.npmjs.org >/dev/null 2>&1; then
378
+ echo "❌ Error: npm auth failed (npm whoami). Renew the token in .npmrc / ~/.npmrc and retry."
384
379
  exit 1
385
380
  fi
386
381
 
382
+ # AI-GENERATED START: preserve an existing credential backup owned by another run
383
+ if [ -e gradle.properties.npm-backup ]; then
384
+ echo "❌ Error: gradle.properties.npm-backup already exists; recover it before publishing."
385
+ exit 1
386
+ fi
387
+ # AI-GENERATED END: preserve an existing credential backup owned by another run
387
388
  echo "🔧 Preparing debug version with compose kits..."
388
389
 
389
390
  # Create debug version
@@ -394,6 +395,9 @@ phase_publish_npm() {
394
395
  restore_npm_workspace() {
395
396
  [ -f .npmignore.backup ] && mv .npmignore.backup .npmignore
396
397
  [ -f compose/build.gradle.kts.backup ] && mv compose/build.gradle.kts.backup compose/build.gradle.kts
398
+ # AI-GENERATED START: restore private publishing credentials after npm packaging
399
+ [ -f gradle.properties.npm-backup ] && mv gradle.properties.npm-backup gradle.properties
400
+ # AI-GENERATED END: restore private publishing credentials after npm packaging
397
401
  local pkg_version
398
402
  pkg_version=$(node -p "require('./package.json').version")
399
403
  if [ "$pkg_version" != "$VERSION" ]; then
@@ -405,6 +409,16 @@ phase_publish_npm() {
405
409
  fi
406
410
  }
407
411
  trap restore_npm_workspace EXIT
412
+ # AI-GENERATED START: keep private Maven credentials out of the debug npm package
413
+ cp gradle.properties gradle.properties.npm-backup
414
+ node <<'NODE'
415
+ const fs = require('fs');
416
+ const path = 'gradle.properties';
417
+ const sanitized = fs.readFileSync(path, 'utf8')
418
+ .replace(/^(gitlab\.(?:user|password)\s*=).*$/gm, '$1');
419
+ fs.writeFileSync(path, sanitized);
420
+ NODE
421
+ # AI-GENERATED END: keep private Maven credentials out of the debug npm package
408
422
  echo "📦 Debug version: $DEBUG_VERSION"
409
423
 
410
424
  # Get current version from package.json (in case it's different from $VERSION)
@@ -441,12 +455,18 @@ phase_publish_npm() {
441
455
  echo "🔧 Modifying android configuration for debug version..."
442
456
  if [[ "$OSTYPE" == "darwin"* ]]; then
443
457
  sed -i '' 's/namespace = "\$gitlabGroup\.\$gitlabArtifactId"/namespace = "vn.momo.kits.kits"/' compose/build.gradle.kts
444
- sed -i '' 's/compileSdk = libs\.versions\.android\.compileSdk\.get()\.toInt()/compileSdk = 35/' compose/build.gradle.kts
458
+ # AI-GENERATED START: keep the debug package on the approved SDK 36 toolchain
459
+ sed -i '' \
460
+ 's/compileSdk = libs\.versions\.android\.compileSdk\.get()\.toInt()/compileSdk = 36/' compose/build.gradle.kts
461
+ # AI-GENERATED END: keep the debug package on the approved SDK 36 toolchain
445
462
  sed -i '' 's/minSdk = libs\.versions\.android\.minSdk\.get()\.toInt()/minSdk = 24/' compose/build.gradle.kts
446
463
  sed -i '' "s/version = gitlabVersion/version = \"$DEBUG_VERSION\"/" compose/build.gradle.kts
447
464
  else
448
465
  sed -i 's/namespace = "\$gitlabGroup\.\$gitlabArtifactId"/namespace = "vn.momo.kits.kits"/' compose/build.gradle.kts
449
- sed -i 's/compileSdk = libs\.versions\.android\.compileSdk\.get()\.toInt()/compileSdk = 35/' compose/build.gradle.kts
466
+ # AI-GENERATED START: keep the debug package on the approved SDK 36 toolchain
467
+ sed -i \
468
+ 's/compileSdk = libs\.versions\.android\.compileSdk\.get()\.toInt()/compileSdk = 36/' compose/build.gradle.kts
469
+ # AI-GENERATED END: keep the debug package on the approved SDK 36 toolchain
450
470
  sed -i 's/minSdk = libs\.versions\.android\.minSdk\.get()\.toInt()/minSdk = 24/' compose/build.gradle.kts
451
471
  sed -i "s/version = gitlabVersion/version = \"$DEBUG_VERSION\"/" compose/build.gradle.kts
452
472
  fi
@@ -468,6 +488,9 @@ build/
468
488
  .gitattributes
469
489
  .gitlab-ci.yml
470
490
  .npmignore.backup
491
+ # AI-GENERATED START: exclude the private credential backup from debug npm packages
492
+ gradle.properties.npm-backup
493
+ # AI-GENERATED END: exclude the private credential backup from debug npm packages
471
494
  EOF
472
495
 
473
496
  echo "📤 Publishing debug version (with compose)..."
@@ -482,6 +505,9 @@ EOF
482
505
  # Restore compose/build.gradle.kts
483
506
  mv compose/build.gradle.kts.backup compose/build.gradle.kts
484
507
  echo "✅ compose/build.gradle.kts restored"
508
+ # AI-GENERATED START: restore credentials before leaving the debug packaging phase
509
+ mv gradle.properties.npm-backup gradle.properties
510
+ # AI-GENERATED END: restore credentials before leaving the debug packaging phase
485
511
 
486
512
  # Restore package.json version to original
487
513
  # Verify current version is debug version before restoring