@aws-blocks/core 0.1.7 → 0.1.10

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.
Files changed (53) hide show
  1. package/dist/db-naming.d.ts +17 -5
  2. package/dist/db-naming.d.ts.map +1 -1
  3. package/dist/db-naming.js +18 -6
  4. package/dist/db-naming.test.js +44 -3
  5. package/dist/hosting.d.ts +49 -0
  6. package/dist/hosting.d.ts.map +1 -1
  7. package/dist/hosting.js +47 -8
  8. package/dist/hosting.test.js +60 -0
  9. package/dist/scripts/deploy.d.ts.map +1 -1
  10. package/dist/scripts/deploy.js +4 -2
  11. package/dist/scripts/ensure-secrets.d.ts +5 -2
  12. package/dist/scripts/ensure-secrets.d.ts.map +1 -1
  13. package/dist/scripts/ensure-secrets.js +14 -6
  14. package/dist/scripts/external-migrations-step.d.ts.map +1 -1
  15. package/dist/scripts/external-migrations-step.js +5 -1
  16. package/dist/scripts/index.d.ts +1 -1
  17. package/dist/scripts/index.d.ts.map +1 -1
  18. package/dist/scripts/index.js +1 -1
  19. package/dist/scripts/sandbox.d.ts.map +1 -1
  20. package/dist/scripts/sandbox.js +10 -1
  21. package/dist/scripts/stack-id.d.ts +25 -0
  22. package/dist/scripts/stack-id.d.ts.map +1 -1
  23. package/dist/scripts/stack-id.js +25 -0
  24. package/dist/scripts/stack-id.test.js +51 -1
  25. package/dist/telemetry/client.d.ts +3 -1
  26. package/dist/telemetry/client.d.ts.map +1 -1
  27. package/dist/telemetry/client.js +20 -24
  28. package/dist/telemetry/telemetry-send-worker.d.ts +2 -0
  29. package/dist/telemetry/telemetry-send-worker.d.ts.map +1 -0
  30. package/dist/telemetry/telemetry-send-worker.js +58 -0
  31. package/dist/telemetry/telemetry.test.js +77 -1
  32. package/dist/telemetry/trackCommand.d.ts +1 -1
  33. package/dist/telemetry/trackCommand.js +3 -3
  34. package/dist/version.d.ts +1 -1
  35. package/dist/version.d.ts.map +1 -1
  36. package/dist/version.js +1 -1
  37. package/package.json +1 -1
  38. package/src/db-naming.test.ts +50 -5
  39. package/src/db-naming.ts +18 -6
  40. package/src/hosting.test.ts +79 -0
  41. package/src/hosting.ts +105 -12
  42. package/src/scripts/deploy.ts +4 -2
  43. package/src/scripts/ensure-secrets.ts +17 -6
  44. package/src/scripts/external-migrations-step.ts +5 -1
  45. package/src/scripts/index.ts +1 -1
  46. package/src/scripts/sandbox.ts +10 -1
  47. package/src/scripts/stack-id.test.ts +61 -1
  48. package/src/scripts/stack-id.ts +26 -0
  49. package/src/telemetry/client.ts +22 -30
  50. package/src/telemetry/telemetry-send-worker.ts +60 -0
  51. package/src/telemetry/telemetry.test.ts +91 -1
  52. package/src/telemetry/trackCommand.ts +3 -3
  53. package/src/version.ts +1 -1
@@ -22,10 +22,10 @@ export function classifyError(error: unknown): { code: string; phase: string } {
22
22
  if (msg.includes('cdk synth') || msg.includes('synthesis')) {
23
23
  return { code: 'CDK_SYNTH_FAILED', phase: 'synth' };
24
24
  }
25
- if (msg.includes('cdk deploy') || msg.includes('deployment failed')) {
25
+ if (msg.includes('cdk deploy') || msg.includes('deployment failed') || (msg.includes('cdk') && msg.includes('deploy') && msg.includes('exited with code'))) {
26
26
  return { code: 'CDK_DEPLOY_FAILED', phase: 'deploy' };
27
27
  }
28
- if (msg.includes('cdk destroy') || msg.includes('destroy failed')) {
28
+ if (msg.includes('cdk destroy') || msg.includes('destroy failed') || (msg.includes('cdk') && msg.includes('destroy') && msg.includes('exited with code'))) {
29
29
  return { code: 'CDK_DESTROY_FAILED', phase: 'destroy' };
30
30
  }
31
31
  if (msg.includes('npm install') || msg.includes('npm err')) {
@@ -52,7 +52,7 @@ export function classifyError(error: unknown): { code: string; phase: string } {
52
52
  *
53
53
  * Measures wall-clock duration, classifies errors, and sends a single telemetry event
54
54
  * after the command completes (success or failure). The telemetry send is fire-and-forget
55
- * and bounded by a 5s timeout — it will never delay the command or affect its exit code.
55
+ * and bounded by a 500ms timeout — it will never delay the command or affect its exit code.
56
56
  *
57
57
  * If telemetry is disabled (via env var or config), the function is executed directly
58
58
  * with zero overhead.
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by scripts/generate-version.mjs — do not edit manually
2
- export const CORE_VERSION = '0.1.7';
2
+ export const CORE_VERSION = '0.1.10';