ti2 1.0.109 → 1.0.114
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.
|
@@ -1,29 +1,52 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Release Workflow
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
workflow_run:
|
|
5
|
-
workflows: Tests Workflow
|
|
6
|
-
branches: main
|
|
7
|
-
types: completed
|
|
8
4
|
workflow_dispatch:
|
|
9
5
|
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
|
|
10
9
|
jobs:
|
|
11
10
|
tag:
|
|
12
|
-
if: github.
|
|
11
|
+
if: github.ref_name == 'main' && github.repository == 'ti2travel/ti2'
|
|
13
12
|
runs-on: ubuntu-latest
|
|
13
|
+
outputs:
|
|
14
|
+
version: ${{ steps.version.outputs.version }}
|
|
15
|
+
tag: ${{ steps.version.outputs.tag }}
|
|
14
16
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
16
|
-
- uses: tool3/bump@master
|
|
17
|
+
- uses: actions/checkout@v4
|
|
17
18
|
with:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
branch: main
|
|
22
|
-
publish:
|
|
23
|
-
needs: tag
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v1
|
|
27
|
-
- uses: JS-DevTools/npm-publish@v1
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-node@v4
|
|
28
22
|
with:
|
|
29
|
-
|
|
23
|
+
node-version: 20
|
|
24
|
+
|
|
25
|
+
- name: Determine release version
|
|
26
|
+
id: version
|
|
27
|
+
run: |
|
|
28
|
+
node <<'NODE' >> "$GITHUB_OUTPUT"
|
|
29
|
+
const version = require('./package.json').version
|
|
30
|
+
const isSemver = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/
|
|
31
|
+
|
|
32
|
+
if (!isSemver.test(version)) {
|
|
33
|
+
throw new Error(`Invalid version: ${version}. Use semver like 1.2.3 or 1.2.3-beta.0`)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
console.log(`version=${version}`)
|
|
37
|
+
console.log(`tag=v${version}`)
|
|
38
|
+
NODE
|
|
39
|
+
|
|
40
|
+
- name: Create release tag
|
|
41
|
+
env:
|
|
42
|
+
TAG: ${{ steps.version.outputs.tag }}
|
|
43
|
+
run: |
|
|
44
|
+
git fetch --tags origin
|
|
45
|
+
|
|
46
|
+
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
|
47
|
+
echo "Tag $TAG already exists"
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
git tag "$TAG"
|
|
52
|
+
git push origin "refs/tags/$TAG"
|
|
@@ -219,6 +219,9 @@ describe('user', () => {
|
|
|
219
219
|
expect(plugins[0].validateToken).toHaveBeenCalled();
|
|
220
220
|
expect(valid).toBe(true);
|
|
221
221
|
expect(plugins[0].validateToken.mock.calls[0][0].token).toEqual({ custom: true, ...token });
|
|
222
|
+
expect(plugins[0].validateToken.mock.calls[0][0].payload).toEqual({
|
|
223
|
+
tokenHint: apiKey.split('-')[0],
|
|
224
|
+
});
|
|
222
225
|
});
|
|
223
226
|
it('should be able to delete an app settings', async () => {
|
|
224
227
|
const returnValue = await doApiDelete({
|
package/controllers/app.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDL + document for ti2 plugins
|
|
3
|
+
*/
|
|
1
4
|
const typeDefs = `
|
|
2
5
|
type Passenger {
|
|
3
6
|
firstName: String
|
|
@@ -16,8 +19,15 @@ const typeDefs = `
|
|
|
16
19
|
passengers: [Passenger]
|
|
17
20
|
}
|
|
18
21
|
|
|
22
|
+
type PuDoInfo {
|
|
23
|
+
date: String
|
|
24
|
+
time: String
|
|
25
|
+
remarks: String
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
type ServiceLine {
|
|
20
29
|
serviceLineId: ID!
|
|
30
|
+
serviceLineUpdateCount: Int
|
|
21
31
|
optionId: String!
|
|
22
32
|
optionName: String
|
|
23
33
|
linePrice: String
|
|
@@ -28,14 +38,20 @@ const typeDefs = `
|
|
|
28
38
|
paxList: [Passenger]
|
|
29
39
|
paxConfigs: [PaxConfig]
|
|
30
40
|
status: String
|
|
41
|
+
puInfo: PuDoInfo
|
|
42
|
+
doInfo: PuDoInfo
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
type Query {
|
|
34
46
|
bookingId: ID!
|
|
35
47
|
name: String!
|
|
36
48
|
bookingStatus: String
|
|
49
|
+
bookingStatusId: String
|
|
50
|
+
isBooking: Boolean
|
|
51
|
+
bookingAgent: String
|
|
37
52
|
ref: String!
|
|
38
53
|
agentRef: String
|
|
54
|
+
agentId: String
|
|
39
55
|
totalPrice: String!
|
|
40
56
|
currency: String!
|
|
41
57
|
travelDate: String!
|
|
@@ -49,8 +65,12 @@ const query = `{
|
|
|
49
65
|
name
|
|
50
66
|
bookingId
|
|
51
67
|
bookingStatus
|
|
68
|
+
bookingStatusId
|
|
69
|
+
isBooking
|
|
70
|
+
bookingAgent
|
|
52
71
|
ref
|
|
53
72
|
agentRef
|
|
73
|
+
agentId
|
|
54
74
|
totalPrice
|
|
55
75
|
currency
|
|
56
76
|
travelDate
|
|
@@ -58,15 +78,25 @@ const query = `{
|
|
|
58
78
|
canEdit
|
|
59
79
|
serviceLines {
|
|
60
80
|
serviceLineId
|
|
81
|
+
serviceLineUpdateCount
|
|
61
82
|
linePrice
|
|
62
83
|
quantity
|
|
63
84
|
optionId
|
|
64
85
|
optionName
|
|
65
86
|
supplierId
|
|
66
87
|
supplierName
|
|
67
|
-
supplierId
|
|
68
88
|
startDate
|
|
69
89
|
status
|
|
90
|
+
puInfo {
|
|
91
|
+
date
|
|
92
|
+
time
|
|
93
|
+
remarks
|
|
94
|
+
}
|
|
95
|
+
doInfo {
|
|
96
|
+
date
|
|
97
|
+
time
|
|
98
|
+
remarks
|
|
99
|
+
}
|
|
70
100
|
paxConfigs {
|
|
71
101
|
roomType
|
|
72
102
|
adults
|