app-tutor-ai-consumer 1.26.1 → 1.27.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.
@@ -10,4 +10,4 @@ jobs:
10
10
  uses: Hotmart-Org/actions/.github/workflows/jira.yaml@master
11
11
  secrets: inherit
12
12
  with:
13
- runs-on: "club-iac"
13
+ runs-on: "club"
@@ -11,4 +11,4 @@ jobs:
11
11
  uses: Hotmart-Org/actions/.github/workflows/merge-checker.yaml@master
12
12
  secrets: inherit
13
13
  with:
14
- runs-on: "club-iac"
14
+ runs-on: "club"
@@ -14,4 +14,4 @@ jobs:
14
14
  uses: Hotmart-Org/actions/.github/workflows/pr-agent.yaml@master
15
15
  secrets: inherit
16
16
  with:
17
- runs-on: "club-iac"
17
+ runs-on: "club"
@@ -11,7 +11,7 @@ env:
11
11
 
12
12
  jobs:
13
13
  quality-checks:
14
- runs-on: [buildstaging-high-iac]
14
+ runs-on: [buildstaging-content-high]
15
15
  steps:
16
16
  - name: Checkout Repository
17
17
  uses: actions/checkout@v4
@@ -24,7 +24,7 @@ jobs:
24
24
  staging-rollback:
25
25
  if: ${{ github.event.inputs.rollbackEnv == 'staging' }}
26
26
  name: Staging Rollback
27
- runs-on: [buildstaging-iac]
27
+ runs-on: [buildstaging-content]
28
28
  env:
29
29
  BUCKET_NAME: app-club-microfrontends
30
30
  CLOUDFRONT_ACCOUNT_ID: '449466460580'
@@ -46,7 +46,7 @@ jobs:
46
46
 
47
47
  new-relic-notification-staging:
48
48
  name: New Relic Application Deployment Notification
49
- runs-on: [buildstaging-iac]
49
+ runs-on: [buildstaging-content]
50
50
  needs: ['staging-rollback']
51
51
  steps:
52
52
  - name: Display rollback tag version
@@ -22,7 +22,7 @@ env:
22
22
  jobs:
23
23
  deploy-staging:
24
24
  name: Deploy Staging
25
- runs-on: [buildstaging-high-iac]
25
+ runs-on: [buildstaging-content-high]
26
26
  steps:
27
27
  - name: Checkout
28
28
  uses: actions/checkout@v4
@@ -85,7 +85,7 @@ jobs:
85
85
 
86
86
  staging-notification:
87
87
  name: 'Staging Notification'
88
- runs-on: [buildstaging-iac]
88
+ runs-on: [buildstaging-content]
89
89
  needs: ['deploy-staging']
90
90
  steps:
91
91
  - name: Checkout
@@ -23,7 +23,7 @@ env:
23
23
  jobs:
24
24
  create-tag:
25
25
  name: Create Tag
26
- runs-on: [buildstaging-high-iac]
26
+ runs-on: [buildstaging-content-high]
27
27
  permissions:
28
28
  contents: write
29
29
  issues: write
@@ -61,7 +61,7 @@ jobs:
61
61
  deploy-staging:
62
62
  name: Deploy Staging
63
63
  needs: [create-tag]
64
- runs-on: [buildstaging-high-iac]
64
+ runs-on: [buildstaging-content-high]
65
65
  steps:
66
66
  - name: Checkout
67
67
  uses: actions/checkout@v4
@@ -124,7 +124,7 @@ jobs:
124
124
 
125
125
  staging-notification:
126
126
  name: 'Staging Notification'
127
- runs-on: [buildstaging-iac]
127
+ runs-on: [buildstaging-content]
128
128
  needs: ['deploy-staging']
129
129
  steps:
130
130
  - name: Checkout
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [1.27.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.26.1...v1.27.0) (2025-08-13)
2
+
3
+ ### Features
4
+
5
+ - changing GA to new runner ([c871ca8](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/c871ca8034df0dcb3d45de18a7c2ba1fc02d57cc))
6
+
1
7
  ## [1.26.1](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.26.0...v1.26.1) (2025-08-13)
2
8
 
3
9
  ### Bug Fixes
@@ -169,7 +169,7 @@ module.exports = async function (env) {
169
169
  template: path.resolve(paths.PUBLIC, 'index.html'),
170
170
  favicon: path.resolve(paths.PUBLIC, 'favicon.ico')
171
171
  })
