@forwardslashns/taskit-validation-messages 1.3.7 → 1.3.9

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.
@@ -133,5 +133,68 @@ export declare const CLIENT_RELATIONSHIPS: {
133
133
  readonly message: "The total capital percentage for this timeframe exceeds 100%. Please adjust the shareholder percentages to total no more than 100% for all shareholders in this timeframe.";
134
134
  readonly affectedFields: readonly ["capital", "startingDate", "endingDate"];
135
135
  };
136
+ readonly SHAREHOLDER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
137
+ readonly message: "A shareholder relationship that does not issue a K1 must have a 0% profit percentage. Please update the profit percentage, or change Issues K1 to 'Yes'.";
138
+ readonly affectedFields: readonly ["profit", "k1Applicable"];
139
+ };
140
+ readonly SHAREHOLDER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
141
+ readonly message: "A shareholder relationship that does not issue a K1 must have a 0% loss percentage. Please update the loss percentage, or change Issues K1 to 'Yes'.";
142
+ readonly affectedFields: readonly ["loss", "k1Applicable"];
143
+ };
144
+ readonly SHAREHOLDER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
145
+ readonly message: "A shareholder relationship that does not issue a K1 must have a 0% capital percentage. Please update the capital percentage, or change Issues K1 to 'Yes'.";
146
+ readonly affectedFields: readonly ["capital", "k1Applicable"];
147
+ };
148
+ readonly SUBSIDIARY_PROFIT_PERCENTAGE_MUST_BE_100: {
149
+ readonly message: "A subsidiary must allocate 100% profit to its parent. Please update the percentage to 100% or change the relationship type.";
150
+ readonly affectedFields: readonly ["profit", "relationshipTypeId"];
151
+ };
152
+ readonly SUBSIDIARY_LOSS_PERCENTAGE_MUST_BE_100: {
153
+ readonly message: "A subsidiary must allocate 100% loss to its parent. Please update the percentage to 100% or change the relationship type.";
154
+ readonly affectedFields: readonly ["loss", "relationshipTypeId"];
155
+ };
156
+ readonly SUBSIDIARY_CAPITAL_PERCENTAGE_MUST_BE_100: {
157
+ readonly message: "A subsidiary must allocate 100% capital to its parent. Please update the percentage to 100% or change the relationship type.";
158
+ readonly affectedFields: readonly ["capital", "relationshipTypeId"];
159
+ };
160
+ readonly K1_ISSUER_PROFIT_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
161
+ readonly message: "A K1 issuer must allocate a profit percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.";
162
+ readonly affectedFields: readonly ["profit", "k1Applicable"];
163
+ };
164
+ readonly K1_ISSUER_LOSS_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
165
+ readonly message: "A K1 issuer must allocate a loss percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.";
166
+ readonly affectedFields: readonly ["loss", "k1Applicable"];
167
+ };
168
+ readonly K1_ISSUER_CAPITAL_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
169
+ readonly message: "A K1 issuer must allocate a capital percentage greater than 0%. Please enter a capital percentage, or change Receives K1 to 'No'.";
170
+ readonly affectedFields: readonly ["capital", "k1Applicable"];
171
+ };
172
+ readonly K1_ISSUER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
173
+ readonly message: "A K1 issuer that does not issue a K1 cannot allocate a profit percentage. Please update the profit percentage to 0%, or change Receives K1 to 'Yes'.";
174
+ readonly affectedFields: readonly ["profit", "k1Applicable"];
175
+ };
176
+ readonly K1_ISSUER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
177
+ readonly message: "A K1 issuer that does not issue a K1 cannot allocate a loss percentage. Please update the loss percentage to 0%, or change Receives K1 to 'Yes'.";
178
+ readonly affectedFields: readonly ["loss", "k1Applicable"];
179
+ };
180
+ readonly K1_ISSUER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
181
+ readonly message: "A K1 issuer that does not issue a K1 cannot allocate a capital percentage. Please update the capital percentage to 0%, or change Receives K1 to 'Yes'.";
182
+ readonly affectedFields: readonly ["capital", "k1Applicable"];
183
+ };
184
+ readonly INCOME_SOURCE_TOTAL_PROFIT_PERCENTAGE_EXCEEDS_100: {
185
+ readonly message: "The ownership percentages for {relatedClient}'s profit exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.";
186
+ readonly params: readonly ["relatedClient"];
187
+ readonly affectedFields: readonly ["profit", "startingDate", "endingDate"];
188
+ };
189
+ readonly INCOME_SOURCE_TOTAL_LOSS_PERCENTAGE_EXCEEDS_100: {
190
+ readonly message: "The ownership percentages for {relatedClient}'s loss exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.";
191
+ readonly params: readonly ["relatedClient"];
192
+ readonly affectedFields: readonly ["loss", "startingDate", "endingDate"];
193
+ };
194
+ readonly INCOME_SOURCE_TOTAL_CAPITAL_PERCENTAGE_EXCEEDS_100: {
195
+ readonly message: "The ownership percentages for {relatedClient}'s capital exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.";
196
+ readonly params: readonly ["relatedClient"];
197
+ readonly affectedFields: readonly ["capital", "startingDate", "endingDate"];
198
+ };
136
199
  };
