@fedify/amqp 0.2.0-dev.12 → 0.3.0-dev.16

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.
@@ -0,0 +1 @@
1
+ github: dahlia
@@ -0,0 +1,93 @@
1
+ name: main
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ permissions:
8
+ checks: write
9
+ pull-requests: write
10
+ services:
11
+ rabbitmq:
12
+ image: rabbitmq
13
+ env:
14
+ RABBITMQ_DEFAULT_USER: guest
15
+ RABBITMQ_DEFAULT_PASS: guest
16
+ ports:
17
+ - 5672:5672
18
+ env:
19
+ AMQP_URL: amqp://guest:guest@localhost:5672
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: denoland/setup-deno@v1
23
+ with:
24
+ deno-version: v2.x
25
+ - uses: actions/setup-node@v4
26
+ with:
27
+ node-version: latest
28
+ - uses: oven-sh/setup-bun@v1
29
+ with:
30
+ bun-version: latest
31
+ - uses: pnpm/action-setup@v4
32
+ with:
33
+ version: latest
34
+ - run: deno task test --junit-path=.test-report.xml
35
+ - uses: EnricoMi/publish-unit-test-result-action@v2
36
+ if: always()
37
+ with:
38
+ files: .test-report.xml
39
+ - run: deno task check
40
+ - run: pnpm install
41
+ - run: pnpm test
42
+ - run: pnpm test:bun
43
+
44
+ publish:
45
+ if: github.event_name == 'push'
46
+ needs: [test]
47
+ runs-on: ubuntu-latest
48
+ permissions:
49
+ contents: read
50
+ id-token: write
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: denoland/setup-deno@v1
54
+ with:
55
+ deno-version: v2.x
56
+ - uses: actions/setup-node@v4
57
+ with:
58
+ node-version: latest
59
+ - uses: pnpm/action-setup@v4
60
+ with:
61
+ version: latest
62
+ - if: github.ref_type == 'branch'
63
+ run: |
64
+ jq \
65
+ --arg build "$GITHUB_RUN_NUMBER" \
66
+ --arg commit "${GITHUB_SHA::8}" \
67
+ '.version = .version + "-dev." + $build + "+" + $commit' \
68
+ deno.json > deno.json.tmp
69
+ mv deno.json.tmp deno.json
70
+ jq \
71
+ --arg build "$GITHUB_RUN_NUMBER" \
72
+ --arg commit "${GITHUB_SHA::8}" \
73
+ '.version = .version + "-dev." + $build + "+" + $commit' \
74
+ package.json > package.json.tmp
75
+ mv package.json.tmp package.json
76
+ - if: github.ref_type == 'tag'
77
+ run: |
78
+ set -ex
79
+ [[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]
80
+ [[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]]
81
+ - run: pnpm install && pnpm build
82
+ - run: |
83
+ set -ex
84
+ pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
85
+ if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
86
+ pnpm publish --no-git-checks --access public
87
+ else
88
+ pnpm publish --no-git-checks --access public --tag dev
89
+ fi
90
+ env:
91
+ NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
92
+ NPM_CONFIG_PROVENANCE: "true"
93
+ - run: deno publish --allow-dirty
@@ -0,0 +1,6 @@
1
+ {
2
+ "recommendations": [
3
+ "denoland.vscode-deno",
4
+ "streetsidesoftware.code-spell-checker"
5
+ ]
6
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "cSpell.enabled": false,
3
+ "deno.enable": true,
4
+ "deno.unstable": [
5
+ "temporal"
6
+ ],
7
+ "editor.detectIndentation": false,
8
+ "editor.indentSize": 2,
9
+ "editor.insertSpaces": true,
10
+ "files.eol": "\n",
11
+ "files.insertFinalNewline": true,
12
+ "files.trimFinalNewlines": true,
13
+ "[json]": {
14
+ "editor.defaultFormatter": "vscode.json-language-features",
15
+ "editor.formatOnSave": true
16
+ },
17
+ "[jsonc]": {
18
+ "editor.defaultFormatter": "vscode.json-language-features",
19
+ "editor.formatOnSave": true
20
+ },
21
+ "[typescript]": {
22
+ "editor.defaultFormatter": "denoland.vscode-deno",
23
+ "editor.formatOnSave": true,
24
+ "editor.codeActionsOnSave": {
25
+ "source.sortImports": "always"
26
+ }
27
+ },
28
+ "cSpell.words": [
29
+ "fedify",
30
+ "unlisten",
31
+ "UNLOGGED"
32
+ ]
33
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "deno": {
3
+ "enable": true
4
+ },
5
+ "ensure_final_newline_on_save": true,
6
+ "format_on_save": "on",
7
+ "formatter": "language_server",
8
+ "languages": {
9
+ "TypeScript": {
10
+ "language_servers": [
11
+ "deno",
12
+ "!typescript-language-server",
13
+ "!vtsls",
14
+ "!eslint",
15
+ "..."
16
+ ]
17
+ },
18
+ "TSX": {
19
+ "language_servers": [
20
+ "deno",
21
+ "!typescript-language-server",
22
+ "!vtsls",
23
+ "!eslint",
24
+ "..."
25
+ ]
26
+ }
27
+ },
28
+ "show_wrap_guides": true,
29
+ "wrap_guides": [80]
30
+ }
package/README.md CHANGED
@@ -68,10 +68,17 @@ bun add @fedify/amqp
68
68
  Changelog
69
69
  ---------
70
70
 
71
- ### Version 0.2.0
71
+ ### Version 0.3.0
72
72
 
73
73
  To be released.
74
74
 
75
+ - The type of the `AmqpMessageQueue()` constructor's first parameter has been
76
+ changed from `Connection` to `ChannelModel`.
77
+
78
+ ### Version 0.2.0
79
+
80
+ Released on March 28, 2025.
81
+
75
82
  - Added `AmqpMessageQueue.enqueueMany()` method for efficiently enqueuing
76
83
  multiple messages at once.
77
84
 
package/deno.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@fedify/amqp",
3
+ "version": "0.3.0-dev.16+bc8a5574",
4
+ "license": "MIT",
5
+ "exports": {
6
+ ".": "./mod.ts",
7
+ "./mq": "./src/mq.ts"
8
+ },
9
+ "imports": {
10
+ "@alinea/suite": "jsr:@alinea/suite@^0.6.2",
11
+ "@fedify/fedify": "jsr:@fedify/fedify@^1.5.0",
12
+ "@std/assert": "jsr:@std/assert@^1.0.13",
13
+ "@std/async": "jsr:@std/async@^1.0.13",
14
+ "amqplib": "npm:amqplib@^0.10.8",
15
+ "tsdown": "npm:tsdown@^0.12.7"
16
+ },
17
+ "nodeModulesDir": "auto",
18
+ "unstable": [
19
+ "temporal"
20
+ ],
21
+ "exclude": [
22
+ ".github",
23
+ "node_modules",
24
+ "npm",
25
+ "pnpm-lock.yaml"
26
+ ],
27
+ "tasks": {
28
+ "build": "pnpm build",
29
+ "check": "deno fmt --check && deno lint && deno check */*.ts",
30
+ "test": "deno test --allow-net --allow-env",
31
+ "test:node": {
32
+ "dependencies": [
33
+ "build"
34
+ ],
35
+ "command": "node --experimental-transform-types --test"
36
+ },
37
+ "test:bun": {
38
+ "dependencies": [
39
+ "build"
40
+ ],
41
+ "command": "bun test --timeout 15000"
42
+ },
43
+ "test-all": {
44
+ "dependencies": [
45
+ "test",
46
+ "test:node",
47
+ "test:bun"
48
+ ]
49
+ }
50
+ }
51
+ }