@stamhoofd/backend-statistics-syncer 2.151.1 → 2.153.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/.gitignore ADDED
@@ -0,0 +1,221 @@
1
+ /devops/
2
+ node_modules/
3
+ .node_modules/
4
+ built/*
5
+ tests/cases/rwc/*
6
+ tests/cases/test262/*
7
+ tests/cases/perf/*
8
+ !tests/cases/webharness/compilerToString.js
9
+ test-args.txt
10
+ ~*.docx
11
+ \#*\#
12
+ .\#*
13
+ tests/baselines/local/*
14
+ tests/baselines/local.old/*
15
+ tests/services/baselines/local/*
16
+ tests/baselines/prototyping/local/*
17
+ tests/baselines/rwc/*
18
+ tests/baselines/test262/*
19
+ tests/baselines/reference/projectOutput/*
20
+ tests/baselines/local/projectOutput/*
21
+ tests/baselines/reference/testresults.tap
22
+ tests/services/baselines/prototyping/local/*
23
+ tests/services/browser/typescriptServices.js
24
+ src/harness/*.js
25
+ src/compiler/diagnosticInformationMap.generated.ts
26
+ src/compiler/diagnosticMessages.generated.json
27
+ src/parser/diagnosticInformationMap.generated.ts
28
+ src/parser/diagnosticMessages.generated.json
29
+ rwc-report.html
30
+ *.swp
31
+ build.json
32
+ *.actual
33
+ tests/webTestServer.js
34
+ tests/webTestServer.js.map
35
+ tests/webhost/*.d.ts
36
+ tests/webhost/webtsc.js
37
+ tests/cases/**/*.js
38
+ !tests/cases/docker/*.js/
39
+ tests/cases/**/*.js.map
40
+ *.config
41
+ scripts/eslint/built/
42
+ scripts/debug.bat
43
+ scripts/run.bat
44
+ scripts/word2md.js
45
+ scripts/buildProtocol.js
46
+ scripts/ior.js
47
+ scripts/authors.js
48
+ scripts/configurePrerelease.js
49
+ scripts/configureLanguageServiceBuild.js
50
+ scripts/open-user-pr.js
51
+ scripts/open-cherry-pick-pr.js
52
+ scripts/processDiagnosticMessages.d.ts
53
+ scripts/processDiagnosticMessages.js
54
+ scripts/produceLKG.js
55
+ scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
56
+ scripts/generateLocalizedDiagnosticMessages.js
57
+ scripts/request-pr-review.js
58
+ scripts/*.js.map
59
+ scripts/typings/
60
+ coverage/
61
+ internal/
62
+ **/.DS_Store
63
+ .settings
64
+ !tests/cases/projects/projectOption/**/node_modules
65
+ !tests/cases/projects/NodeModulesSearch/**/*
66
+ !tests/baselines/reference/project/nodeModules*/**/*
67
+ .idea
68
+ yarn-error.log
69
+ .parallelperf.*
70
+ tests/cases/user/*/package-lock.json
71
+ tests/cases/user/*/node_modules/
72
+ tests/cases/user/*/**/*.js
73
+ tests/cases/user/*/**/*.js.map
74
+ tests/cases/user/*/**/*.d.ts
75
+ !tests/cases/user/zone.js/
76
+ !tests/cases/user/bignumber.js/
77
+ !tests/cases/user/discord.js/
78
+ tests/baselines/reference/dt
79
+ .failed-tests
80
+ TEST-results.xml
81
+ package-lock.json
82
+ tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
83
+ tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
84
+ tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
85
+ tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
86
+ tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
87
+ tests/cases/user/create-react-app/create-react-app
88
+ tests/cases/user/fp-ts/fp-ts
89
+ tests/cases/user/webpack/webpack
90
+ tests/cases/user/puppeteer/puppeteer
91
+ tests/cases/user/axios-src/axios-src
92
+ tests/cases/user/prettier/prettier
93
+ .eslintcache
94
+
95
+ # Logs
96
+ logs
97
+ *.log
98
+ npm-debug.log*
99
+ yarn-debug.log*
100
+ yarn-error.log*
101
+ lerna-debug.log*
102
+
103
+ # Diagnostic reports (https://nodejs.org/api/report.html)
104
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
105
+
106
+ # Runtime data
107
+ pids
108
+ *.pid
109
+ *.seed
110
+ *.pid.lock
111
+
112
+ # Directory for instrumented libs generated by jscoverage/JSCover
113
+ lib-cov
114
+
115
+ # Coverage directory used by tools like istanbul
116
+ coverage
117
+ *.lcov
118
+
119
+ # nyc test coverage
120
+ .nyc_output
121
+
122
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
123
+ .grunt
124
+
125
+ # Bower dependency directory (https://bower.io/)
126
+ bower_components
127
+
128
+ # node-waf configuration
129
+ .lock-wscript
130
+
131
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
132
+ build/Release
133
+
134
+ # Dependency directories
135
+ node_modules/
136
+ jspm_packages/
137
+
138
+ # Snowpack dependency directory (https://snowpack.dev/)
139
+ web_modules/
140
+
141
+ # TypeScript cache
142
+ *.tsbuildinfo
143
+
144
+ # Optional npm cache directory
145
+ .npm
146
+
147
+ # Optional eslint cache
148
+ .eslintcache
149
+
150
+ # Microbundle cache
151
+ .rpt2_cache/
152
+ .rts2_cache_cjs/
153
+ .rts2_cache_es/
154
+ .rts2_cache_umd/
155
+
156
+ # Optional REPL history
157
+ .node_repl_history
158
+
159
+ # Output of 'npm pack'
160
+ *.tgz
161
+
162
+ # Yarn Integrity file
163
+ .yarn-integrity
164
+
165
+ # dotenv environment variables file
166
+ .env
167
+ .env.test
168
+
169
+ # parcel-bundler cache (https://parceljs.org/)
170
+ .cache
171
+ .parcel-cache
172
+
173
+ # Next.js build output
174
+ .next
175
+
176
+ # Nuxt.js build / generate output
177
+ .nuxt
178
+ dist
179
+
180
+ # Gatsby files
181
+ .cache/
182
+ # Comment in the public line in if your project uses Gatsby and not Next.js
183
+ # https://nextjs.org/blog/next-9-1#public-directory-support
184
+ # public
185
+
186
+ # vuepress build output
187
+ .vuepress/dist
188
+
189
+ # Serverless directories
190
+ .serverless/
191
+
192
+ # FuseBox cache
193
+ .fusebox/
194
+
195
+ # DynamoDB Local files
196
+ .dynamodb/
197
+
198
+ # TernJS port file
199
+ .tern-port
200
+
201
+ # Stores VSCode versions used for testing VSCode extensions
202
+ .vscode-test
203
+
204
+ # yarn v2
205
+
206
+ .yarn/cache
207
+ .yarn/unplugged
208
+ .yarn/build-state.yml
209
+ .pnp.*
210
+
211
+ .yalc
212
+ yalc.lock
213
+
214
+ .yarn
215
+
216
+ # Yarnrc should be removed from git, because it breaks yarn if the version is not installed yet
217
+ .yarnrc
218
+
219
+ .env.json
220
+ .env.*.json
221
+ !.env.template.json
package/README.md CHANGED
@@ -20,8 +20,8 @@ shared package, so the dependency could only run the wrong way.
20
20
  ## Running
