@gravito/satellite-announcement 0.1.4 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @gravito/satellite-announcement
2
2
 
3
+ ## 0.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @gravito/core@1.6.1
9
+ - @gravito/enterprise@1.0.4
10
+
3
11
  ## 0.1.4
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@gravito/satellite-announcement",
3
- "version": "0.1.4",
3
+ "sideEffects": false,
4
+ "version": "0.2.0",
4
5
  "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "scripts": {
7
- "build": "tsup src/index.ts --format esm --dts",
8
+ "build": "tsup src/index.ts --format esm",
9
+ "build:dts": "tsup src/index.ts --format esm --dts",
8
10
  "typecheck": "bun tsc -p tsconfig.json --noEmit --skipLibCheck"
9
11
  },
10
12
  "types": "dist/index.d.ts",
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@gravito/satellite-announcement",
3
+ "version": "0.1.4",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "tsup src/index.ts --format esm --dts",
8
+ "typecheck": "bun tsc -p tsconfig.json --noEmit --skipLibCheck"
9
+ },
10
+ "types": "dist/index.d.ts",
11
+ "dependencies": {
12
+ "@gravito/enterprise": "workspace:*",
13
+ "@gravito/atlas": "workspace:*",
14
+ "@gravito/core": "workspace:*"
15
+ },
16
+ "devDependencies": {
17
+ "tsup": "^8.3.5",
18
+ "typescript": "^5.9.3"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/gravito-framework/gravito.git",
26
+ "directory": "satellites/announcement"
27
+ }
28
+ }
@@ -0,0 +1,38 @@
1
+ import { describe, expect, it } from 'bun:test'
2
+ import { AnnouncementServiceProvider } from '../src/index'
3
+
4
+ describe('Announcement Satellite', () => {
5
+ describe('Service Provider', () => {
6
+ it('應該能成功初始化', () => {
7
+ const provider = new AnnouncementServiceProvider()
8
+
9
+ expect(provider).toBeDefined()
10
+ expect(AnnouncementServiceProvider.name).toBe('AnnouncementServiceProvider')
11
+ })
12
+
13
+ it('應該有 register 方法', () => {
14
+ const provider = new AnnouncementServiceProvider()
15
+
16
+ expect(typeof provider.register).toBe('function')
17
+ })
18
+
19
+ it('應該有 boot 方法', () => {
20
+ const provider = new AnnouncementServiceProvider()
21
+
22
+ expect(typeof provider.boot).toBe('function')
23
+ })
24
+ })
25
+
26
+ describe('Core', () => {
27
+ it('應該能實例化無錯誤', async () => {
28
+ const provider = new AnnouncementServiceProvider()
29
+
30
+ // 驗證基本初始化
31
+ const register = provider.register
32
+ expect(register).toBeDefined()
33
+
34
+ // boot 方法在 core 為 null 時應該返回
35
+ expect(() => provider.boot()).not.toThrow()
36
+ })
37
+ })
38
+ })
package/tsconfig.json CHANGED
@@ -1,21 +1,15 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "baseUrl": ".",
6
- "skipLibCheck": true,
7
- "types": ["bun-types"],
8
- "paths": {
9
- "@gravito/core": ["../../packages/core/src/index.ts"],
10
- "@gravito/*": ["../../packages/*/src/index.ts"]
11
- }
12
- },
13
- "include": [
14
- "src/**/*"
15
- ],
16
- "exclude": [
17
- "node_modules",
18
- "dist",
19
- "**/*.test.ts"
20
- ]
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "baseUrl": ".",
6
+ "skipLibCheck": true,
7
+ "types": ["bun-types"],
8
+ "paths": {
9
+ "@gravito/core": ["../../packages/core/src/index.ts"],
10
+ "@gravito/*": ["../../packages/*/src/index.ts"]
11
+ }
12
+ },
13
+ "include": ["src/**/*"],
14
+ "exclude": ["node_modules", "dist", "**/*.test.ts"]
21
15
  }