172
- ].concat(await getEnvironmentPlugins(process.env.NODE_ENV)),
172
+ ].concat(await getEnvironmentPlugins(!productionMode)),
173
173
  watchOptions: {
174
174
  ignored: /node_modules/
175
175
  }
@@ -26,18 +26,15 @@ const envs = [
26
26
 
27
27
  const localEnvs = ['MEMBERSHIP_SLUG']
28
28
 
29
- const stagingEnvs = [...envs, 'APP_HOST_MF']
30
-
31
- const prodEnvs = ['SENTRY_DSN', 'SENTRY_ORG', 'SENTRY_PROJECT']
29
+ const prodEnvs = ['APP_HOST_MF']
32
30
 
33
31
  const devEnvs = [...envs, ...localEnvs]
34
32
 
35
- const allEnvs = [...stagingEnvs, ...prodEnvs]
33
+ const allEnvs = [...envs, ...prodEnvs]
36
34
 
37
35
  module.exports = {
38
- allEnvs,
39
- devEnvs,
40
36
  envs,
41
37
  prodEnvs,
42
- stagingEnvs
38
+ devEnvs,
39
+ allEnvs
43
40
  }
@@ -1,17 +1,10 @@
1
1
  const refreshPlugin = require('@rspack/plugin-react-refresh')
2
2
  const rspack = require('@rspack/core')
3
- const { allEnvs, devEnvs, stagingEnvs } = require('./envs')
3
+ const { devEnvs, allEnvs } = require('./envs')
4
4
  const CompressionPlugin = require('compression-webpack-plugin')
5
- const { HotmartRumPlugin } = require('@hotmart-org-ca/hot-observability-js/rum/webpack')
6
- const packageJSON = require('../../../package.json')
7
5
 
8
- const release = `${packageJSON.name}@v${packageJSON.version}`
9
-
10
- async function getEnvironmentPlugins(env) {
11
- const developmentMode = env !== 'production' && env !== 'staging'
12
- const stagingMode = env === 'staging'
13
-
14
- if (developmentMode) {
6
+ async function getEnvironmentPlugins(isDevelopment) {
7
+ if (isDevelopment) {
15
8
  const res = await fetch(
16
9
  `${process.env.SECURITY_BASE_URL}/security/oauth/token?grant_type=password&username=${process.env.USER_VLC}&password=${process.env.VLC_PASSWORD}`,
17
10
  {
@@ -31,7 +24,8 @@ async function getEnvironmentPlugins(env) {
31
24
  ]
32
25
  }
33
26
 
34
- const prodCommonPlugins = [
27
+ return [
28
+ new rspack.EnvironmentPlugin(allEnvs),
35
29
  new rspack.CssExtractRspackPlugin({
36
30
  filename: 'app-tutor-ai-consumer.css',
37
31
  chunkFilename: '[id].[contenthash].css'
@@ -40,28 +34,6 @@ async function getEnvironmentPlugins(env) {
40
34
  algorithm: 'gzip'
41
35
  })
42
36
  ]
43
-
44
- if (stagingMode) return [new rspack.EnvironmentPlugin(stagingEnvs), ...prodCommonPlugins]
45
-
46
- return [
47
- new rspack.EnvironmentPlugin(allEnvs),
48
- HotmartRumPlugin({
49
- authToken: process.env.SENTRY_AUTH_TOKEN,
50
- org: process.env.SENTRY_ORG,
51
- project: process.env.SENTRY_PROJECT,
52
- release: {
53
- name: release,
54
- deploy: {
55
- env: process.env.NODE_ENV
56
- }
57
- },
58
- moduleMetadata: () => ({
59
- dsn: process.env.SENTRY_DSN,
60
- release
61
- })
62
- }),
63
- ...prodCommonPlugins
64
- ]
65
37
  }
66
38
 
67
39
  module.exports = {
@@ -41,8 +41,3 @@ BUNDLE_PATH=https://app-club-microfrontends-prod.cp.hotmart.com
41
41
 
42
42
  # STATIC
43
43
  STATIC_URL=https://static.hotmart.com
44
-
45
- # SENTRY
46
- SENTRY_DSN=https://16c84dbea85a67f73a3696f6f05796bb@o49094.ingest.us.sentry.io/4509837136887808
47
- SENTRY_ORG=hotmart
48
- SENTRY_PROJECT=app-tutor-ai-consumer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-tutor-ai-consumer",
3
- "version": "1.26.1",
3
+ "version": "1.27.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
@@ -104,7 +104,6 @@
104
104
  },
105
105
  "dependencies": {
106
106
  "@hot-observability-js/react": "~1.1.0",
107
- "@hotmart-org-ca/hot-observability-js": "^1.1.0",
108
107
  "@hotmart/event-agent-js": "~1.1.2",
109
108
  "@hotmart/sparkie": "~5.1.0",
110
109
  "@lottiefiles/dotlottie-react": "~0.14.4",
@@ -3,8 +3,6 @@ import { Component } from 'react'
3
3
  import { HotmartRum } from '@hot-observability-js/react'
4
4
  import type { ErrorInfo, PropsWithChildren, ReactNode } from 'react'
5
5
 
6
- import { productionMode } from '../../utils'
7
-
8
6
  export type BoundaryState = {
9
7
  hasError: boolean
10
8
  }
@@ -20,7 +18,7 @@ export type BoundaryProps = PropsWithChildren<{
20
18
  }>
21
19
 
22
20
  const logError = (error: Error, errorInfo: ErrorInfo, user?: BoundaryProps['user']) => {
23
- if (!productionMode && typeof vi === 'undefined') {
21
+ if (process.env.TARGET_ENV !== 'production' && typeof vi === 'undefined') {
24
22
  return console.error(`Uncaught error: ${JSON.stringify({ error, errorInfo })}`)
25
23
  }
26
24
 
@@ -32,7 +30,6 @@ const logError = (error: Error, errorInfo: ErrorInfo, user?: BoundaryProps['user
32
30
  }
33
31
 
34
32
  const msg = errorInfo?.componentStack?.toString()
35
-
36
33
  if (msg) HotmartRum.captureMessage(msg)
37
34
 
38
35
  HotmartRum.captureException(error)
@@ -1,21 +1,9 @@
1
- import { useEffect, useState } from 'react'
2
-
3
1
  import { useSubscribeMessageReceivedEvent } from '@/src/modules/messages/hooks'
4
2
  import { useSubscribeThreadClosedEvent } from '@/src/modules/thread/hooks'
5
3
  import { useListenToVisibilityEvents } from '../../hooks'
6
4
  import { useWidgetTabsAtom } from '../../store'
7
5
  import { WIDGET_TABS } from '../constants'
8
6
 
9
- // TODO: REMOVE
10
- const hotmartRumKey = 'app-tutor-ai-consumer::hotmart-rum::activate'
11
- const useSentryDebugger = () => {
12
- const [logError] = useState(() => Boolean(window?.localStorage?.getItem?.(hotmartRumKey)))
13
-
14
- useEffect(() => {
15
- if (logError) throw new Error(hotmartRumKey)
16
- }, [logError])
17
- }
18
-
19
7
  function WidgetContainer() {
20
8
  const [widgetTabs] = useWidgetTabsAtom()
21
9
 
@@ -23,8 +11,6 @@ function WidgetContainer() {
23
11
  useSubscribeThreadClosedEvent()
24
12
  useListenToVisibilityEvents()
25
13
 
26
- useSentryDebugger()
27
-
28
14
  return (
29
15
  <div className='flex h-full flex-col items-center justify-stretch overflow-hidden'>
30
16
  {WIDGET_TABS[widgetTabs.currentTab]}
@@ -1 +0,0 @@
1
- declare module '@hotmart-org-ca/hot-observability-js/rum/react'
@@ -1,7 +0,0 @@
1
- import { HotmartRum as HotmartObservability } from '@hot-observability-js/react'
2
-
3
- import type { HotmartRumFunctions } from './types'
4
-
5
- const HotmartRum: HotmartRumFunctions = HotmartObservability
6
-
7
- export default HotmartRum
@@ -1,2 +0,0 @@
1
- export { default as HotmartRum } from './hot-observability'
2
- export * from './types'
@@ -1,29 +0,0 @@
1
- export type Levels = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug'
2
-
3
- export type ExtraParams = {
4
- stack?: string
5
- message?: string
6
- }
7
-
8
- export type ErrorParams = {
9
- name: string
10
- } & ExtraParams
11
-
12
- export type User = {
13
- id: number
14
- email: string
15
- }
16
-
17
- export type ScopeParams = {
18
- setUser: (user: User) => void
19
- setTag: (key: string, value: string) => void
20
- setLevel: (level: Levels) => void
21
- setExtras: (params: ExtraParams) => void
22
- }
23
-
24
- export type HotmartRumFunctions = {
25
- withScope: <T>(callback: (scope: ScopeParams) => T) => T
26
- captureException: (error: string, hint: any) => void
27
- captureMessage: (message: string) => string
28
- ErrorBoundary: any
29
- }