payload-intl 0.3.0 → 1.0.0
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/README.md +5 -8
- package/dist/components/MessageController.d.ts +2 -1
- package/dist/components/MessageController.d.ts.map +1 -0
- package/dist/components/MessageController.js +5 -5
- package/dist/components/MessageController.js.map +1 -1
- package/dist/components/MessagesForm.d.ts +2 -1
- package/dist/components/MessagesForm.d.ts.map +1 -0
- package/dist/components/MessagesForm.js +28 -32
- package/dist/components/MessagesForm.js.map +1 -1
- package/dist/components/actions/JsonImport.d.ts +1 -0
- package/dist/components/actions/JsonImport.d.ts.map +1 -0
- package/dist/components/actions/JsonImport.js +4 -4
- package/dist/components/actions/JsonImport.js.map +1 -1
- package/dist/components/actions/Move.d.ts +2 -3
- package/dist/components/actions/Move.d.ts.map +1 -0
- package/dist/components/inputs/InputWrapper.d.ts +1 -0
- package/dist/components/inputs/InputWrapper.d.ts.map +1 -0
- package/dist/components/inputs/InputWrapper.js.map +1 -1
- package/dist/components/inputs/LexicalInput.d.ts +1 -0
- package/dist/components/inputs/LexicalInput.d.ts.map +1 -0
- package/dist/components/inputs/MessageInput.d.ts +2 -1
- package/dist/components/inputs/MessageInput.d.ts.map +1 -0
- package/dist/components/inputs/MessageInput.js +1 -1
- package/dist/components/inputs/MessageInput.js.map +1 -1
- package/dist/components/inputs/variables/VariableChip.d.ts +1 -0
- package/dist/components/inputs/variables/VariableChip.d.ts.map +1 -0
- package/dist/components/inputs/variables/VariableChip.js +3 -3
- package/dist/components/inputs/variables/VariableChip.js.map +1 -1
- package/dist/components/inputs/variables/VariableIcon.d.ts +3 -2
- package/dist/components/inputs/variables/VariableIcon.d.ts.map +1 -0
- package/dist/components/inputs/variables/VariableSuggestion.d.ts +2 -1
- package/dist/components/inputs/variables/VariableSuggestion.d.ts.map +1 -0
- package/dist/components/inputs/variables/VariableSuggestion.js +2 -2
- package/dist/components/inputs/variables/VariableSuggestion.js.map +1 -1
- package/dist/components/inputs/variables/editors/DateVariableEditor.d.ts +2 -1
- package/dist/components/inputs/variables/editors/DateVariableEditor.d.ts.map +1 -0
- package/dist/components/inputs/variables/editors/PluralVariableEditor.d.ts +2 -1
- package/dist/components/inputs/variables/editors/PluralVariableEditor.d.ts.map +1 -0
- package/dist/components/inputs/variables/editors/PluralVariableEditor.js +31 -34
- package/dist/components/inputs/variables/editors/PluralVariableEditor.js.map +1 -1
- package/dist/components/inputs/variables/editors/SelectVariableEditor.d.ts +2 -1
- package/dist/components/inputs/variables/editors/SelectVariableEditor.d.ts.map +1 -0
- package/dist/components/inputs/variables/editors/SelectVariableEditor.js +17 -10
- package/dist/components/inputs/variables/editors/SelectVariableEditor.js.map +1 -1
- package/dist/components/inputs/variables/editors/TagVariableEditor.d.ts +2 -1
- package/dist/components/inputs/variables/editors/TagVariableEditor.d.ts.map +1 -0
- package/dist/components/inputs/variables/editors/TagVariableEditor.js.map +1 -1
- package/dist/components/inputs/variables/editors/TimeVariableEditor.d.ts +2 -1
- package/dist/components/inputs/variables/editors/TimeVariableEditor.d.ts.map +1 -0
- package/dist/components/inputs/variables/extension.d.ts +2 -1
- package/dist/components/inputs/variables/extension.d.ts.map +1 -0
- package/dist/components/inputs/variables/extension.js.map +1 -1
- package/dist/components/inputs/variables/pickers/NumericVariablePicker.d.ts +2 -1
- package/dist/components/inputs/variables/pickers/NumericVariablePicker.d.ts.map +1 -0
- package/dist/components/inputs/variables/pickers/NumericVariablePicker.js +4 -4
- package/dist/components/inputs/variables/pickers/NumericVariablePicker.js.map +1 -1
- package/dist/components/inputs/variables/pickers/TemporalElementEditor.d.ts +2 -1
- package/dist/components/inputs/variables/pickers/TemporalElementEditor.d.ts.map +1 -0
- package/dist/components/layout/MessageField.d.ts +2 -1
- package/dist/components/layout/MessageField.d.ts.map +1 -0
- package/dist/components/layout/MessageField.js +6 -6
- package/dist/components/layout/MessageField.js.map +1 -1
- package/dist/components/layout/MessagesTabs.d.ts +2 -1
- package/dist/components/layout/MessagesTabs.d.ts.map +1 -0
- package/dist/components/layout/MessagesTabs.js +3 -3
- package/dist/components/layout/MessagesTabs.js.map +1 -1
- package/dist/components/layout/MessagesTree.d.ts +2 -1
- package/dist/components/layout/MessagesTree.d.ts.map +1 -0
- package/dist/components/layout/MessagesTree.js +2 -2
- package/dist/components/layout/MessagesTree.js.map +1 -1
- package/dist/context/messages-form.d.ts +2 -1
- package/dist/context/messages-form.d.ts.map +1 -0
- package/dist/context/messages-form.js.map +1 -1
- package/dist/endpoints/get-messages.d.ts +1 -0
- package/dist/endpoints/get-messages.d.ts.map +1 -0
- package/dist/endpoints/get-messages.js.map +1 -1
- package/dist/endpoints/set-messages.d.ts +1 -0
- package/dist/endpoints/set-messages.d.ts.map +1 -0
- package/dist/endpoints/set-messages.js.map +1 -1
- package/dist/exports/link.d.ts +2 -1
- package/dist/exports/link.d.ts.map +1 -0
- package/dist/exports/link.js.map +1 -1
- package/dist/exports/rsc.d.ts +1 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/view.d.ts +2 -1
- package/dist/exports/view.d.ts.map +1 -0
- package/dist/exports/view.js +26 -30
- package/dist/exports/view.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -34
- package/dist/index.js.map +1 -1
- package/dist/requests/fetchMessages.d.ts +1 -0
- package/dist/requests/fetchMessages.d.ts.map +1 -0
- package/dist/requests/fetchMessages.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +5 -4
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/config.d.ts +2 -1
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/error-handling.d.ts +1 -0
- package/dist/utils/error-handling.d.ts.map +1 -0
- package/dist/utils/error-handling.js.map +1 -1
- package/dist/utils/format.d.ts +2 -1
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/guards.d.ts +2 -0
- package/dist/utils/guards.d.ts.map +1 -0
- package/dist/utils/guards.js +14 -11
- package/dist/utils/guards.js.map +1 -1
- package/dist/utils/icu-tranform.d.ts +6 -5
- package/dist/utils/icu-tranform.d.ts.map +1 -0
- package/dist/utils/icu-tranform.js +32 -27
- package/dist/utils/icu-tranform.js.map +1 -1
- package/dist/utils/sanitize.d.ts +2 -1
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js.map +1 -1
- package/dist/utils/schema.d.ts +3 -2
- package/dist/utils/schema.d.ts.map +1 -0
- package/dist/utils/schema.js.map +1 -1
- package/dist/utils/validate.d.ts +2 -1
- package/dist/utils/validate.d.ts.map +1 -0
- package/dist/utils/validate.js.map +1 -1
- package/package.json +57 -72
package/dist/utils/validate.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TemplateVariable } from '../types.ts';
|
|
2
1
|
import { ValidateResult } from 'react-hook-form';
|
|
2
|
+
import { TemplateVariable } from '../types';
|
|
3
3
|
export declare const validateMessage: (value: unknown, variables: TemplateVariable[]) => ValidateResult;
|
|
4
4
|
export declare const createValidator: (variables: TemplateVariable[]) => MessageValidator;
|
|
5
5
|
export type MessageValidator = (value: unknown) => ValidateResult;
|
|
6
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD,eAAO,MAAM,eAAe,UACnB,OAAO,aACH,gBAAgB,EAAE,KAC5B,cA6DF,CAAC;AAEF,eAAO,MAAM,eAAe,cACd,gBAAgB,EAAE,KAAG,gBAEE,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sources":["../../src/utils/validate.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"validate.js","sources":["../../src/utils/validate.ts"],"sourcesContent":["import { TYPE } from '@formatjs/icu-messageformat-parser';\nimport type { ValidateResult } from 'react-hook-form';\nimport type { TemplateVariable } from '@/types';\n\nimport { isNumericElement, isTemporalElement } from './guards';\nimport { extractTemplateVariables } from './schema';\n\nexport const validateMessage = (\n value: unknown,\n variables: TemplateVariable[],\n): ValidateResult => {\n if (typeof value !== 'string') return 'Invalid value';\n\n try {\n const variableUsages = extractTemplateVariables(value);\n\n for (const allowedVariable of variables) {\n const variableUsage = variableUsages.find(\n (placeholder) => placeholder.value === allowedVariable.value,\n );\n\n if (!variableUsage) continue;\n\n if (isNumericElement(allowedVariable)) {\n if (isNumericElement(variableUsage)) continue;\n return `{${allowedVariable.value}} has invalid type`;\n }\n\n if (isTemporalElement(allowedVariable)) {\n if (isTemporalElement(variableUsage)) continue;\n return `{${allowedVariable.value}} has invalid type`;\n }\n\n switch (allowedVariable.type) {\n case TYPE.argument:\n if (variableUsage.type === TYPE.argument) continue;\n return `{${allowedVariable.value}} has invalid type`;\n case TYPE.select: {\n if (variableUsage.type !== TYPE.select)\n return `{${allowedVariable.value}} has invalid type`;\n\n const allowedOptions = Object.keys(allowedVariable.options);\n for (const option of allowedOptions) {\n if (variableUsage.options[option]) continue;\n return `{${allowedVariable.value}} has missing option: ${option}`;\n }\n const usedOptions = Object.keys(variableUsage.options);\n for (const option of usedOptions) {\n if (allowedOptions.includes(option)) continue;\n return `{${allowedVariable.value}} has unsupported option: ${option}`;\n }\n continue;\n }\n case TYPE.tag:\n if (variableUsage.type === TYPE.tag) continue;\n return `{${allowedVariable.value}} has invalid type`;\n }\n }\n\n const supportedVariables = new Set(variables.map(({ value }) => value));\n\n for (const variableUsage of variableUsages) {\n if (supportedVariables.has(variableUsage.value)) continue;\n return `{${variableUsage.value}} is not supported`;\n }\n\n return true;\n } catch (error) {\n if (!(error instanceof Error)) return false;\n return `Invalid syntax: ${error.message}`;\n }\n};\n\nexport const createValidator =\n (variables: TemplateVariable[]): MessageValidator =>\n (value: unknown) =>\n validateMessage(value, variables);\n\nexport type MessageValidator = (value: unknown) => ValidateResult;\n"],"names":["validateMessage","value","variables","variableUsages","extractTemplateVariables","allowedVariable","variableUsage","placeholder","isNumericElement","isTemporalElement","TYPE","allowedOptions","option","usedOptions","supportedVariables","error","createValidator"],"mappings":";;;AAOO,MAAMA,IAAkB,CAC7BC,GACAC,MACmB;AACnB,MAAI,OAAOD,KAAU,SAAU,QAAO;AAEtC,MAAI;AACF,UAAME,IAAiBC,EAAyBH,CAAK;AAErD,eAAWI,KAAmBH,GAAW;AACvC,YAAMI,IAAgBH,EAAe;AAAA,QACnC,CAACI,MAAgBA,EAAY,UAAUF,EAAgB;AAAA,MAAA;AAGzD,UAAKC,GAEL;AAAA,YAAIE,EAAiBH,CAAe,GAAG;AACrC,cAAIG,EAAiBF,CAAa,EAAG;AACrC,iBAAO,IAAID,EAAgB,KAAK;AAAA,QAClC;AAEA,YAAII,EAAkBJ,CAAe,GAAG;AACtC,cAAII,EAAkBH,CAAa,EAAG;AACtC,iBAAO,IAAID,EAAgB,KAAK;AAAA,QAClC;AAEA,gBAAQA,EAAgB,MAAA;AAAA,UACtB,KAAKK,EAAK;AACR,gBAAIJ,EAAc,SAASI,EAAK,SAAU;AAC1C,mBAAO,IAAIL,EAAgB,KAAK;AAAA,UAClC,KAAKK,EAAK,QAAQ;AAChB,gBAAIJ,EAAc,SAASI,EAAK;AAC9B,qBAAO,IAAIL,EAAgB,KAAK;AAElC,kBAAMM,IAAiB,OAAO,KAAKN,EAAgB,OAAO;AAC1D,uBAAWO,KAAUD;AACnB,kBAAI,CAAAL,EAAc,QAAQM,CAAM;AAChC,uBAAO,IAAIP,EAAgB,KAAK,yBAAyBO,CAAM;AAEjE,kBAAMC,IAAc,OAAO,KAAKP,EAAc,OAAO;AACrD,uBAAWM,KAAUC;AACnB,kBAAI,CAAAF,EAAe,SAASC,CAAM;AAClC,uBAAO,IAAIP,EAAgB,KAAK,6BAA6BO,CAAM;AAErE;AAAA,UACF;AAAA,UACA,KAAKF,EAAK;AACR,gBAAIJ,EAAc,SAASI,EAAK,IAAK;AACrC,mBAAO,IAAIL,EAAgB,KAAK;AAAA,QAAA;AAAA;AAAA,IAEtC;AAEA,UAAMS,IAAqB,IAAI,IAAIZ,EAAU,IAAI,CAAC,EAAE,OAAAD,QAAYA,CAAK,CAAC;AAEtE,eAAWK,KAAiBH;AAC1B,UAAI,CAAAW,EAAmB,IAAIR,EAAc,KAAK;AAC9C,eAAO,IAAIA,EAAc,KAAK;AAGhC,WAAO;AAAA,EACT,SAASS,GAAO;AACd,WAAMA,aAAiB,QAChB,mBAAmBA,EAAM,OAAO,KADD;AAAA,EAExC;AACF,GAEaC,IACX,CAACd,MACD,CAACD,MACCD,EAAgBC,GAAOC,CAAS;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-intl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Payload Plugin for I18N using ICU Messages",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Michael Zeltner",
|
|
7
5
|
"keywords": [
|
|
8
6
|
"payload",
|
|
9
7
|
"intl",
|
|
@@ -16,16 +14,23 @@
|
|
|
16
14
|
"translations",
|
|
17
15
|
"icu"
|
|
18
16
|
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/davincicoding-org/payload-plugins.git",
|
|
20
|
+
"directory": "packages/intl"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Michael Zeltner",
|
|
19
24
|
"type": "module",
|
|
20
25
|
"exports": {
|
|
21
26
|
".": {
|
|
22
|
-
"import": "./dist/index.js",
|
|
23
27
|
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
24
29
|
"default": "./dist/index.js"
|
|
25
30
|
},
|
|
26
31
|
"./rsc": {
|
|
27
|
-
"import": "./dist/exports/rsc.js",
|
|
28
32
|
"types": "./dist/exports/rsc.d.ts",
|
|
33
|
+
"import": "./dist/exports/rsc.js",
|
|
29
34
|
"default": "./dist/exports/rsc.js"
|
|
30
35
|
},
|
|
31
36
|
"./styles.css": "./dist/styles.css"
|
|
@@ -35,62 +40,9 @@
|
|
|
35
40
|
"files": [
|
|
36
41
|
"dist"
|
|
37
42
|
],
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@eslint/eslintrc": "^3.2.0",
|
|
40
|
-
"@ianvs/prettier-plugin-sort-imports": "^4.5.1",
|
|
41
|
-
"@payloadcms/db-postgres": "3.72.0",
|
|
42
|
-
"@payloadcms/eslint-config": "3.28.0",
|
|
43
|
-
"@payloadcms/next": "3.72.0",
|
|
44
|
-
"@payloadcms/richtext-lexical": "3.72.0",
|
|
45
|
-
"@payloadcms/storage-uploadthing": "3.72.0",
|
|
46
|
-
"@payloadcms/ui": "3.72.0",
|
|
47
|
-
"@playwright/test": "^1.52.0",
|
|
48
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
49
|
-
"@tailwindcss/vite": "^4.1.11",
|
|
50
|
-
"@tiptap/suggestion": "^3.16.0",
|
|
51
|
-
"@types/lodash-es": "^4.17.12",
|
|
52
|
-
"@types/node": "^22.5.4",
|
|
53
|
-
"@types/react": "19.1.0",
|
|
54
|
-
"@types/react-dom": "19.1.2",
|
|
55
|
-
"concurrently": "^9.2.0",
|
|
56
|
-
"cross-env": "^7.0.3",
|
|
57
|
-
"eslint": "^9.23.0",
|
|
58
|
-
"eslint-config-next": "15.3.0",
|
|
59
|
-
"graphql": "^16.8.1",
|
|
60
|
-
"next": "15.5.9",
|
|
61
|
-
"next-intl": "^4.3.4",
|
|
62
|
-
"open": "^10.1.0",
|
|
63
|
-
"payload": "3.72.0",
|
|
64
|
-
"prettier": "^3.4.2",
|
|
65
|
-
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
66
|
-
"react": "19.1.0",
|
|
67
|
-
"react-dom": "19.1.0",
|
|
68
|
-
"rollup-preserve-directives": "^1.1.3",
|
|
69
|
-
"sharp": "0.32.6",
|
|
70
|
-
"sort-package-json": "^2.10.0",
|
|
71
|
-
"tailwindcss": "^4.1.11",
|
|
72
|
-
"tw-animate-css": "^1.3.6",
|
|
73
|
-
"typescript": "5.7.3",
|
|
74
|
-
"vite": "^7.0.6",
|
|
75
|
-
"vite-plugin-dts": "^4.5.4",
|
|
76
|
-
"vite-tsconfig-paths": "^5.1.4",
|
|
77
|
-
"vitest": "^3.1.2"
|
|
78
|
-
},
|
|
79
|
-
"peerDependencies": {
|
|
80
|
-
"@payloadcms/next": ">=3.72.0",
|
|
81
|
-
"@payloadcms/ui": ">=3.72.0",
|
|
82
|
-
"next": ">=15.2.3",
|
|
83
|
-
"payload": ">=3.72.0"
|
|
84
|
-
},
|
|
85
|
-
"engines": {
|
|
86
|
-
"node": "^18.20.2 || >=20.9.0",
|
|
87
|
-
"pnpm": "^9 || ^10"
|
|
88
|
-
},
|
|
89
|
-
"registry": "https://registry.npmjs.org/",
|
|
90
43
|
"dependencies": {
|
|
91
44
|
"@floating-ui/dom": "^1.7.3",
|
|
92
45
|
"@formatjs/icu-messageformat-parser": "^2.11.2",
|
|
93
|
-
"@payloadcms/storage-vercel-blob": "^3.72.0",
|
|
94
46
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
95
47
|
"@radix-ui/react-hover-card": "^1.1.14",
|
|
96
48
|
"@radix-ui/react-popover": "^1.1.14",
|
|
@@ -105,28 +57,61 @@
|
|
|
105
57
|
"@tiptap/extension-text": "^3.16.0",
|
|
106
58
|
"@tiptap/pm": "^3.16.0",
|
|
107
59
|
"@tiptap/react": "^3.16.0",
|
|
60
|
+
"@tiptap/suggestion": "^3.16.0",
|
|
108
61
|
"clsx": "^2.1.1",
|
|
109
62
|
"lodash-es": "^4.17.21",
|
|
110
63
|
"radix-ui": "^1.4.2",
|
|
111
64
|
"react-hook-form": "^7.58.1",
|
|
112
|
-
"sonner": "^2.0.6",
|
|
113
65
|
"tailwind-merge": "^3.3.1",
|
|
114
66
|
"zod": "^4.0.14"
|
|
115
67
|
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@payloadcms/richtext-lexical": "3.72.0",
|
|
70
|
+
"@payloadcms/ui": "3.72.0",
|
|
71
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
72
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
73
|
+
"@types/lodash-es": "^4.17.12",
|
|
74
|
+
"@types/node": "^22.5.4",
|
|
75
|
+
"@types/react": "19.2.1",
|
|
76
|
+
"@types/react-dom": "19.2.1",
|
|
77
|
+
"next": "15.5.9",
|
|
78
|
+
"payload": "3.72.0",
|
|
79
|
+
"react": "19.2.1",
|
|
80
|
+
"react-dom": "19.2.1",
|
|
81
|
+
"rollup-preserve-directives": "1.1.3",
|
|
82
|
+
"tailwindcss": "^4.1.11",
|
|
83
|
+
"tw-animate-css": "^1.3.6",
|
|
84
|
+
"typescript": "5.7.3",
|
|
85
|
+
"vite": "7.0.6",
|
|
86
|
+
"vite-plugin-dts": "4.5.4",
|
|
87
|
+
"vite-tsconfig-paths": "5.1.4",
|
|
88
|
+
"vitest": "^3.1.2",
|
|
89
|
+
"@repo/configs": "0.0.1"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"@payloadcms/next": ">=3.72.0",
|
|
93
|
+
"@payloadcms/ui": ">=3.72.0",
|
|
94
|
+
"next": ">=15.2.3",
|
|
95
|
+
"payload": ">=3.72.0"
|
|
96
|
+
},
|
|
97
|
+
"engines": {
|
|
98
|
+
"node": "^18.20.2 || >=20.9.0",
|
|
99
|
+
"pnpm": "^9 || ^10"
|
|
100
|
+
},
|
|
101
|
+
"publishConfig": {
|
|
102
|
+
"access": "public",
|
|
103
|
+
"provenance": true
|
|
104
|
+
},
|
|
105
|
+
"registry": "https://registry.npmjs.org/",
|
|
116
106
|
"scripts": {
|
|
107
|
+
"prebuild": "pnpm typecheck",
|
|
117
108
|
"build": "vite build",
|
|
118
|
-
"
|
|
119
|
-
"dev
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"lint": "eslint",
|
|
126
|
-
"lint:fix": "eslint ./src --fix",
|
|
127
|
-
"release": "pnpm publish --access public",
|
|
128
|
-
"test": "pnpm test:int && pnpm test:e2e",
|
|
129
|
-
"test:e2e": "playwright test",
|
|
130
|
-
"test:int": "vitest"
|
|
109
|
+
"clean": "rm -rf dist && rm -rf node_modules",
|
|
110
|
+
"dev": "vite build --watch",
|
|
111
|
+
"lint": "biome check .",
|
|
112
|
+
"lint:fix": "biome check --write .",
|
|
113
|
+
"test": "vitest run",
|
|
114
|
+
"test:watch": "vitest",
|
|
115
|
+
"typecheck": "tsc --noEmit"
|
|
131
116
|
}
|
|
132
117
|
}
|