@hautechai/sdk 0.3.46 → 1.0.2

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,157 @@
1
+ name: Release
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: true
6
+
7
+ on:
8
+ push:
9
+ branches:
10
+ - 'main'
11
+ workflow_dispatch:
12
+
13
+ env:
14
+ APP_NAME: sdk
15
+ NODE_VERSION: 22
16
+ TAG_PREFIX: "@hautechai"
17
+
18
+ permissions:
19
+ contents: write
20
+ id-token: write
21
+
22
+ jobs:
23
+ test:
24
+ runs-on: ubuntu-latest
25
+ environment: main
26
+ steps:
27
+ - name: Checkout
28
+ uses: actions/checkout@v4.2.2
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - name: Setup PNPM
33
+ uses: pnpm/action-setup@v3
34
+ with:
35
+ run_install: false
36
+
37
+ - name: Setup Node.js
38
+ uses: actions/setup-node@v4.4.0
39
+ with:
40
+ node-version: ${{ env.NODE_VERSION }}
41
+ cache: 'pnpm'
42
+
43
+ - name: Install dependencies
44
+ run: pnpm install --frozen-lockfile
45
+ env:
46
+ HUSKY: 0
47
+
48
+ - name: Test
49
+ run: pnpm test
50
+ env:
51
+ API_CORE_URL: https://api.dev.hautech.ai
52
+ APP_ID: ${{ secrets.APP_ID }}
53
+ APP_KEY_ID: ${{ secrets.APP_KEY_ID }}
54
+ APP_KEY_SECRET: ${{ secrets.APP_KEY_SECRET }}
55
+ SDK_TOKEN: ${{ secrets.SDK_TOKEN }}
56
+
57
+ version:
58
+ runs-on: ubuntu-22.04
59
+ needs: [test]
60
+ name: Version packages
61
+ outputs:
62
+ release_created: ${{ steps.semantic.outputs.release_created }}
63
+ steps:
64
+ - uses: tibdex/github-app-token@v2
65
+ id: generate_token
66
+ with:
67
+ app_id: ${{ secrets.BOT_APPLICATION_ID }}
68
+ private_key: ${{ secrets.BOT_PRIVATE_KEY }}
69
+
70
+ - name: Checkout
71
+ uses: actions/checkout@v4.2.2
72
+ with:
73
+ fetch-depth: 0
74
+
75
+ - name: Setup PNPM
76
+ uses: pnpm/action-setup@v3
77
+ with:
78
+ run_install: false
79
+
80
+ - name: Setup Node.js
81
+ uses: actions/setup-node@v4.4.0
82
+ with:
83
+ node-version: ${{ env.NODE_VERSION }}
84
+ cache: 'pnpm'
85
+
86
+ - name: Install dependencies
87
+ run: pnpm install --frozen-lockfile
88
+ env:
89
+ HUSKY: 0
90
+
91
+ - name: Prepare repository
92
+ run: |
93
+ git config user.email "admin@hautech.ai"
94
+ git config user.name "Hautech Bot"
95
+
96
+ - name: up version
97
+ id: semantic
98
+ run: |
99
+ OUTPUT=$(pnpm run up-versions)
100
+
101
+ echo $OUTPUT
102
+
103
+ if echo "$OUTPUT" | grep -q "no new version is released"; then
104
+ echo "release_created=false" >> $GITHUB_OUTPUT
105
+ else
106
+ echo "release_created=true" >> $GITHUB_OUTPUT
107
+ fi
108
+ env:
109
+ GH_TOKEN: ${{ steps.generate_token.outputs.token }}
110
+
111
+ publish:
112
+ runs-on: ubuntu-22.04
113
+ name: Publish
114
+ needs: [version]
115
+ environment: main
116
+ if: (!contains(needs.version.result, 'failure') && needs.version.outputs.release_created == 'true' && always())
117
+ steps:
118
+ - name: Checkout
119
+ uses: actions/checkout@v4.2.2
120
+ with:
121
+ fetch-depth: 0
122
+
123
+ - name: Setup PNPM
124
+ uses: pnpm/action-setup@v3
125
+ with:
126
+ run_install: false
127
+
128
+ - name: Setup Node.js
129
+ uses: actions/setup-node@v4.4.0
130
+ with:
131
+ node-version: ${{ env.NODE_VERSION }}
132
+ registry-url: 'https://registry.npmjs.org'
133
+ cache: 'pnpm'
134
+
135
+ - name: Install dependencies
136
+ run: pnpm install --frozen-lockfile
137
+ env:
138
+ HUSKY: 0
139
+
140
+ - name: Get version
141
+ id: version
142
+ run: |
143
+ git fetch --all --tags
144
+
145
+ TAG=$(git tag --list "${{ env.TAG_PREFIX }}/${{ env.APP_NAME }}@*" | sort -V | tail -n 1 | awk -F'@' '{print $3}')
146
+
147
+ echo "tag=$TAG" >> $GITHUB_OUTPUT
148
+
149
+ - name: Build the package
150
+ run: pnpm build
151
+
152
+ - name: Publish the package
153
+ run: |
154
+ pnpm version from-git --no-commit-hooks --no-git-tag-version --allow-same-version
155
+ pnpm publish --no-git-checks --access public
156
+ env:
157
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -305,6 +305,12 @@ export interface AnimateKling16ProV1Response {
305
305
  * @memberof AnimateKling16ProV1Response
306
306
  */
307
307
  'type': string;
308
+ /**
309
+ *
310
+ * @type {string}
311
+ * @memberof AnimateKling16ProV1Response
312
+ */
313
+ 'price'?: string;
308
314
  /**
309
315
  *
310
316
  * @type {string}
@@ -437,6 +443,12 @@ export interface AnimateKling21V1Response {
437
443
  * @memberof AnimateKling21V1Response
438
444
  */
439
445
  'type': string;
446
+ /**
447
+ *
448
+ * @type {string}
449
+ * @memberof AnimateKling21V1Response
450
+ */
451
+ 'price'?: string;
440
452
  /**
441
453
  *
442
454
  * @type {string}
@@ -727,6 +739,12 @@ export interface CompositeV1Response {
727
739
  * @memberof CompositeV1Response
728
740
  */
729
741
  'type': string;
742
+ /**
743
+ *
744
+ * @type {string}
745
+ * @memberof CompositeV1Response
746
+ */
747
+ 'price'?: string;
730
748
  /**
731
749
  *
732
750
  * @type {string}
@@ -842,6 +860,12 @@ export interface ContrastV1Response {
842
860
  * @memberof ContrastV1Response
843
861
  */
844
862
  'type': string;
863
+ /**
864
+ *
865
+ * @type {string}
866
+ * @memberof ContrastV1Response
867
+ */
868
+ 'price'?: string;
845
869
  /**
846
870
  *
847
871
  * @type {string}
@@ -1071,6 +1095,12 @@ export interface CropV1Response {
1071
1095
  * @memberof CropV1Response
1072
1096
  */
1073
1097
  'type': string;
1098
+ /**
1099
+ *
1100
+ * @type {string}
1101
+ * @memberof CropV1Response
1102
+ */
1103
+ 'price'?: string;
1074
1104
  /**
1075
1105
  *
1076
1106
  * @type {string}
@@ -1186,6 +1216,12 @@ export interface CutV1Response {
1186
1216
  * @memberof CutV1Response
1187
1217
  */
1188
1218
  'type': string;
1219
+ /**
1220
+ *
1221
+ * @type {string}
1222
+ * @memberof CutV1Response
1223
+ */
1224
+ 'price'?: string;
1189
1225
  /**
1190
1226
  *
1191
1227
  * @type {string}
@@ -1334,6 +1370,12 @@ export interface EchoV1Response {
1334
1370
  * @memberof EchoV1Response
1335
1371
  */
1336
1372
  'type': string;
1373
+ /**
1374
+ *
1375
+ * @type {string}
1376
+ * @memberof EchoV1Response
1377
+ */
1378
+ 'price'?: string;
1337
1379
  /**
1338
1380
  *
1339
1381
  * @type {string}
@@ -1467,6 +1509,12 @@ export interface EditFluxKontextDevV1Response {
1467
1509
  * @memberof EditFluxKontextDevV1Response
1468
1510
  */
1469
1511
  'type': string;
1512
+ /**
1513
+ *
1514
+ * @type {string}
1515
+ * @memberof EditFluxKontextDevV1Response
1516
+ */
1517
+ 'price'?: string;
1470
1518
  /**
1471
1519
  *
1472
1520
  * @type {string}
@@ -1585,6 +1633,35 @@ export declare const GPTV2AssistantMessageDtoRoleEnum: {
1585
1633
  readonly Assistant: "assistant";
1586
1634
  };
1587
1635
  export type GPTV2AssistantMessageDtoRoleEnum = typeof GPTV2AssistantMessageDtoRoleEnum[keyof typeof GPTV2AssistantMessageDtoRoleEnum];
1636
+ /**
1637
+ *
1638
+ * @export
1639
+ * @interface GPTV2DeveloperMessageDto
1640
+ */
1641
+ export interface GPTV2DeveloperMessageDto {
1642
+ /**
1643
+ * The content of the developer message.
1644
+ * @type {string}
1645
+ * @memberof GPTV2DeveloperMessageDto
1646
+ */
1647
+ 'content': string;
1648
+ /**
1649
+ * The role of the message sender.
1650
+ * @type {string}
1651
+ * @memberof GPTV2DeveloperMessageDto
1652
+ */
1653
+ 'role': GPTV2DeveloperMessageDtoRoleEnum;
1654
+ /**
1655
+ * The name of the sender, if applicable.
1656
+ * @type {string}
1657
+ * @memberof GPTV2DeveloperMessageDto
1658
+ */
1659
+ 'name'?: string;
1660
+ }
1661
+ export declare const GPTV2DeveloperMessageDtoRoleEnum: {
1662
+ readonly Developer: "developer";
1663
+ };
1664
+ export type GPTV2DeveloperMessageDtoRoleEnum = typeof GPTV2DeveloperMessageDtoRoleEnum[keyof typeof GPTV2DeveloperMessageDtoRoleEnum];
1588
1665
  /**
1589
1666
  *
1590
1667
  * @export
@@ -1598,7 +1675,7 @@ export interface GPTV2Input {
1598
1675
  */
1599
1676
  'model'?: GPTV2InputModelEnum;
1600
1677
  /**
1601
- * A list of messages comprising the conversation so far. Each message must be one of: system, user, assistant, or tool message DTO.
1678
+ * A list of messages comprising the conversation so far. Each message must be one of: system, user, assistant, tool, or developer message DTO.
1602
1679
  * @type {Array<GPTV2InputMessagesInner>}
1603
1680
  * @memberof GPTV2Input
1604
1681
  */
@@ -1641,15 +1718,19 @@ export interface GPTV2Input {
1641
1718
  'max_completion_tokens'?: number;
1642
1719
  }
1643
1720
  export declare const GPTV2InputModelEnum: {
1644
- readonly _4o: "gpt-4o";
1645
- readonly _41Mini: "gpt-4.1-mini";
1721
+ readonly Gpt4o: "gpt-4o";
1722
+ readonly O3: "o3";
1723
+ readonly O3Mini: "o3-mini";
1724
+ readonly Gpt41: "gpt-4.1";
1725
+ readonly Gpt41Mini: "gpt-4.1-mini";
1726
+ readonly Gpt41Nano: "gpt-4.1-nano";
1646
1727
  };
1647
1728
  export type GPTV2InputModelEnum = typeof GPTV2InputModelEnum[keyof typeof GPTV2InputModelEnum];
1648
1729
  /**
1649
1730
  * @type GPTV2InputMessagesInner
1650
1731
  * @export
1651
1732
  */
1652
- export type GPTV2InputMessagesInner = GPTV2AssistantMessageDto | GPTV2SystemMessageDto | GPTV2ToolMessageDto | GPTV2UserMessageDto;
1733
+ export type GPTV2InputMessagesInner = GPTV2AssistantMessageDto | GPTV2DeveloperMessageDto | GPTV2SystemMessageDto | GPTV2ToolMessageDto | GPTV2UserMessageDto;
1653
1734
  /**
1654
1735
  * @type GPTV2InputResponseFormat
1655
1736
  * The response format for the model output. See OpenAI docs for details.
@@ -2233,6 +2314,12 @@ export interface GptV1Response {
2233
2314
  * @memberof GptV1Response
2234
2315
  */
2235
2316
  'type': string;
2317
+ /**
2318
+ *
2319
+ * @type {string}
2320
+ * @memberof GptV1Response
2321
+ */
2322
+ 'price'?: string;
2236
2323
  /**
2237
2324
  *
2238
2325
  * @type {string}
@@ -2329,6 +2416,12 @@ export interface GptV2Response {
2329
2416
  * @memberof GptV2Response
2330
2417
  */
2331
2418
  'type': string;
2419
+ /**
2420
+ *
2421
+ * @type {string}
2422
+ * @memberof GptV2Response
2423
+ */
2424
+ 'price'?: string;
2332
2425
  /**
2333
2426
  *
2334
2427
  * @type {string}
@@ -2474,6 +2567,12 @@ export interface HauteLindaV1Response {
2474
2567
  * @memberof HauteLindaV1Response
2475
2568
  */
2476
2569
  'type': string;
2570
+ /**
2571
+ *
2572
+ * @type {string}
2573
+ * @memberof HauteLindaV1Response
2574
+ */
2575
+ 'price'?: string;
2477
2576
  /**
2478
2577
  *
2479
2578
  * @type {string}
@@ -2570,6 +2669,12 @@ export interface HauteNaomiV1Response {
2570
2669
  * @memberof HauteNaomiV1Response
2571
2670
  */
2572
2671
  'type': string;
2672
+ /**
2673
+ *
2674
+ * @type {string}
2675
+ * @memberof HauteNaomiV1Response
2676
+ */
2677
+ 'price'?: string;
2573
2678
  /**
2574
2679
  *
2575
2680
  * @type {string}
@@ -2788,6 +2893,12 @@ export interface ImagineKateV1Response {
2788
2893
  * @memberof ImagineKateV1Response
2789
2894
  */
2790
2895
  'type': string;
2896
+ /**
2897
+ *
2898
+ * @type {string}
2899
+ * @memberof ImagineKateV1Response
2900
+ */
2901
+ 'price'?: string;
2791
2902
  /**
2792
2903
  *
2793
2904
  * @type {string}
@@ -2897,6 +3008,12 @@ export interface InpaintKateV1Response {
2897
3008
  * @memberof InpaintKateV1Response
2898
3009
  */
2899
3010
  'type': string;
3011
+ /**
3012
+ *
3013
+ * @type {string}
3014
+ * @memberof InpaintKateV1Response
3015
+ */
3016
+ 'price'?: string;
2900
3017
  /**
2901
3018
  *
2902
3019
  * @type {string}
@@ -3453,10 +3570,23 @@ export interface ListPipelinesDto {
3453
3570
  'data': Array<PipelinePreviewDto>;
3454
3571
  /**
3455
3572
  *
3456
- * @type {ListAccountsDtoPageInfo}
3573
+ * @type {ListPipelinesDtoPageInfo}
3457
3574
  * @memberof ListPipelinesDto
3458
3575
  */
3459
- 'pageInfo': ListAccountsDtoPageInfo;
3576
+ 'pageInfo': ListPipelinesDtoPageInfo;
3577
+ }
3578
+ /**
3579
+ *
3580
+ * @export
3581
+ * @interface ListPipelinesDtoPageInfo
3582
+ */
3583
+ export interface ListPipelinesDtoPageInfo {
3584
+ /**
3585
+ *
3586
+ * @type {string}
3587
+ * @memberof ListPipelinesDtoPageInfo
3588
+ */
3589
+ 'nextCursor'?: string;
3460
3590
  }
