@gesslar/toolkit 1.0.0 → 1.0.2
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 +8 -4
- package/package.json +3 -1
- package/src/types/lib/Cache.d.ts +2 -3
- package/src/types/lib/Cache.d.ts.map +1 -1
- package/src/types/lib/Contract.d.ts +3 -4
- package/src/types/lib/Contract.d.ts.map +1 -1
- package/src/types/lib/Terms.d.ts +2 -3
- package/src/types/lib/Terms.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -29,15 +29,19 @@ available in the browser version.
|
|
|
29
29
|
|
|
30
30
|
**Browser via CDN (no install):**
|
|
31
31
|
|
|
32
|
+
Substitute the `__VERSION__` below with the release version you are seeking.
|
|
33
|
+
|
|
32
34
|
- jsDelivr (runtime only):
|
|
33
|
-
`https://cdn.jsdelivr.net/npm/@gesslar/toolkit/browser`
|
|
35
|
+
`https://cdn.jsdelivr.net/npm/@gesslar/toolkit@__VERSION__/browser`
|
|
36
|
+
|
|
34
37
|
- esm.sh (runtime + optional types):
|
|
35
|
-
`https://esm.sh/@gesslar/toolkit@
|
|
36
|
-
`https://esm.sh/@gesslar/toolkit@
|
|
38
|
+
`https://esm.sh/@gesslar/toolkit@__VERSION__/browser`
|
|
39
|
+
`https://esm.sh/@gesslar/toolkit@__VERSION__/browser?dts` (serves `.d.ts` for editors)
|
|
37
40
|
|
|
38
41
|
Notes:
|
|
39
42
|
|
|
40
|
-
- Nothing to configure in this repo for CDN use; both URLs just work
|
|
43
|
+
- Nothing to configure in this repo for CDN use; both URLs just work after
|
|
44
|
+
the version is published to npm.
|
|
41
45
|
- TypeScript editors do not pick up types from jsDelivr. If you want inline
|
|
42
46
|
types without installing from npm, use the esm.sh `?dts` URL or install the
|
|
43
47
|
package locally for development and use the CDN at runtime.
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gesslar/toolkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Get in, bitches, we're going toolkitting.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"types": "./src/types/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
10
|
"types": "./src/types/index.d.ts",
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
},
|
|
32
33
|
"scripts": {
|
|
33
34
|
"types:build": "tsc -p tsconfig.types.json",
|
|
35
|
+
"prepublishOnly": "npm run types:build",
|
|
34
36
|
"lint": "eslint src/",
|
|
35
37
|
"lint:fix": "eslint src/ --fix",
|
|
36
38
|
"submit": "npm publish --access public",
|
package/src/types/lib/Cache.d.ts
CHANGED
|
@@ -17,12 +17,11 @@ export default class Cache {
|
|
|
17
17
|
* freshness while optimizing performance for repeated file access during
|
|
18
18
|
* parallel processing.
|
|
19
19
|
*
|
|
20
|
-
* @param {FileObject} fileObject - The file object to load and cache
|
|
20
|
+
* @param {import("./FileObject.js").FileObject} fileObject - The file object to load and cache
|
|
21
21
|
* @returns {Promise<unknown>} The parsed file data (JSON5 or YAML)
|
|
22
22
|
* @throws {Sass} If the file cannot be found or accessed
|
|
23
23
|
*/
|
|
24
|
-
loadCachedData(fileObject: FileObject): Promise<unknown>;
|
|
24
|
+
loadCachedData(fileObject: import("./FileObject.js").FileObject): Promise<unknown>;
|
|
25
25
|
#private;
|
|
26
26
|
}
|
|
27
|
-
import FileObject from "./FileObject.js";
|
|
28
27
|
//# sourceMappingURL=Cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../lib/Cache.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../lib/Cache.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH;IAoBE;;;;;;;;;;;;OAYG;IACH,2BAJW,OAAO,iBAAiB,EAAE,UAAU,GAClC,OAAO,CAAC,OAAO,CAAC,CA6B5B;;CACF"}
|
|
@@ -26,12 +26,12 @@ export default class Contract {
|
|
|
26
26
|
/**
|
|
27
27
|
* Creates a contract by negotiating between provider and consumer terms
|
|
28
28
|
*
|
|
29
|
-
* @param {Terms} providerTerms - What the provider offers
|
|
30
|
-
* @param {Terms} consumerTerms - What the consumer expects
|
|
29
|
+
* @param {import("./Terms.js").Terms} providerTerms - What the provider offers
|
|
30
|
+
* @param {import("./Terms.js").Terms} consumerTerms - What the consumer expects
|
|
31
31
|
* @param {object} options - Configuration options
|
|
32
32
|
* @param {import('../types.js').DebugFunction} [options.debug] - Debug function
|
|
33
33
|
*/
|
|
34
|
-
constructor(providerTerms: Terms, consumerTerms: Terms, { debug }?: {
|
|
34
|
+
constructor(providerTerms: import("./Terms.js").Terms, consumerTerms: import("./Terms.js").Terms, { debug }?: {
|
|
35
35
|
debug?: any;
|
|
36
36
|
});
|
|
37
37
|
/**
|
|
@@ -68,5 +68,4 @@ export default class Contract {
|
|
|
68
68
|
get validator(): (data: object) => boolean | null;
|
|
69
69
|
#private;
|
|
70
70
|
}
|
|
71
|
-
import Terms from "./Terms.js";
|
|
72
71
|
//# sourceMappingURL=Contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contract.d.ts","sourceRoot":"","sources":["../../lib/Contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Contract.d.ts","sourceRoot":"","sources":["../../lib/Contract.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH;IAwBE;;;;;;;OAOG;IACH,oDAgBC;IAED;;;;;;;;OAQG;IACH,uBANW,MAAM,mBACN,MAAM,cACN,OAAO,KAAK,EAAE,gBAAgB,GAAC,IAAI,gBAEjC,QAAQ,CAsBpB;IAxED;;;;;;;OAOG;IACH,2BALW,OAAO,YAAY,EAAE,KAAK,iBAC1B,OAAO,YAAY,EAAE,KAAK,cAElC;QAAsD,KAAK,GAAnD,GAAmC;KAC7C,EAQA;IA6FD;;;;;;OAMG;IACH,eAJW,MAAM,GACJ,OAAO,CAsBnB;IAsED;;;;OAIG;IACH,oBAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,qBAFa,KAAK,GAAC,IAAI,CAItB;IAED;;;;OAIG;IACH,qBAFa,KAAK,GAAC,IAAI,CAItB;IAED;;;;OAIG;IACH,iBAFa,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAC,IAAI,CAI1C;;CACF"}
|
package/src/types/lib/Terms.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export default class Terms {
|
|
|
7
7
|
* Parses terms data, handling file references
|
|
8
8
|
*
|
|
9
9
|
* @param {string|object} termsData - Terms data or reference
|
|
10
|
-
* @param {DirectoryObject?} directoryObject - Directory context for file resolution
|
|
10
|
+
* @param {import("./DirectoryObject.js").DirectoryObject?} directoryObject - Directory context for file resolution
|
|
11
11
|
* @returns {object} Parsed terms data
|
|
12
12
|
*/
|
|
13
|
-
static parse(termsData: string | object, directoryObject: DirectoryObject | null): object;
|
|
13
|
+
static parse(termsData: string | object, directoryObject: import("./DirectoryObject.js").DirectoryObject | null): object;
|
|
14
14
|
constructor(definition: any);
|
|
15
15
|
/**
|
|
16
16
|
* Get the terms definition
|
|
@@ -20,5 +20,4 @@ export default class Terms {
|
|
|
20
20
|
get definition(): object;
|
|
21
21
|
#private;
|
|
22
22
|
}
|
|
23
|
-
import DirectoryObject from "./DirectoryObject.js";
|
|
24
23
|
//# sourceMappingURL=Terms.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Terms.d.ts","sourceRoot":"","sources":["../../lib/Terms.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Terms.d.ts","sourceRoot":"","sources":["../../lib/Terms.js"],"names":[],"mappings":"AAUA;;;GAGG;AACH;IAOE;;;;;;OAMG;IACH,wBAJW,MAAM,GAAC,MAAM,mBACb,OAAO,sBAAsB,EAAE,eAAe,OAAC,GAC7C,MAAM,CAmClB;IA5CD,6BAEC;IA4CD;;;;OAIG;IACH,kBAFa,MAAM,CAIlB;;CAEF"}
|