137
200
  //# sourceMappingURL=client-relationships.validation-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-relationships.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/client-relationships.validation-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuIvB,CAAC"}
1
+ {"version":3,"file":"client-relationships.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/client-relationships.validation-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsMvB,CAAC"}
@@ -136,4 +136,67 @@ exports.CLIENT_RELATIONSHIPS = {
136
136
  message: `The total capital percentage for this timeframe exceeds 100%. Please adjust the shareholder percentages to total no more than 100% for all shareholders in this timeframe.`,
137
137
  affectedFields: ['capital', 'startingDate', 'endingDate'],
138
138
  },
139
+ SHAREHOLDER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
140
+ message: `A shareholder relationship that does not issue a K1 must have a 0% profit percentage. Please update the profit percentage, or change Issues K1 to 'Yes'.`,
141
+ affectedFields: ['profit', 'k1Applicable'],
142
+ },
143
+ SHAREHOLDER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
144
+ message: `A shareholder relationship that does not issue a K1 must have a 0% loss percentage. Please update the loss percentage, or change Issues K1 to 'Yes'.`,
145
+ affectedFields: ['loss', 'k1Applicable'],
146
+ },
147
+ SHAREHOLDER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
148
+ message: `A shareholder relationship that does not issue a K1 must have a 0% capital percentage. Please update the capital percentage, or change Issues K1 to 'Yes'.`,
149
+ affectedFields: ['capital', 'k1Applicable'],
150
+ },
151
+ SUBSIDIARY_PROFIT_PERCENTAGE_MUST_BE_100: {
152
+ message: `A subsidiary must allocate 100% profit to its parent. Please update the percentage to 100% or change the relationship type.`,
153
+ affectedFields: ['profit', 'relationshipTypeId'],
154
+ },
155
+ SUBSIDIARY_LOSS_PERCENTAGE_MUST_BE_100: {
156
+ message: `A subsidiary must allocate 100% loss to its parent. Please update the percentage to 100% or change the relationship type.`,
157
+ affectedFields: ['loss', 'relationshipTypeId'],
158
+ },
159
+ SUBSIDIARY_CAPITAL_PERCENTAGE_MUST_BE_100: {
160
+ message: `A subsidiary must allocate 100% capital to its parent. Please update the percentage to 100% or change the relationship type.`,
161
+ affectedFields: ['capital', 'relationshipTypeId'],
162
+ },
163
+ K1_ISSUER_PROFIT_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
164
+ message: `A K1 issuer must allocate a profit percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.`,
165
+ affectedFields: ['profit', 'k1Applicable'],
166
+ },
167
+ K1_ISSUER_LOSS_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
168
+ message: `A K1 issuer must allocate a loss percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.`,
169
+ affectedFields: ['loss', 'k1Applicable'],
170
+ },
171
+ K1_ISSUER_CAPITAL_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
172
+ message: `A K1 issuer must allocate a capital percentage greater than 0%. Please enter a capital percentage, or change Receives K1 to 'No'.`,
173
+ affectedFields: ['capital', 'k1Applicable'],
174
+ },
175
+ K1_ISSUER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
176
+ message: `A K1 issuer that does not issue a K1 cannot allocate a profit percentage. Please update the profit percentage to 0%, or change Receives K1 to 'Yes'.`,
177
+ affectedFields: ['profit', 'k1Applicable'],
178
+ },
179
+ K1_ISSUER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
180
+ message: `A K1 issuer that does not issue a K1 cannot allocate a loss percentage. Please update the loss percentage to 0%, or change Receives K1 to 'Yes'.`,
181
+ affectedFields: ['loss', 'k1Applicable'],
182
+ },
183
+ K1_ISSUER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
184
+ message: `A K1 issuer that does not issue a K1 cannot allocate a capital percentage. Please update the capital percentage to 0%, or change Receives K1 to 'Yes'.`,
185
+ affectedFields: ['capital', 'k1Applicable'],
186
+ },
187
+ INCOME_SOURCE_TOTAL_PROFIT_PERCENTAGE_EXCEEDS_100: {
188
+ message: `The ownership percentages for {relatedClient}'s profit exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
189
+ params: ['relatedClient'],
190
+ affectedFields: ['profit', 'startingDate', 'endingDate'],
191
+ },
192
+ INCOME_SOURCE_TOTAL_LOSS_PERCENTAGE_EXCEEDS_100: {
193
+ message: `The ownership percentages for {relatedClient}'s loss exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
194
+ params: ['relatedClient'],
195
+ affectedFields: ['loss', 'startingDate', 'endingDate'],
196
+ },
197
+ INCOME_SOURCE_TOTAL_CAPITAL_PERCENTAGE_EXCEEDS_100: {
198
+ message: `The ownership percentages for {relatedClient}'s capital exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
199
+ params: ['relatedClient'],
200
+ affectedFields: ['capital', 'startingDate', 'endingDate'],
201
+ },
139
202
  };
@@ -741,6 +741,69 @@ export declare const VALIDATION_MESSAGES: {
741
741
  readonly message: "The total capital percentage for this timeframe exceeds 100%. Please adjust the shareholder percentages to total no more than 100% for all shareholders in this timeframe.";
742
742
  readonly affectedFields: readonly ["capital", "startingDate", "endingDate"];
743
743
  };
744
+ readonly SHAREHOLDER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
745
+ readonly message: "A shareholder relationship that does not issue a K1 must have a 0% profit percentage. Please update the profit percentage, or change Issues K1 to 'Yes'.";
746
+ readonly affectedFields: readonly ["profit", "k1Applicable"];
747
+ };
748
+ readonly SHAREHOLDER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
749
+ readonly message: "A shareholder relationship that does not issue a K1 must have a 0% loss percentage. Please update the loss percentage, or change Issues K1 to 'Yes'.";
750
+ readonly affectedFields: readonly ["loss", "k1Applicable"];
751
+ };
752
+ readonly SHAREHOLDER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
753
+ readonly message: "A shareholder relationship that does not issue a K1 must have a 0% capital percentage. Please update the capital percentage, or change Issues K1 to 'Yes'.";
754
+ readonly affectedFields: readonly ["capital", "k1Applicable"];
755
+ };
756
+ readonly SUBSIDIARY_PROFIT_PERCENTAGE_MUST_BE_100: {
757
+ readonly message: "A subsidiary must allocate 100% profit to its parent. Please update the percentage to 100% or change the relationship type.";
758
+ readonly affectedFields: readonly ["profit", "relationshipTypeId"];
759
+ };
760
+ readonly SUBSIDIARY_LOSS_PERCENTAGE_MUST_BE_100: {
761
+ readonly message: "A subsidiary must allocate 100% loss to its parent. Please update the percentage to 100% or change the relationship type.";
762
+ readonly affectedFields: readonly ["loss", "relationshipTypeId"];
763
+ };
764
+ readonly SUBSIDIARY_CAPITAL_PERCENTAGE_MUST_BE_100: {
765
+ readonly message: "A subsidiary must allocate 100% capital to its parent. Please update the percentage to 100% or change the relationship type.";
766
+ readonly affectedFields: readonly ["capital", "relationshipTypeId"];
767
+ };
768
+ readonly K1_ISSUER_PROFIT_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
769
+ readonly message: "A K1 issuer must allocate a profit percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.";
770
+ readonly affectedFields: readonly ["profit", "k1Applicable"];
771
+ };
772
+ readonly K1_ISSUER_LOSS_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
773
+ readonly message: "A K1 issuer must allocate a loss percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.";
774
+ readonly affectedFields: readonly ["loss", "k1Applicable"];
775
+ };
776
+ readonly K1_ISSUER_CAPITAL_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
777
+ readonly message: "A K1 issuer must allocate a capital percentage greater than 0%. Please enter a capital percentage, or change Receives K1 to 'No'.";
778
+ readonly affectedFields: readonly ["capital", "k1Applicable"];
779
+ };
780
+ readonly K1_ISSUER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
781
+ readonly message: "A K1 issuer that does not issue a K1 cannot allocate a profit percentage. Please update the profit percentage to 0%, or change Receives K1 to 'Yes'.";
782
+ readonly affectedFields: readonly ["profit", "k1Applicable"];
783
+ };
784
+ readonly K1_ISSUER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
785
+ readonly message: "A K1 issuer that does not issue a K1 cannot allocate a loss percentage. Please update the loss percentage to 0%, or change Receives K1 to 'Yes'.";
786
+ readonly affectedFields: readonly ["loss", "k1Applicable"];
787
+ };
788
+ readonly K1_ISSUER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
789
+ readonly message: "A K1 issuer that does not issue a K1 cannot allocate a capital percentage. Please update the capital percentage to 0%, or change Receives K1 to 'Yes'.";
790
+ readonly affectedFields: readonly ["capital", "k1Applicable"];
791
+ };
792
+ readonly INCOME_SOURCE_TOTAL_PROFIT_PERCENTAGE_EXCEEDS_100: {
793
+ readonly message: "The ownership percentages for {relatedClient}'s profit exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.";
794
+ readonly params: readonly ["relatedClient"];
795
+ readonly affectedFields: readonly ["profit", "startingDate", "endingDate"];
796
+ };
797
+ readonly INCOME_SOURCE_TOTAL_LOSS_PERCENTAGE_EXCEEDS_100: {
798
+ readonly message: "The ownership percentages for {relatedClient}'s loss exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.";
799
+ readonly params: readonly ["relatedClient"];
800
+ readonly affectedFields: readonly ["loss", "startingDate", "endingDate"];
801
+ };
802
+ readonly INCOME_SOURCE_TOTAL_CAPITAL_PERCENTAGE_EXCEEDS_100: {
803
+ readonly message: "The ownership percentages for {relatedClient}'s capital exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.";
804
+ readonly params: readonly ["relatedClient"];
805
+ readonly affectedFields: readonly ["capital", "startingDate", "endingDate"];
806
+ };
744
807
  };
745
808
  readonly FILING_CATEGORIES: {
746
809
  readonly INVALID_REQUEST: {
@@ -1 +1 @@
1
- {"version":3,"file":"validation-messages.d.ts","sourceRoot":"","sources":["../../src/validation/validation-messages.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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  {
2
2
  "name": "@forwardslashns/taskit-validation-messages",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -30,6 +30,6 @@
30
30
  "scripts": {
31
31
  "build": "rimraf ./dist && tsc",
32
32
  "format:fix": "prettier --write --ignore-path .gitignore .",
33
- "publish:token": "powershell -ExecutionPolicy Bypass -File ./publish.ps1"
33
+ "publish:token": "node ./publish.js"
34
34
  }
35
35
  }
package/publish.js ADDED
@@ -0,0 +1,56 @@
1
+ const { execSync } = require('child_process');
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ const loadEnvironmentVariables = () => {
6
+ const envPath = path.resolve(__dirname, '.env');
7
+ if (fs.existsSync(envPath)) {
8
+ const envContent = fs.readFileSync(envPath, 'utf8');
9
+ envContent.split('\n').forEach((line) => {
10
+ const trimmed = line.trim();
11
+ if (trimmed && !trimmed.startsWith('#') && trimmed.includes('=')) {
12
+ const [key, ...values] = trimmed.split('=');
13
+ const val = values
14
+ .join('=')
15
+ .trim()
16
+ .replace(/^["']|["']$/g, '');
17
+ if (key && val) {
18
+ process.env[key.trim()] = val;
19
+ }
20
+ }
21
+ });
22
+ console.log('Environment variables loaded.');
23
+ } else {
24
+ console.log('No .env file found. Using system environment variables.');
25
+ }
26
+ };
27
+
28
+ const validateToken = () => {
29
+ if (!process.env.NPM_TOKEN) {
30
+ console.error('\x1b[31mError: NPM_TOKEN is missing.\x1b[0m');
31
+ process.exit(1);
32
+ }
33
+ console.log('NPM_TOKEN verified.');
34
+ };
35
+
36
+ const executePublish = () => {
37
+ try {
38
+ console.log('Starting publish process (skipping git checks)...');
39
+ execSync('pnpm publish --no-git-checks --ignore-scripts', {
40
+ stdio: 'inherit',
41
+ env: process.env,
42
+ cwd: __dirname,
43
+ });
44
+ } catch (error) {
45
+ console.error('\x1b[31mPublish process encountered an error.\x1b[0m');
46
+ process.exit(1);
47
+ }
48
+ };
49
+
50
+ const main = () => {
51
+ loadEnvironmentVariables();
52
+ validateToken();
53
+ executePublish();
54
+ };
55
+
56
+ main();
@@ -133,4 +133,67 @@ export const CLIENT_RELATIONSHIPS = {
133
133
  message: `The total capital percentage for this timeframe exceeds 100%. Please adjust the shareholder percentages to total no more than 100% for all shareholders in this timeframe.`,
134
134
  affectedFields: ['capital', 'startingDate', 'endingDate'],
135
135
  },
136
+ SHAREHOLDER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
137
+ message: `A shareholder relationship that does not issue a K1 must have a 0% profit percentage. Please update the profit percentage, or change Issues K1 to 'Yes'.`,
138
+ affectedFields: ['profit', 'k1Applicable'],
139
+ },
140
+ SHAREHOLDER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
141
+ message: `A shareholder relationship that does not issue a K1 must have a 0% loss percentage. Please update the loss percentage, or change Issues K1 to 'Yes'.`,
142
+ affectedFields: ['loss', 'k1Applicable'],
143
+ },
144
+ SHAREHOLDER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
145
+ message: `A shareholder relationship that does not issue a K1 must have a 0% capital percentage. Please update the capital percentage, or change Issues K1 to 'Yes'.`,
146
+ affectedFields: ['capital', 'k1Applicable'],
147
+ },
148
+ SUBSIDIARY_PROFIT_PERCENTAGE_MUST_BE_100: {
149
+ message: `A subsidiary must allocate 100% profit to its parent. Please update the percentage to 100% or change the relationship type.`,
150
+ affectedFields: ['profit', 'relationshipTypeId'],
151
+ },
152
+ SUBSIDIARY_LOSS_PERCENTAGE_MUST_BE_100: {
153
+ message: `A subsidiary must allocate 100% loss to its parent. Please update the percentage to 100% or change the relationship type.`,
154
+ affectedFields: ['loss', 'relationshipTypeId'],
155
+ },
156
+ SUBSIDIARY_CAPITAL_PERCENTAGE_MUST_BE_100: {
157
+ message: `A subsidiary must allocate 100% capital to its parent. Please update the percentage to 100% or change the relationship type.`,
158
+ affectedFields: ['capital', 'relationshipTypeId'],
159
+ },
160
+ K1_ISSUER_PROFIT_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
161
+ message: `A K1 issuer must allocate a profit percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.`,
162
+ affectedFields: ['profit', 'k1Applicable'],
163
+ },
164
+ K1_ISSUER_LOSS_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
165
+ message: `A K1 issuer must allocate a loss percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.`,
166
+ affectedFields: ['loss', 'k1Applicable'],
167
+ },
168
+ K1_ISSUER_CAPITAL_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
169
+ message: `A K1 issuer must allocate a capital percentage greater than 0%. Please enter a capital percentage, or change Receives K1 to 'No'.`,
170
+ affectedFields: ['capital', 'k1Applicable'],
171
+ },
172
+ K1_ISSUER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
173
+ message: `A K1 issuer that does not issue a K1 cannot allocate a profit percentage. Please update the profit percentage to 0%, or change Receives K1 to 'Yes'.`,
174
+ affectedFields: ['profit', 'k1Applicable'],
175
+ },
176
+ K1_ISSUER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
177
+ message: `A K1 issuer that does not issue a K1 cannot allocate a loss percentage. Please update the loss percentage to 0%, or change Receives K1 to 'Yes'.`,
178
+ affectedFields: ['loss', 'k1Applicable'],
179
+ },
180
+ K1_ISSUER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
181
+ message: `A K1 issuer that does not issue a K1 cannot allocate a capital percentage. Please update the capital percentage to 0%, or change Receives K1 to 'Yes'.`,
182
+ affectedFields: ['capital', 'k1Applicable'],
183
+ },
184
+ INCOME_SOURCE_TOTAL_PROFIT_PERCENTAGE_EXCEEDS_100: {
185
+ message: `The ownership percentages for {relatedClient}'s profit exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
186
+ params: ['relatedClient'],
187
+ affectedFields: ['profit', 'startingDate', 'endingDate'],
188
+ },
189
+ INCOME_SOURCE_TOTAL_LOSS_PERCENTAGE_EXCEEDS_100: {
190
+ message: `The ownership percentages for {relatedClient}'s loss exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
191
+ params: ['relatedClient'],
192
+ affectedFields: ['loss', 'startingDate', 'endingDate'],
193
+ },
194
+ INCOME_SOURCE_TOTAL_CAPITAL_PERCENTAGE_EXCEEDS_100: {
195
+ message: `The ownership percentages for {relatedClient}'s capital exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
196
+ params: ['relatedClient'],
197
+ affectedFields: ['capital', 'startingDate', 'endingDate'],
198
+ },
136
199
  } as const;