3461
3591
  /**
3462
3592
  *
@@ -3632,6 +3762,12 @@ export interface MathV1Response {
3632
3762
  * @memberof MathV1Response
3633
3763
  */
3634
3764
  'type': string;
3765
+ /**
3766
+ *
3767
+ * @type {string}
3768
+ * @memberof MathV1Response
3769
+ */
3770
+ 'price'?: string;
3635
3771
  /**
3636
3772
  *
3637
3773
  * @type {string}
@@ -3873,6 +4009,12 @@ export interface NegateImageV1Response {
3873
4009
  * @memberof NegateImageV1Response
3874
4010
  */
3875
4011
  'type': string;
4012
+ /**
4013
+ *
4014
+ * @type {string}
4015
+ * @memberof NegateImageV1Response
4016
+ */
4017
+ 'price'?: string;
3876
4018
  /**
3877
4019
  *
3878
4020
  * @type {string}
@@ -3994,6 +4136,12 @@ export interface NoiseV1Response {
3994
4136
  * @memberof NoiseV1Response
3995
4137
  */
3996
4138
  'type': string;
4139
+ /**
4140
+ *
4141
+ * @type {string}
4142
+ * @memberof NoiseV1Response
4143
+ */
4144
+ 'price'?: string;
3997
4145
  /**
3998
4146
  *
3999
4147
  * @type {string}
@@ -4109,6 +4257,12 @@ export interface ObjectDetectionV1Response {
4109
4257
  * @memberof ObjectDetectionV1Response
4110
4258
  */
