@plitzi/sdk-shared 0.39.3 → 0.39.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/CHANGELOG.md +18 -0
- package/dist/clients/index.d.ts +60 -0
- package/dist/clients/index.mjs +47 -0
- package/dist/conditions/types.d.ts +1 -1
- package/dist/credentials/index.d.ts +4 -0
- package/dist/credentials/index.mjs +3 -0
- package/dist/credentials/kinds.d.ts +54 -0
- package/dist/credentials/kinds.mjs +326 -0
- package/dist/credentials/problems.d.ts +14 -0
- package/dist/credentials/problems.mjs +43 -0
- package/dist/csrf/csrf.d.ts +36 -0
- package/dist/csrf/csrf.mjs +62 -0
- package/dist/csrf/index.d.ts +2 -0
- package/dist/csrf/index.mjs +1 -0
- package/dist/helpers/deepEqual/deepEqual.mjs +3 -2
- package/dist/helpers/lodash/cloneDeep.d.ts +3 -3
- package/dist/helpers/lodash/cloneDeep.mjs +24 -27
- package/dist/helpers/lodash/has.d.ts +2 -1
- package/dist/helpers/lodash/has.mjs +8 -8
- package/dist/helpers/lodash/index.d.ts +1 -1
- package/dist/helpers/lodash/omit.mjs +2 -2
- package/dist/helpers/twigWrapper/charClass.mjs +21 -16
- package/dist/helpers/twigWrapper/filters/arrays.mjs +43 -42
- package/dist/helpers/twigWrapper/filters/filters.mjs +3 -3
- package/dist/helpers/twigWrapper/filters/index.mjs +4 -4
- package/dist/helpers/twigWrapper/filters/misc.mjs +14 -13
- package/dist/helpers/twigWrapper/filters/objects.mjs +50 -49
- package/dist/helpers/twigWrapper/filters/strings.mjs +41 -40
- package/dist/helpers/twigWrapper/filters/types.d.ts +4 -0
- package/dist/helpers/twigWrapper/filters/types.mjs +2 -2
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.mjs +3 -2
- package/dist/hooks/usePrePaint.d.ts +12 -0
- package/dist/hooks/usePrePaint.mjs +8 -0
- package/dist/navigation/index.d.ts +2 -1
- package/dist/navigation/index.mjs +4 -3
- package/dist/navigation/notFoundPages.d.ts +25 -0
- package/dist/navigation/notFoundPages.mjs +11 -0
- package/dist/navigation/routes.d.ts +2 -0
- package/dist/navigation/routes.mjs +2 -1
- package/dist/navigation/sitemap.d.ts +8 -0
- package/dist/navigation/sitemap.mjs +7 -4
- package/dist/network/graphql/builder/Mutations/Space/SpaceCancelDeployMutation.d.ts +7 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceCancelDeployMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceCancelScheduledPublishMutation.d.ts +6 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceCancelScheduledPublishMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.d.ts +1 -1
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +1 -1
- package/dist/network/graphql/builder/Mutations/Space/SpaceRedeployMutation.d.ts +5 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRedeployMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRollbackMutation.d.ts +5 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRollbackMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceSchedulePublishMutation.d.ts +5 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceSchedulePublishMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceSetTargetMutation.d.ts +10 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceSetTargetMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceTargetAutomationMutation.d.ts +11 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceTargetAutomationMutation.mjs +3 -0
- package/dist/network/graphql/builder/Mutations/index.d.ts +14 -0
- package/dist/network/graphql/builder/Mutations/index.mjs +88 -74
- package/dist/network/graphql/builder/Queries/Space/SpaceDeployDetailQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceDeployDetailQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/Space/SpacePublishCheckQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpacePublishCheckQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceReleasesQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceReleasesQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceScheduledPublishesQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceScheduledPublishesQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceSnapshotsQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceSnapshotsQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceTargetsQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceTargetsQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionChangesQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionChangesQuery.mjs +3 -0
- package/dist/network/graphql/builder/Queries/index.d.ts +14 -0
- package/dist/network/graphql/builder/Queries/index.mjs +38 -24
- package/dist/react/index.d.ts +1 -1
- package/dist/refusals/index.d.ts +112 -0
- package/dist/refusals/index.mjs +94 -0
- package/dist/schema/aiCrawlers.d.ts +25 -0
- package/dist/schema/aiCrawlers.mjs +34 -0
- package/dist/schema/documentParts.d.ts +45 -0
- package/dist/schema/documentParts.mjs +73 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.mjs +21 -18
- package/dist/schema/pageAccess.d.ts +6 -0
- package/dist/schema/pageAccess.mjs +23 -23
- package/dist/schema/plitziMark.d.ts +9 -0
- package/dist/schema/plitziMark.mjs +3 -0
- package/dist/schema/schemaSettings.d.ts +1 -1
- package/dist/schema/schemaSettings.mjs +1 -1
- package/dist/schema/serverElements.d.ts +5 -0
- package/dist/store/runtimeStatePersist.mjs +10 -10
- package/dist/store/storeHooks.d.ts +45 -45
- package/dist/style/runtimeStyle.d.ts +5 -2
- package/dist/style/runtimeStyle.mjs +1 -1
- package/dist/types/ActionTypes.d.ts +2 -0
- package/dist/types/AuthTypes.d.ts +5 -0
- package/dist/types/SchemaTypes.d.ts +31 -4
- package/dist/types/ServerTypes.d.ts +6 -0
- package/dist/types/SpaceTypes.d.ts +277 -6
- package/dist/types/StoreTypes.d.ts +11 -0
- package/eslint.config.mjs +123 -100
- package/package.json +9 -13
package/eslint.config.mjs
CHANGED
|
@@ -9,106 +9,129 @@ import storybook from 'eslint-plugin-storybook';
|
|
|
9
9
|
import importEslint from 'eslint-plugin-import';
|
|
10
10
|
import { globalIgnores } from 'eslint/config';
|
|
11
11
|
|
|
12
|
-
export default tsEslint.config(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
tsconfigRootDir: import.meta.dirname
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
plugins: {
|
|
28
|
-
import: importEslint,
|
|
29
|
-
'react-hooks': reactHooks,
|
|
30
|
-
'react-refresh': reactRefresh,
|
|
31
|
-
react,
|
|
32
|
-
prettier,
|
|
33
|
-
jsxRuntime: react.configs.flat['jsx-runtime'],
|
|
34
|
-
storybook
|
|
35
|
-
},
|
|
36
|
-
rules: {
|
|
37
|
-
...reactHooks.configs.recommended.rules,
|
|
38
|
-
// One rule evaluator for every reader: sdk-shared's (`@plitzi/sdk-shared/conditions`). plitzi-ui keeps a copy of its
|
|
39
|
-
// own, which Plitzi never reads, so the builder's preview and the server cannot decide a condition two ways.
|
|
40
|
-
'@typescript-eslint/no-restricted-imports': [
|
|
41
|
-
'error',
|
|
42
|
-
{
|
|
43
|
-
paths: [
|
|
44
|
-
{
|
|
45
|
-
name: '@plitzi/plitzi-ui/QueryBuilder/evaluator',
|
|
46
|
-
message: 'Evaluate a condition with `evaluateRuleGroup` from `@plitzi/sdk-shared/conditions`.'
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: '@plitzi/plitzi-ui/QueryBuilder',
|
|
50
|
-
importNames: ['QueryBuilderEvaluator'],
|
|
51
|
-
message: 'Evaluate a condition with `evaluateRuleGroup` from `@plitzi/sdk-shared/conditions`.'
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: '@plitzi/plitzi-ui/QueryBuilder/helpers',
|
|
55
|
-
importNames: ['QueryBuilderEvaluator'],
|
|
56
|
-
message: 'Evaluate a condition with `evaluateRuleGroup` from `@plitzi/sdk-shared/conditions`.'
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
12
|
+
export default tsEslint.config(
|
|
13
|
+
{
|
|
14
|
+
extends: [js.configs.recommended, ...tsEslint.configs.strictTypeChecked, globalIgnores(['**/*.js'])],
|
|
15
|
+
files: ['**/*.{ts,tsx}'],
|
|
16
|
+
ignores: [
|
|
17
|
+
'node_modules',
|
|
18
|
+
'node_modules/*',
|
|
19
|
+
'./node_modules/**',
|
|
20
|
+
'**/node_modules/**',
|
|
21
|
+
'dist',
|
|
22
|
+
'coverage',
|
|
23
|
+
'.yarn/*'
|
|
60
24
|
],
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
25
|
+
languageOptions: {
|
|
26
|
+
ecmaVersion: 2023,
|
|
27
|
+
globals: globals.browser,
|
|
28
|
+
parserOptions: {
|
|
29
|
+
projectService: {
|
|
30
|
+
allowDefaultProject: ['.storybook/*.ts', '.storybook/*.tsx'],
|
|
31
|
+
defaultProject: './tsconfig.json'
|
|
32
|
+
},
|
|
33
|
+
tsconfigRootDir: import.meta.dirname
|
|
70
34
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
'
|
|
111
|
-
|
|
112
|
-
|
|
35
|
+
},
|
|
36
|
+
plugins: {
|
|
37
|
+
import: importEslint,
|
|
38
|
+
'react-hooks': reactHooks,
|
|
39
|
+
'react-refresh': reactRefresh,
|
|
40
|
+
react,
|
|
41
|
+
prettier,
|
|
42
|
+
jsxRuntime: react.configs.flat['jsx-runtime'],
|
|
43
|
+
storybook
|
|
44
|
+
},
|
|
45
|
+
rules: {
|
|
46
|
+
...reactHooks.configs.recommended.rules,
|
|
47
|
+
// One rule evaluator for every reader: sdk-shared's (`@plitzi/sdk-shared/conditions`). plitzi-ui keeps a copy of its
|
|
48
|
+
// own, which Plitzi never reads, so the builder's preview and the server cannot decide a condition two ways.
|
|
49
|
+
'@typescript-eslint/no-restricted-imports': [
|
|
50
|
+
'error',
|
|
51
|
+
{
|
|
52
|
+
paths: [
|
|
53
|
+
{
|
|
54
|
+
name: '@plitzi/plitzi-ui/QueryBuilder/evaluator',
|
|
55
|
+
message: 'Evaluate a condition with `evaluateRuleGroup` from `@plitzi/sdk-shared/conditions`.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: '@plitzi/plitzi-ui/QueryBuilder',
|
|
59
|
+
importNames: ['QueryBuilderEvaluator'],
|
|
60
|
+
message: 'Evaluate a condition with `evaluateRuleGroup` from `@plitzi/sdk-shared/conditions`.'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: '@plitzi/plitzi-ui/QueryBuilder/helpers',
|
|
64
|
+
importNames: ['QueryBuilderEvaluator'],
|
|
65
|
+
message: 'Evaluate a condition with `evaluateRuleGroup` from `@plitzi/sdk-shared/conditions`.'
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
'no-useless-assignment': 'off',
|
|
71
|
+
'@typescript-eslint/no-deprecated': 'off',
|
|
72
|
+
'@typescript-eslint/no-useless-default-assignment': 'off',
|
|
73
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
74
|
+
'warn',
|
|
75
|
+
{
|
|
76
|
+
disallowTypeAnnotations: false,
|
|
77
|
+
fixStyle: 'separate-type-imports',
|
|
78
|
+
prefer: 'type-imports'
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
|
|
82
|
+
'@typescript-eslint/no-misused-promises': [
|
|
83
|
+
'error',
|
|
84
|
+
{ checksVoidReturn: { attributes: false, arguments: false } }
|
|
85
|
+
],
|
|
86
|
+
'@typescript-eslint/no-confusing-void-expression': 'off', // ['error', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
|
|
87
|
+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
|
88
|
+
'no-var': 'error',
|
|
89
|
+
// A file is read whole — by a person, and by an agent before it changes it: past this, it is split by what changes
|
|
90
|
+
// together. A project's own files are held to the same idea by `plitzi lint` (`file-too-long`, `MAX_LINES`).
|
|
91
|
+
'max-lines': ['error', { max: 600, skipBlankLines: true, skipComments: true }],
|
|
92
|
+
curly: 'error',
|
|
93
|
+
// indent: ['warn', 2],
|
|
94
|
+
'linebreak-style': ['error', 'unix'],
|
|
95
|
+
'prefer-const': ['error', { destructuring: 'any', ignoreReadBeforeAssign: false }],
|
|
96
|
+
// semi: ['warn', 'never'],
|
|
97
|
+
'react/jsx-key': ['warn', { checkFragmentShorthand: true }],
|
|
98
|
+
'react-hooks/refs': 'off', // @todo: review later
|
|
99
|
+
'react-hooks/immutability': 'off', // @todo: review later
|
|
100
|
+
'react-hooks/set-state-in-effect': 'off', // @todo: review later
|
|
101
|
+
'react-hooks/preserve-manual-memoization': 'off', // @todo: review later
|
|
102
|
+
// sdk-elements' memos that the page server, which draws once, makes as values (`Element/hooks/drawnMemo.ts`).
|
|
103
|
+
'react-hooks/exhaustive-deps': ['warn', { additionalHooks: '(useDrawnMemo|useDrawnCallback)' }],
|
|
104
|
+
'prettier/prettier': ['warn', { trailingComma: 'none' }],
|
|
105
|
+
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
|
|
106
|
+
// Destructuring a key out so the rest carries everything else is how a field is dropped from an object here.
|
|
107
|
+
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
|
|
108
|
+
'import/order': [
|
|
109
|
+
'error',
|
|
110
|
+
{
|
|
111
|
+
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index'], 'type'],
|
|
112
|
+
pathGroups: [
|
|
113
|
+
{ pattern: '@plitzi/+(sdk-*|nexus)/**', group: 'internal' },
|
|
114
|
+
{ pattern: '@plitzi/+(sdk-*|nexus)', group: 'internal' }
|
|
115
|
+
// { pattern: '@icons/**', group: 'internal' },
|
|
116
|
+
// { pattern: '@components/**', group: 'internal' },
|
|
117
|
+
// { pattern: '@hooks/**', group: 'internal' },
|
|
118
|
+
// { pattern: '@/**', group: 'internal' } // , position: 'before'
|
|
119
|
+
],
|
|
120
|
+
pathGroupsExcludedImportTypes: ['type'],
|
|
121
|
+
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
122
|
+
'newlines-between': 'always'
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* Where a file exports more than components on purpose, and Fast Refresh reloads it whole: an element's file exports
|
|
129
|
+
* its component and what declares it (its definition, its settings), read together by the registry; a model's form
|
|
130
|
+
* exports the form and its schema; an entry point and an MCP app's view export what their bundle is. Said here once,
|
|
131
|
+
* per folder, instead of a comment in each file.
|
|
132
|
+
*/
|
|
133
|
+
{
|
|
134
|
+
files: ['src/index.tsx', 'src/**/elements/**/*.tsx', 'src/**/[mM]odels/**/*.tsx', 'src/**/apps/*/view/index.tsx'],
|
|
135
|
+
rules: { 'react-refresh/only-export-components': 'off' }
|
|
113
136
|
}
|
|
114
|
-
|
|
137
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-shared",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.6",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -35,19 +35,18 @@
|
|
|
35
35
|
"build:prod": "vite build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"@plitzi/nexus": "^1.5.1",
|
|
38
39
|
"date-fns": "^4.4.0",
|
|
39
40
|
"zod": "^4.6.7"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
43
|
"@apollo/client": "^4.3.1",
|
|
43
|
-
"@plitzi/nexus": "^1.4.0",
|
|
44
44
|
"react": "^19",
|
|
45
45
|
"react-dom": "^19"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@apollo/client": "^4.3.
|
|
48
|
+
"@apollo/client": "^4.3.8",
|
|
49
49
|
"@eslint/js": "^10.0.1",
|
|
50
|
-
"@plitzi/nexus": "^1.4.0",
|
|
51
50
|
"@testing-library/dom": "^10.4.2",
|
|
52
51
|
"@testing-library/react": "^16.3.3",
|
|
53
52
|
"@types/react": "^19.3.0",
|
|
@@ -61,18 +60,18 @@
|
|
|
61
60
|
"eslint-plugin-prettier": "^5.5.7",
|
|
62
61
|
"eslint-plugin-react": "^7.37.5",
|
|
63
62
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
64
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
65
|
-
"eslint-plugin-storybook": "^10.6.
|
|
63
|
+
"eslint-plugin-react-refresh": "^0.5.8",
|
|
64
|
+
"eslint-plugin-storybook": "^10.6.7",
|
|
66
65
|
"globals": "^17.14.0",
|
|
67
|
-
"jsdom": "^31.0.
|
|
66
|
+
"jsdom": "^31.0.1",
|
|
68
67
|
"lodash": "^4.18.1",
|
|
69
|
-
"prettier": "^3.
|
|
68
|
+
"prettier": "^3.10.1",
|
|
70
69
|
"react": "^19.3.1",
|
|
71
70
|
"react-dom": "^19.3.1",
|
|
72
71
|
"tailwindcss": "^4.3.5",
|
|
73
72
|
"typescript": "^6.0.3",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
75
|
-
"vite": "^8.3.
|
|
73
|
+
"typescript-eslint": "^8.73.0",
|
|
74
|
+
"vite": "^8.3.8",
|
|
76
75
|
"vite-plugin-dts": "^5.1.2",
|
|
77
76
|
"vitest": "^5.1.0",
|
|
78
77
|
"vitest-fetch-mock": "^0.4.5"
|
|
@@ -81,9 +80,6 @@
|
|
|
81
80
|
"@apollo/client": {
|
|
82
81
|
"optional": true
|
|
83
82
|
},
|
|
84
|
-
"@plitzi/nexus": {
|
|
85
|
-
"optional": true
|
|
86
|
-
},
|
|
87
83
|
"react": {
|
|
88
84
|
"optional": true
|
|
89
85
|
},
|