package/PUBLISHING.md DELETED
@@ -1,81 +0,0 @@
1
- # Publishing Guide
2
-
3
- ## Prerequisites
4
-
5
- You need a valid NPM access token with publish permissions for the `@forwardslashns` scope.
6
-
7
- ### Generate a New Token (if needed)
8
-
9
- 1. Go to https://www.npmjs.com/settings/YOUR_USERNAME/tokens
10
- 2. Click "Generate New Token"
11
- 3. Choose "Classic Token"
12
- 4. Select "Automation" or "Publish" type
13
- 5. Copy the token (starts with `npm_`)
14
-
15
- **Important:** The token must be associated with the `forwardslashns` npm account that has publish permissions for `@forwardslashns/taskit-validation-messages`.
16
-
17
- ## Setup
18
-
19
- 1. **Create `.env` file** (first time only):
20
-
21
- ```bash
22
- cp .env.example .env
23
- ```
24
-
25
- 2. **Add your NPM token** to `.env`:
26
-
27
- ```
28
- NPM_TOKEN=npm_your_actual_token_here
29
- ```
30
-
31
- Make sure to use the **full token** (should be 40+ characters starting with `npm_`)
32
-
33
- ## Publishing
34
-
35
- Run the publish script:
36
-
37
- ```powershell
38
- pnpm run publish:token
39
- ```
40
-
41
- Or directly:
42
-
43
- ```powershell
44
- .\publish.ps1
45
- ```
46
-
47
- ## Troubleshooting
48
-
49
- ### "Access token expired or revoked"
50
-
51
- This means your token is either:
52
-
53
- - **Expired** - Generate a new token from npm
54
- - **Invalid** - Check you copied the complete token
55
- - **No permissions** - Token must belong to `forwardslashns` npm account with publish rights
56
-
57
- **Solution:** Generate a fresh token from the npm account that owns the package.
58
-
59
- ### "Not in this registry"
60
-
61
- - Verify the package exists: `npm view @forwardslashns/taskit-validation-messages`
62
- - Ensure you have publish permissions for the `@forwardslashns` scope
63
-
64
- ### Token not loading
65
-
66
- - Verify `.env` exists and contains `NPM_TOKEN=...`
67
- - Check token has no extra spaces or quotes
68
- - Run `Get-Content .env` to verify the file
69
-
70
- ## How It Works
71
-
72
- 1. Script loads `NPM_TOKEN` from `.env` file
73
- 2. Temporarily replaces `${NPM_TOKEN}` in `.npmrc` with actual token
74
- 3. Runs `pnpm publish`
75
- 4. Restores original `.npmrc` (keeps token out of git)
76
-
77
- ## Security
78
-
79
- - `.env` is in `.gitignore` - never commit it
80
- - `.npmrc` uses `${NPM_TOKEN}` placeholder - safe to commit
81
- - Token is only in memory during publish
package/publish.ps1 DELETED
@@ -1,37 +0,0 @@
1
- # Load environment variables from .env file
2
- if (Test-Path .env) {
3
- Get-Content .env | ForEach-Object {
4
- if ($_ -match '^([^=]+)=(.*)$') {
5
- $key = $matches[1].Trim()
6
- $value = $matches[2].Trim()
7
- Set-Item -Path "env:$key" -Value $value
8
- Write-Host "Loaded $key from .env"
9
- }
10
- }
11
- } else {
12
- Write-Host "Error: .env file not found. Copy .env.example to .env and add your NPM_TOKEN" -ForegroundColor Red
13
- exit 1
14
- }
15
-
16
- # Verify NPM_TOKEN is set
17
- if (-not $env:NPM_TOKEN) {
18
- Write-Host "Error: NPM_TOKEN not set in .env file" -ForegroundColor Red
19
- exit 1
20
- }
21
-
22
- Write-Host "NPM_TOKEN loaded (length: $($env:NPM_TOKEN.Length) chars)" -ForegroundColor Cyan
23
-
24
- # Backup original .npmrc
25
- Copy-Item .npmrc .npmrc.backup -Force
26
-
27
- # Replace ${NPM_TOKEN} with actual token in .npmrc
28
- $npmrcContent = Get-Content .npmrc -Raw
29
- $npmrcContent = $npmrcContent -replace '\$\{NPM_TOKEN\}', $env:NPM_TOKEN
30
- Set-Content .npmrc $npmrcContent
31
-
32
- Write-Host "Publishing package from current branch..." -ForegroundColor Green
33
- pnpm publish --no-git-checks
34
-
35
- # Restore original .npmrc
36
- Move-Item .npmrc.backup .npmrc -Force
37
- Write-Host "Restored .npmrc" -ForegroundColor Cyan