4111
4259
  'type': string;
4260
+ /**
4261
+ *
4262
+ * @type {string}
4263
+ * @memberof ObjectDetectionV1Response
4264
+ */
4265
+ 'price'?: string;
4112
4266
  /**
4113
4267
  *
4114
4268
  * @type {string}
@@ -4186,6 +4340,12 @@ export interface OperationEntity {
4186
4340
  * @memberof OperationEntity
4187
4341
  */
4188
4342
  'type': string;
4343
+ /**
4344
+ *
4345
+ * @type {string}
4346
+ * @memberof OperationEntity
4347
+ */
4348
+ 'price'?: string;
4189
4349
  /**
4190
4350
  *
4191
4351
  * @type {string}
@@ -4662,6 +4822,12 @@ export interface PoseEstimationV1Response {
4662
4822
  * @memberof PoseEstimationV1Response
4663
4823
  */
4664
4824
  'type': string;
4825
+ /**
4826
+ *
4827
+ * @type {string}
4828
+ * @memberof PoseEstimationV1Response
4829
+ */
4830
+ 'price'?: string;
4665
4831
  /**
4666
4832
  *
4667
4833
  * @type {string}
@@ -4890,6 +5056,12 @@ export interface ResizeV1Response {
4890
5056
  * @memberof ResizeV1Response
4891
5057
  */