21
21
 
22
22
  ```bash
23
- yarn start # boot the service
24
- yarn migrations # migrate the statistics database (part of `yarn migrate` from the repo root)
23
+ pnpm run start # boot the service
24
+ pnpm run migrations # migrate the statistics database (part of `pnpm run migrate` from the repo root)
25
25
  ```
26
26
 
27
27
  Wherever this service runs, it syncs: there is nothing to switch off in configuration, so deploy it
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ import backendEnv from '@stamhoofd/backend-env';
2
+ process.title = 'stamhoofd-statistics-syncer';
3
+ backendEnv.load({ service: 'statistics-syncer' }).catch((error) => {
4
+ console.error('Failed to load environment:', error);
5
+ process.exit(1);
6
+ }).then(async () => {
7
+ if (STAMHOOFD.environment === 'development') {
8
+ const { run } = await import('./src/migrate.js');
9
+ await run();
10
+ }
11
+ const { boot } = await import('./src/boot.js');
12
+ boot({ killProcess: true }).catch((error) => {
13
+ console.error('unhandledRejection', error);
14
+ process.exit(1);
15
+ });
16
+ }).catch((error) => {
17
+ console.error('Failed to start the statistics service:', error);
18
+ process.exit(1);
19
+ });
20
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,51 +1,50 @@
1
1
  {
2
- "name": "@stamhoofd/backend-statistics-syncer",
3
- "version": "2.151.1",
4
- "type": "module",
5
- "main": "./dist/index.js",
6
- "exports": {
7
- ".": {
8
- "require": "./dist/index.js"
9
- }
10
- },
11
- "scripts": {
12
- "build": "tsc --build tsconfig.build.json && mkdir -p ./dist/src/migrations && rsync --delete --exclude='*.ts' --exclude='*.js' --exclude='*.map' -r --checksum ./src/migrations/ ./dist/src/migrations/",
13
- "build:full": "yarn -s clear && yarn -s build",
14
- "clear": "rm -rf ./dist && rm -f *.tsbuildinfo",
15
- "dev": "wait-on ../../shared/middleware/dist/index.js && concurrently -r 'yarn -s build --watch --preserveWatchOutput' \"wait-on ./dist/index.js && nodemon --quiet --inspect=5859 --watch dist --watch '../../../shared/*/dist/' --watch '../../shared/*/dist/' --ext .ts,.json,.sql,.js --watch .env.json --delay 1000ms --exec 'node --enable-source-maps ./dist/index.js' --signal SIGTERM\"",
16
- "dev:build": "yarn -s build",
17
- "dev:full": "yarn -s dev",
18
- "lint": "eslint",
19
- "migrations": "yarn -s build:full && node ./dist/migrations.js",
20
- "start": "yarn -s build && node --enable-source-maps ./dist/index.js",
21
- "typecheck": "tsc --build tsconfig.test.json",
22
- "test": "vitest",
23
- "test:coverage": "vitest --coverage"
24
- },
25
- "dependencies": {
26
- "@simonbackx/simple-database": "1.40.0",
27
- "@simonbackx/simple-encoding": "2.26.11",
28
- "@simonbackx/simple-errors": "1.5.0",
29
- "@simonbackx/simple-logging": "1.0.1",
30
- "@stamhoofd/backend-env": "2.151.1",
31
- "@stamhoofd/crons": "2.151.1",
32
- "@stamhoofd/logging": "2.151.1",
33
- "@stamhoofd/models": "2.151.1",
34
- "@stamhoofd/queues": "2.151.1",
35
- "@stamhoofd/sql": "2.151.1",
36
- "@stamhoofd/structures": "2.151.1",
37
- "@stamhoofd/types": "2.151.1",
38
- "@stamhoofd/utility": "2.151.1",
39
- "mysql2": "3.23.1"
40
- },
41
- "devDependencies": {
42
- "@stamhoofd/test-utils": "2.151.1",
43
- "@types/node": "22.20.1",
44
- "vitest": "4.1.10"
45
- },
46
- "license": "UNLICENCED",
47
- "publishConfig": {
48
- "access": "public"
49
- },
50
- "gitHead": "77331fca6a59fa0b0e7bc2e85f7a5e727f87b707"
51
- }
2
+ "name": "@stamhoofd/backend-statistics-syncer",
3
+ "version": "2.153.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "exports": {
7
+ ".": {
8
+ "require": "./dist/index.js"
9
+ }
10
+ },
11
+ "dependencies": {
12
+ "@simonbackx/simple-database": "1.40.1",
13
+ "@simonbackx/simple-encoding": "2.26.11",
14
+ "@simonbackx/simple-errors": "1.5.0",
15
+ "@simonbackx/simple-logging": "1.0.1",
16
+ "@stamhoofd/backend-env": "2.153.0",
17
+ "@stamhoofd/crons": "2.153.0",
18
+ "@stamhoofd/logging": "2.153.0",
19
+ "@stamhoofd/models": "2.153.0",
20
+ "@stamhoofd/queues": "2.153.0",
21
+ "@stamhoofd/sql": "2.153.0",
22
+ "@stamhoofd/structures": "2.153.0",
23
+ "@stamhoofd/types": "2.153.0",
24
+ "@stamhoofd/utility": "2.153.0",
25
+ "mysql2": "3.24.4"
26
+ },
27
+ "devDependencies": {
28
+ "@stamhoofd/test-utils": "2.153.0",
29
+ "@types/node": "22.20.4",
30
+ "vitest": "4.1.11"
31
+ },
32
+ "license": "UNLICENCED",
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "scripts": {
37
+ "build": "tsc --build tsconfig.build.json && mkdir -p ./dist/src/migrations && rsync --delete --exclude='*.ts' --exclude='*.js' --exclude='*.map' -r --checksum ./src/migrations/ ./dist/src/migrations/",
38
+ "build:full": "pnpm run clear && pnpm run build",
39
+ "clear": "rm -rf ./dist && rm -f *.tsbuildinfo",
40
+ "dev": "wait-on ../../shared/middleware/dist/index.js && concurrently -r 'pnpm run build --watch --preserveWatchOutput' \"wait-on ./dist/index.js && nodemon --quiet --inspect=5859 --watch dist --watch '../../../shared/*/dist/' --watch '../../shared/*/dist/' --ext .ts,.json,.sql,.js --watch .env.json --delay 1000ms --exec 'node --enable-source-maps ./dist/index.js' --signal SIGTERM\"",
41
+ "dev:build": "pnpm run build",
42
+ "dev:full": "pnpm run dev",
43
+ "lint": "eslint",
44
+ "migrations": "pnpm run build:full && node ./dist/migrations.js",
45
+ "start": "pnpm run build && node --enable-source-maps ./dist/index.js",
46
+ "typecheck": "tsc --build tsconfig.test.json",
47
+ "test": "vitest",
48
+ "test:coverage": "vitest --coverage"
49
+ }
50
+ }