@soltech/fluid-common 1.4.5 → 1.4.6
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/AGENTS.md +58 -3
- package/CLAUDE.md +3 -58
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/.claude/settings.local.json +0 -7
package/AGENTS.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
|
-
# AGENTS.md
|
|
1
|
+
# AGENTS.md – Instructions for AI Coding Agents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Read this entire file before every task.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Agent Rules & Safety
|
|
6
|
+
- Never edit any files when the current git branch is `main` — always work on a feature branch. Run `git branch --show-current` to confirm before making any changes.
|
|
7
|
+
- Never touch `.env*`, `certs/` or any file containing secrets/credentials.
|
|
8
|
+
- Never introduce new dependencies without asking first.
|
|
9
|
+
- Never rewrite large parts of the codebase unless explicitly requested.
|
|
10
|
+
- Always propose changes as diffs or small file edits and get approval before applying.
|
|
11
|
+
- If unsure about architecture, style, or impact, ask before coding.
|
|
12
|
+
|
|
13
|
+
## Project Overview & Architecture
|
|
14
|
+
- TypeScript-only package containing shared interfaces and enums used by both `fluid-widget` (frontend) and `fluid-api` (API/middleware).
|
|
15
|
+
- Source of truth is `src/index.ts`.
|
|
16
|
+
- Build output is generated in `lib/` and must not be edited by hand.
|
|
17
|
+
|
|
18
|
+
## Build, Dev & Validation
|
|
19
|
+
- Build: `npm run build`
|
|
20
|
+
- Lint: `npm run lint`
|
|
21
|
+
- Publish: see Publishing Flow below
|
|
22
|
+
|
|
23
|
+
### Publishing Flow
|
|
24
|
+
The correct sequence before publishing a new version:
|
|
25
|
+
1. Make all code changes to `src/index.ts`.
|
|
26
|
+
2. Bump `version` in `package.json`.
|
|
27
|
+
3. Run `npm i` (updates `package-lock.json`).
|
|
28
|
+
4. Commit all changes (`src/index.ts`, `package.json`, `package-lock.json`).
|
|
29
|
+
5. Push the commit: `git push`.
|
|
30
|
+
6. Publish to npm: `npm publish` (this runs `npm run build` first via the `pub` script, or run `npm run build && npm publish` directly).
|
|
31
|
+
|
|
32
|
+
Do **not** use `npm run pub` as a single command — it pushes *after* publishing, which means npm gets the package before git has a clean commit.
|
|
33
|
+
|
|
34
|
+
Before final proposal on code changes:
|
|
35
|
+
1. Run `npm run lint`.
|
|
36
|
+
2. Run `npm run build`.
|
|
37
|
+
3. If you did not run them, say so.
|
|
38
|
+
|
|
39
|
+
## Coding Style & Conventions
|
|
40
|
+
- Follow `.editorconfig` (tabs, max line length 140).
|
|
41
|
+
- Follow ESLint config `@soltech`.
|
|
42
|
+
|
|
43
|
+
## Testing
|
|
44
|
+
- There is no testing in this repo.
|
|
45
|
+
|
|
46
|
+
## Versioning
|
|
47
|
+
- When changes are meant for release, bump `package.json` version per README guidance.
|
|
48
|
+
|
|
49
|
+
## Pull Requests
|
|
50
|
+
|
|
51
|
+
When creating PRs, always include a Shortcut ticket reference in the PR body using the `[sc-NNNNN]` format so it automatically links to the ticket:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
[sc-17649](https://app.shortcut.com/soltech/story/17649/ticket-title-slug)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### PR description scope
|
|
58
|
+
|
|
59
|
+
- The PR description must reflect **all changes in the branch**, not just the most recent commit. Run `git log main..HEAD` and review the full diff before writing or updating the description.
|
|
60
|
+
- When a ticket spans multiple repos (e.g. a type/enum change here in `fluid-common` that also requires updates in `fluid-api`, `fluid-widget`, or `fluid-payments`), list the related repos and their PRs in the description so reviewers have the full picture. Name each repo, briefly describe what changed, and cross-link the corresponding PRs.
|
package/CLAUDE.md
CHANGED
|
@@ -1,60 +1,5 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
1
|
+
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Primary instruction
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- Never edit any files when the current git branch is `main` — always work on a feature branch. Run `git branch --show-current` to confirm before making any changes.
|
|
7
|
-
- Never touch `.env*`, `certs/` or any file containing secrets/credentials.
|
|
8
|
-
- Never introduce new dependencies without asking first.
|
|
9
|
-
- Never rewrite large parts of the codebase unless explicitly requested.
|
|
10
|
-
- Always propose changes as diffs or small file edits and get approval before applying.
|
|
11
|
-
- If unsure about architecture, style, or impact, ask before coding.
|
|
12
|
-
|
|
13
|
-
## Project Overview & Architecture
|
|
14
|
-
- TypeScript-only package containing shared interfaces and enums used by both `fluid-widget` (frontend) and `fluid-api` (API/middleware).
|
|
15
|
-
- Source of truth is `src/index.ts`.
|
|
16
|
-
- Build output is generated in `lib/` and must not be edited by hand.
|
|
17
|
-
|
|
18
|
-
## Build, Dev & Validation
|
|
19
|
-
- Build: `npm run build`
|
|
20
|
-
- Lint: `npm run lint`
|
|
21
|
-
- Publish: see Publishing Flow below
|
|
22
|
-
|
|
23
|
-
### Publishing Flow
|
|
24
|
-
The correct sequence before publishing a new version:
|
|
25
|
-
1. Make all code changes to `src/index.ts`.
|
|
26
|
-
2. Bump `version` in `package.json`.
|
|
27
|
-
3. Run `npm i` (updates `package-lock.json`).
|
|
28
|
-
4. Commit all changes (`src/index.ts`, `package.json`, `package-lock.json`).
|
|
29
|
-
5. Push the commit: `git push`.
|
|
30
|
-
6. Publish to npm: `npm publish` (this runs `npm run build` first via the `pub` script, or run `npm run build && npm publish` directly).
|
|
31
|
-
|
|
32
|
-
Do **not** use `npm run pub` as a single command — it pushes *after* publishing, which means npm gets the package before git has a clean commit.
|
|
33
|
-
|
|
34
|
-
Before final proposal on code changes:
|
|
35
|
-
1. Run `npm run lint`.
|
|
36
|
-
2. Run `npm run build`.
|
|
37
|
-
3. If you did not run them, say so.
|
|
38
|
-
|
|
39
|
-
## Coding Style & Conventions
|
|
40
|
-
- Follow `.editorconfig` (tabs, max line length 140).
|
|
41
|
-
- Follow ESLint config `@soltech`.
|
|
42
|
-
|
|
43
|
-
## Testing
|
|
44
|
-
- There is no testing in this repo.
|
|
45
|
-
|
|
46
|
-
## Versioning
|
|
47
|
-
- When changes are meant for release, bump `package.json` version per README guidance.
|
|
48
|
-
|
|
49
|
-
## Pull Requests
|
|
50
|
-
|
|
51
|
-
When creating PRs, always include a Shortcut ticket reference in the PR body using the `[sc-NNNNN]` format so it automatically links to the ticket:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
[sc-17649](https://app.shortcut.com/soltech/story/17649/ticket-title-slug)
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### PR description scope
|
|
58
|
-
|
|
59
|
-
- The PR description must reflect **all changes in the branch**, not just the most recent commit. Run `git log main..HEAD` and review the full diff before writing or updating the description.
|
|
60
|
-
- When a ticket spans multiple repos (e.g. a type/enum change here in `fluid-common` that also requires updates in `fluid-api`, `fluid-widget`, or `fluid-payments`), list the related repos and their PRs in the description so reviewers have the full picture. Name each repo, briefly describe what changed, and cross-link the corresponding PRs.
|
|
5
|
+
This repository’s canonical agent instructions live in `AGENTS.md`.
|
package/lib/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare enum TraitType {
|
|
|
15
15
|
SOUND = "SOUND"
|
|
16
16
|
}
|
|
17
17
|
export declare enum PaymentType {
|
|
18
|
+
APPLE_PAY = "ApplePay",
|
|
18
19
|
BANK_TRANSFER = "BankTransfer",
|
|
19
20
|
CREDIT_CARD = "CreditCard",
|
|
20
21
|
CRYPTO = "Crypto",
|
|
@@ -73,7 +74,6 @@ export interface WalletConfig {
|
|
|
73
74
|
};
|
|
74
75
|
withdrawalInFiatCurrency: boolean;
|
|
75
76
|
banner?: Banner;
|
|
76
|
-
manualBonusCodesEnabled?: boolean;
|
|
77
77
|
}
|
|
78
78
|
export interface Promotion {
|
|
79
79
|
title: string;
|
package/lib/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export var TraitType;
|
|
|
19
19
|
})(TraitType || (TraitType = {}));
|
|
20
20
|
export var PaymentType;
|
|
21
21
|
(function (PaymentType) {
|
|
22
|
+
PaymentType["APPLE_PAY"] = "ApplePay";
|
|
22
23
|
PaymentType["BANK_TRANSFER"] = "BankTransfer";
|
|
23
24
|
PaymentType["CREDIT_CARD"] = "CreditCard";
|
|
24
25
|
PaymentType["CRYPTO"] = "Crypto";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export enum TraitType {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export enum PaymentType {
|
|
21
|
+
APPLE_PAY = 'ApplePay',
|
|
21
22
|
BANK_TRANSFER = 'BankTransfer',
|
|
22
23
|
CREDIT_CARD = 'CreditCard',
|
|
23
24
|
CRYPTO = 'Crypto',
|
|
@@ -81,7 +82,6 @@ export interface WalletConfig {
|
|
|
81
82
|
},
|
|
82
83
|
withdrawalInFiatCurrency: boolean;
|
|
83
84
|
banner?: Banner;
|
|
84
|
-
manualBonusCodesEnabled?: boolean;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export interface Promotion {
|