4892
5058
  'type': string;
5059
+ /**
5060
+ *
5061
+ * @type {string}
5062
+ * @memberof ResizeV1Response
5063
+ */
5064
+ 'price'?: string;
4893
5065
  /**
4894
5066
  *
4895
5067
  * @type {string}
@@ -5115,6 +5287,12 @@ export interface SegmentAnythingEmbeddingsV1Response {
5115
5287
  * @memberof SegmentAnythingEmbeddingsV1Response
5116
5288
  */
5117
5289
  'type': string;
5290
+ /**
5291
+ *
5292
+ * @type {string}
5293
+ * @memberof SegmentAnythingEmbeddingsV1Response
5294
+ */
5295
+ 'price'?: string;
5118
5296
  /**
5119
5297
  *
5120
5298
  * @type {string}
@@ -5242,6 +5420,12 @@ export interface SegmentAnythingMaskV1Response {
5242
5420
  * @memberof SegmentAnythingMaskV1Response
5243
5421
  */
5244
5422
  'type': string;
5423
+ /**
5424
+ *
5425
+ * @type {string}
5426
+ * @memberof SegmentAnythingMaskV1Response
5427
+ */
5428
+ 'price'?: string;
5245
5429
  /**
5246
5430
  *
5247
5431
  * @type {string}
@@ -5525,6 +5709,12 @@ export interface StringsTemplateV1Response {
5525
5709
  * @memberof StringsTemplateV1Response
5526
5710
  */
