@xwiki/cristal-settings-api 0.20.0 → 0.21.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +24 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/settings.d.ts +20 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settingsManager.d.ts +21 -1
- package/dist/settingsManager.d.ts.map +1 -0
- package/dist/settingsParser.d.ts +21 -1
- package/dist/settingsParser.d.ts.map +1 -0
- package/dist/settingsStorage.d.ts +21 -1
- package/dist/settingsStorage.d.ts.map +1 -0
- package/package.json +9 -19
- package/src/index.ts +1 -1
- package/src/settings.ts +1 -1
- package/src/settingsManager.ts +1 -1
- package/src/settingsParser.ts +1 -1
- package/src/settingsStorage.ts +1 -1
- package/tsconfig.json +4 -1
- package/dist/index.d.cts +0 -5
- package/dist/index.es.js +0 -2
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
- package/vite.config.ts +0 -23
- package/vitest.config.ts +0 -25
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
20
|
+
import type { Settings } from "./settings";
|
|
21
|
+
import type { SettingsManager } from "./settingsManager";
|
|
22
|
+
import type { SettingsParser, SettingsParserProvider } from "./settingsParser";
|
|
23
|
+
import type { SettingsStorage } from "./settingsStorage";
|
|
5
24
|
export type { Settings, SettingsManager, SettingsParser, SettingsParserProvider, SettingsStorage, };
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,YAAY,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,eAAe,GAChB,CAAC"}
|
package/dist/settings.d.ts
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
1
20
|
/**
|
|
2
21
|
* Generic type to handle settings in Cristal.
|
|
3
22
|
* This should be extended with a properly typed "content" attribute for
|
|
@@ -8,3 +27,4 @@ export interface Settings {
|
|
|
8
27
|
key: string;
|
|
9
28
|
content: unknown;
|
|
10
29
|
}
|
|
30
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
20
|
+
import type { Settings } from "./settings";
|
|
2
21
|
/**
|
|
3
22
|
* A SettingsManager handles operations on Cristal's settings.
|
|
4
23
|
* @since 0.18
|
|
@@ -27,3 +46,4 @@ export interface SettingsManager {
|
|
|
27
46
|
*/
|
|
28
47
|
fromJSON(json: string): void;
|
|
29
48
|
}
|
|
49
|
+
//# sourceMappingURL=settingsManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsManager.d.ts","sourceRoot":"","sources":["../src/settingsManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE9B;;;;OAIG;IACH,GAAG,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAE1D;;;OAGG;IACH,MAAM,IAAI,MAAM,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B"}
|
package/dist/settingsParser.d.ts
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
20
|
+
import type { Settings } from "./settings";
|
|
2
21
|
/**
|
|
3
22
|
* A SettingsParser parses a JSON representation of settings into an actual
|
|
4
23
|
* Settings object. For specific implementations, it needs to be registered as
|
|
@@ -28,3 +47,4 @@ interface SettingsParserProvider {
|
|
|
28
47
|
get(type?: string): SettingsParser;
|
|
29
48
|
}
|
|
30
49
|
export type { SettingsParser, SettingsParserProvider };
|
|
50
|
+
//# sourceMappingURL=settingsParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsParser.d.ts","sourceRoot":"","sources":["../src/settingsParser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;GAMG;AACH,UAAU,cAAc;IACtB;;;;OAIG;IACH,KAAK,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC1D;AAED;;;;GAIG;AACH,UAAU,sBAAsB;IAC9B;;;;OAIG;IACH,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;CACpC;AAED,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
20
|
+
import type { SettingsManager } from "./settingsManager";
|
|
2
21
|
/**
|
|
3
22
|
* A SettingsStorage can persistently store and retrieve settings, from and to
|
|
4
23
|
* a {@link SettingsManager} instance.
|
|
@@ -16,3 +35,4 @@ export interface SettingsStorage {
|
|
|
16
35
|
*/
|
|
17
36
|
load(settingsManager: SettingsManager): Promise<void>;
|
|
18
37
|
}
|
|
38
|
+
//# sourceMappingURL=settingsStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsStorage.d.ts","sourceRoot":"","sources":["../src/settingsStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,IAAI,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD;;;OAGG;IACH,IAAI,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-settings-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
@@ -15,28 +15,18 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
-
"
|
|
19
|
-
"types": "./dist/index.d.ts",
|
|
20
|
-
"default": "./dist/index.es.js"
|
|
21
|
-
},
|
|
22
|
-
"require": {
|
|
23
|
-
"types": "./dist/index.d.cts",
|
|
24
|
-
"default": "./dist/index.umd.js"
|
|
25
|
-
}
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
26
19
|
}
|
|
27
20
|
},
|
|
28
|
-
"
|
|
21
|
+
"types": "./src/index.ts",
|
|
29
22
|
"devDependencies": {
|
|
30
|
-
"typescript": "5.
|
|
31
|
-
"
|
|
32
|
-
"@xwiki/cristal-
|
|
33
|
-
"@xwiki/cristal-dsapi": "0.20.0"
|
|
23
|
+
"typescript": "5.9.2",
|
|
24
|
+
"@xwiki/cristal-dev-config": "0.21.0",
|
|
25
|
+
"@xwiki/cristal-dsapi": "0.21.0"
|
|
34
26
|
},
|
|
35
27
|
"scripts": {
|
|
36
|
-
"build": "tsc --project tsconfig.json
|
|
28
|
+
"build": "rimraf dist && tsc --project tsconfig.json",
|
|
37
29
|
"clean": "rimraf dist",
|
|
38
|
-
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
"types": "./dist/index.d.ts"
|
|
30
|
+
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
|
|
31
|
+
}
|
|
42
32
|
}
|
package/src/index.ts
CHANGED
package/src/settings.ts
CHANGED
package/src/settingsManager.ts
CHANGED
package/src/settingsParser.ts
CHANGED
package/src/settingsStorage.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
"outDir": "dist",
|
|
5
5
|
"resolveJsonModule": true,
|
|
6
6
|
"isolatedDeclarations": false,
|
|
7
|
-
"types": ["@xwiki/cristal-dsapi"]
|
|
7
|
+
"types": ["@xwiki/cristal-dsapi"],
|
|
8
|
+
"emitDeclarationOnly": true,
|
|
9
|
+
"noEmit": false,
|
|
10
|
+
"declarationMap": true
|
|
8
11
|
},
|
|
9
12
|
"extends": "../../../tsconfig.json",
|
|
10
13
|
"include": [
|
package/dist/index.d.cts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Settings } from './settings';
|
|
2
|
-
import { SettingsManager } from './settingsManager';
|
|
3
|
-
import { SettingsParser, SettingsParserProvider } from './settingsParser';
|
|
4
|
-
import { SettingsStorage } from './settingsStorage';
|
|
5
|
-
export type { Settings, SettingsManager, SettingsParser, SettingsParserProvider, SettingsStorage, };
|
package/dist/index.es.js
DELETED
package/dist/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.umd.js
DELETED
package/dist/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/vite.config.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* See the LICENSE file distributed with this work for additional
|
|
3
|
-
* information regarding copyright ownership.
|
|
4
|
-
*
|
|
5
|
-
* This is free software; you can redistribute it and/or modify it
|
|
6
|
-
* under the terms of the GNU Lesser General Public License as
|
|
7
|
-
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
-
* the License, or (at your option) any later version.
|
|
9
|
-
*
|
|
10
|
-
* This software is distributed in the hope that it will be useful,
|
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
-
* Lesser General Public License for more details.
|
|
14
|
-
*
|
|
15
|
-
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
-
* License along with this software; if not, write to the Free
|
|
17
|
-
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
-
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
import { generateConfigVue } from "../../../vite.config";
|
|
22
|
-
|
|
23
|
-
export default generateConfigVue(import.meta.url);
|
package/vitest.config.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* See the LICENSE file distributed with this work for additional
|
|
3
|
-
* information regarding copyright ownership.
|
|
4
|
-
*
|
|
5
|
-
* This is free software; you can redistribute it and/or modify it
|
|
6
|
-
* under the terms of the GNU Lesser General Public License as
|
|
7
|
-
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
-
* the License, or (at your option) any later version.
|
|
9
|
-
*
|
|
10
|
-
* This software is distributed in the hope that it will be useful,
|
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
-
* Lesser General Public License for more details.
|
|
14
|
-
*
|
|
15
|
-
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
-
* License along with this software; if not, write to the Free
|
|
17
|
-
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
-
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
import localConfig from "./vite.config";
|
|
22
|
-
import { mergeConfig } from "vitest/config";
|
|
23
|
-
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";
|
|
24
|
-
|
|
25
|
-
export default mergeConfig(defaultConfig, localConfig);
|