5527
5711
  'type': string;
5712
+ /**
5713
+ *
5714
+ * @type {string}
5715
+ * @memberof StringsTemplateV1Response
5716
+ */
5717
+ 'price'?: string;
5528
5718
  /**
5529
5719
  *
5530
5720
  * @type {string}
@@ -5601,7 +5791,7 @@ export interface TaskDto {
5601
5791
  * @type {string}
5602
5792
  * @memberof TaskDto
5603
5793
  */
5604
- 'price': string;
5794
+ 'estimatedPrice': string;
5605
5795
  }
5606
5796
  /**
5607
5797
  *
@@ -5677,6 +5867,12 @@ export interface TranslateV1Response {
5677
5867
  * @memberof TranslateV1Response
5678
5868
  */
5679
5869
  'type': string;
5870
+ /**
5871
+ *
5872
+ * @type {string}
5873
+ * @memberof TranslateV1Response
5874
+ */
5875
+ 'price'?: string;
5680
5876
  /**
5681
5877
  *
5682
5878
  * @type {string}
@@ -5837,6 +6033,12 @@ export interface UpscaleV1Response {
5837
6033
  * @memberof UpscaleV1Response
5838
6034
  */
5839
6035
  'type': string;
6036
+ /**
6037
+ *
6038
+ * @type {string}
6039
+ * @memberof UpscaleV1Response
6040
+ */
6041
+ 'price'?: string;
5840
6042
  /**
5841
6043
  *
5842
6044
  * @type {string}
@@ -6061,6 +6263,12 @@ export interface VtonGiseleV1Response {
6061
6263
  * @memberof VtonGiseleV1Response
6062
6264
  */
6063
6265
  'type': string;
6266
+ /**
6267
+ *
6268
+ * @type {string}
6269
+ * @memberof VtonGiseleV1Response
6270
+ */
6271
+ 'price'?: string;
6064
6272
  /**
6065
6273
  *
6066
6274
  * @type {string}
@@ -134,9 +134,16 @@ export const GPTV1InputModelEnum = {
134
134
  export const GPTV2AssistantMessageDtoRoleEnum = {
135
135
  Assistant: 'assistant'
136
136
  };
137
+ export const GPTV2DeveloperMessageDtoRoleEnum = {
138
+ Developer: 'developer'
139
+ };
137
140
  export const GPTV2InputModelEnum = {
138
- _4o: 'gpt-4o',
139
- _41Mini: 'gpt-4.1-mini'
141
+ Gpt4o: 'gpt-4o',
142
+ O3: 'o3',
143
+ O3Mini: 'o3-mini',
144
+ Gpt41: 'gpt-4.1',
145
+ Gpt41Mini: 'gpt-4.1-mini',
146
+ Gpt41Nano: 'gpt-4.1-nano'
140
147
  };
141
148
  export const GPTV2MessageToolCallDtoTypeEnum = {
142
149
  Function: 'function'
@@ -2,6 +2,6 @@ import { ListResponse } from '../types';
2
2
  export declare const transformToListResponse: <T>(response: {
3
3
  data: T[];
4
4
  pageInfo: {
5
- nextCursor: string;
5
+ nextCursor?: string;
6
6
  };
7
7
  }) => ListResponse<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hautechai/sdk",
3
- "version": "0.3.46",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -18,6 +18,7 @@
18
18
  "devDependencies": {
19
19
  "@jest/globals": "^29.7.0",
20
20
  "@openapitools/openapi-generator-cli": "2.15.3",
21
+ "@semantic-release/commit-analyzer": "^13.0.1",
21
22
  "@types/jest": "29.5.12",
22
23
  "@types/jsonwebtoken": "9.0.7",
23
24
  "@types/node": "22.5.2",
@@ -27,6 +28,7 @@
27
28
  "jest": "29.7.0",
28
29
  "jest-environment-jsdom": "29.7.0",
29
30
  "prettier": "^3.5.1",
31
+ "semantic-release": "^24.2.7",
30
32
  "ts-jest": "29.2.5",
31
33
  "ts-node": "10.9.2",
32
34
  "tslib": "2.7.0",
@@ -37,6 +39,7 @@
37
39
  "generate": "./scripts/generate.sh",
38
40
  "lint": "nx run-many --all --target=lint",
39
41
  "lint:fix": "nx run-many --all --target=lint --fix",
40
- "test": "jest"
42
+ "test": "jest",
43
+ "up-versions": "./scripts/up-versions.sh"
41
44
  }
42
45
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @type {import('semantic-release').GlobalConfig}
3
+ */
4
+ module.exports = {
5
+ branches: ['main'],
6
+ plugins: [
7
+ [
8
+ '@semantic-release/commit-analyzer',
9
+ {
10
+ preset: 'angular',
11
+ releaseRules: [
12
+ {
13
+ type: 'docs',
14
+ release: 'patch',
15
+ },
16
+ {
17
+ type: 'feat',
18
+ release: 'minor',
19
+ },
20
+ {
21
+ type: 'chore',
22
+ release: 'patch',
23
+ },
24
+ {
25
+ message: '**',
26
+ release: 'patch',
27
+ },
28
+ ],
29
+ parserOpts: {
30
+ noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
31
+ },
32
+ },
33
+ ],
34
+ ],
35
+ };
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ pnpm semantic-release -t "${TAG_PREFIX}/${APP_NAME}@\${version}" --no-ci
@@ -1,38 +0,0 @@
1
- name: Publish Package to npmjs
2
- on:
3
- release:
4
- types: [published]
5
- jobs:
6
- build-and-publish:
7
- runs-on: ubuntu-latest
8
- permissions:
9
- contents: read
10
- id-token: write
11
- environment: main
12
- steps:
13
- - name: Checkout
14
- uses: actions/checkout@v4
15
-
16
- - name: Install pnpm
17
- uses: pnpm/action-setup@v4
18
-
19
- - name: Use Node LTS
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: '20.x'
23
- registry-url: 'https://registry.npmjs.org'
24
- cache: pnpm
25
-
26
- - name: Install dependencies
27
- run: pnpm install --frozen-lockfile
28
-
29
- - name: Bump version
30
- run: pnpm version from-git --no-commit-hooks --no-git-tag-version --allow-same-version
31
-
32
- - name: Build the package
33
- run: pnpm build
34
-
35
- - name: Publish the package
36
- run: pnpm publish --no-git-checks --access public
37
- env:
38
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,38 +0,0 @@
1
- name: Test
2
- on:
3
- push:
4
- branches:
5
- - 'main'
6
- jobs:
7
- test:
8
- runs-on: ubuntu-latest
9
- permissions:
10
- contents: read
11
- id-token: write
12
- environment: main
13
- steps:
14
- - name: Checkout
15
- uses: actions/checkout@v4
16
-
17
- - name: Install pnpm
18
- uses: pnpm/action-setup@v4
19
-
20
-
21
- - name: Use Node LTS
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version: '20.x'
25
- registry-url: 'https://registry.npmjs.org'
26
- cache: pnpm
27
-
28
- - name: Install dependencies
29
- run: pnpm install --frozen-lockfile
30
-
31
- - name: Test
32
- run: pnpm test
33
- env:
34
- API_CORE_URL: https://api.dev.hautech.ai
35
- APP_ID: ${{ secrets.APP_ID }}
36
- APP_KEY_ID: ${{ secrets.APP_KEY_ID }}
37
- APP_KEY_SECRET: ${{ secrets.APP_KEY_SECRET }}
38
- SDK_TOKEN: ${{ secrets.SDK_TOKEN }}