@shgysk8zer0/importmap 1.4.9 → 1.4.11
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 +10 -0
- package/cli.cjs +7 -7
- package/cli.js +7 -7
- package/importmap.cjs +7 -7
- package/importmap.js +7 -7
- package/importmap.json +7 -7
- package/index.cjs +7 -7
- package/index.js +267 -0
- package/package.json +1 -1
- package/importmap.mjs +0 -1
- package/index.mjs +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [v1.4.11] - 2024-09-25
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- More version updates
|
|
14
|
+
|
|
15
|
+
## [v1.4.10] - 20204-09-20
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Export the correct files
|
|
19
|
+
|
|
10
20
|
## [v1.4.9] - 2024-09-20
|
|
11
21
|
|
|
12
22
|
### Changed
|
package/cli.cjs
CHANGED
|
@@ -19,15 +19,15 @@ const imports = {
|
|
|
19
19
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
20
20
|
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
21
21
|
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
22
|
-
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.
|
|
22
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
23
23
|
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
24
24
|
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
25
|
-
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
26
|
-
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
27
|
-
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
28
|
-
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
29
|
-
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
30
|
-
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
25
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
26
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
27
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
28
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
29
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
30
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
31
31
|
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
32
32
|
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
33
33
|
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
package/cli.js
CHANGED
|
@@ -17,15 +17,15 @@ const imports = {
|
|
|
17
17
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
18
18
|
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
19
19
|
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
20
|
-
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.
|
|
20
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
21
21
|
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
22
22
|
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
23
|
-
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
24
|
-
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
25
|
-
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
26
|
-
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
27
|
-
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
28
|
-
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
23
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
24
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
25
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
26
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
27
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
28
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
29
29
|
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
30
30
|
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
31
31
|
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
package/importmap.cjs
CHANGED
|
@@ -12,15 +12,15 @@ const imports = {
|
|
|
12
12
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
13
13
|
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
14
14
|
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
15
|
-
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.
|
|
15
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
16
16
|
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
17
17
|
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
18
|
-
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
19
|
-
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
20
|
-
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
21
|
-
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
22
|
-
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
23
|
-
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
18
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
19
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
20
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
21
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
22
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
23
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
24
24
|
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
25
25
|
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
26
26
|
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
package/importmap.js
CHANGED
|
@@ -10,15 +10,15 @@ const imports = {
|
|
|
10
10
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
11
11
|
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
12
12
|
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
13
|
-
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.
|
|
13
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
14
14
|
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
15
15
|
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
16
|
-
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
17
|
-
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
18
|
-
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
19
|
-
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
20
|
-
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
21
|
-
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
16
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
17
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
18
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
19
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
20
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
21
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
22
22
|
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
23
23
|
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
24
24
|
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
package/importmap.json
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
12
12
|
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
13
13
|
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
14
|
-
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.
|
|
14
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
15
15
|
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
16
16
|
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
17
|
-
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
18
|
-
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
19
|
-
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
20
|
-
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
21
|
-
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
22
|
-
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
17
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
18
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
19
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
20
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
21
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
22
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
23
23
|
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
24
24
|
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
25
25
|
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
package/index.cjs
CHANGED
|
@@ -17,15 +17,15 @@ const imports$1 = {
|
|
|
17
17
|
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
18
18
|
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
19
19
|
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
20
|
-
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.
|
|
20
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
21
21
|
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
22
22
|
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
23
|
-
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
24
|
-
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.
|
|
25
|
-
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
26
|
-
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.
|
|
27
|
-
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
28
|
-
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.
|
|
23
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
24
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
25
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
26
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
27
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
28
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
29
29
|
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
30
30
|
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
31
31
|
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
package/index.js
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { writeFile } from 'node:fs/promises';
|
|
2
|
+
import { readYAMLFile, writeYAMLFile } from '@shgysk8zer0/npm-utils/yaml.js';
|
|
3
|
+
import { readJSONFile, writeJSONFile } from '@shgysk8zer0/npm-utils/json.js';
|
|
4
|
+
import { getFileURL } from '@shgysk8zer0/npm-utils/path.js';
|
|
5
|
+
|
|
6
|
+
const imports$1 = {
|
|
7
|
+
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/kazoo@1.0.9/",
|
|
8
|
+
"@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/konami@1.1.1/konami.js",
|
|
9
|
+
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/polyfills@0.4.3/all.min.js",
|
|
10
|
+
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/polyfills@0.4.3/",
|
|
11
|
+
"@shgysk8zer0/jwk-utils": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.0.15/jwk-utils.min.js",
|
|
12
|
+
"@shgysk8zer0/jwk-utils/": "https://unpkg.com/@shgysk8zer0/jwk-utils@1.0.15/",
|
|
13
|
+
"@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/swagger.js",
|
|
14
|
+
"@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/jswaggersheets@1.1.0/",
|
|
15
|
+
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/jss@1.0.1/",
|
|
16
|
+
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/consts@1.0.8/",
|
|
17
|
+
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/http@1.0.5/",
|
|
18
|
+
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/http-status@1.1.2/http-status.js",
|
|
19
|
+
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/bundle.min.js",
|
|
20
|
+
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/trusted-types@1.0.2/",
|
|
21
|
+
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/bundle.min.js",
|
|
22
|
+
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/parsers@0.0.10/",
|
|
23
|
+
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/sanitizer.js",
|
|
24
|
+
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/sanitizer@0.1.2/",
|
|
25
|
+
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/core@0.2.15/core.js",
|
|
26
|
+
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/core@0.2.15/",
|
|
27
|
+
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/styles@0.1.2/styles.js",
|
|
28
|
+
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/styles@0.1.2/",
|
|
29
|
+
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/component@0.1.3/component.js",
|
|
30
|
+
"@aegisjsproject/component/": "https://unpkg.com/@aegisjsproject/component@0.1.3/",
|
|
31
|
+
"@aegisjsproject/markdown": "https://unpkg.com/@aegisjsproject/markdown@0.1.3/markdown.js",
|
|
32
|
+
"@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/markdown@0.1.3/",
|
|
33
|
+
"@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/aegis-md.js",
|
|
34
|
+
"@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/aegis-md@0.0.4/",
|
|
35
|
+
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/components@0.3.13/",
|
|
36
|
+
"@kernvalley/components/": "https://unpkg.com/@kernvalley/components@2.0.5/",
|
|
37
|
+
"@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/custom-elements@1.6.0/custom-elements.min.js",
|
|
38
|
+
leaflet: "https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js",
|
|
39
|
+
"urlpattern-polyfill": "https://unpkg.com/urlpattern-polyfill@10.0.0/index.js",
|
|
40
|
+
"highlight.js": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/core.min.js",
|
|
41
|
+
"highlight.js/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
42
|
+
"@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/core.min.js",
|
|
43
|
+
"@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/",
|
|
44
|
+
marked: "https://unpkg.com/marked@14.1.2/lib/marked.esm.js",
|
|
45
|
+
"marked-highlight": "https://unpkg.com/marked-highlight@2.1.4/src/index.js",
|
|
46
|
+
yaml: "https://unpkg.com/yaml@2.5.1/browser/dist/index.js",
|
|
47
|
+
"yaml/": "https://unpkg.com/yaml@2.5.1/browser/dist/",
|
|
48
|
+
"firebase/": "https://www.gstatic.com/firebasejs/10.12.1/",
|
|
49
|
+
"firebase/app": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app.js",
|
|
50
|
+
"firebase/app-check": "https://www.gstatic.com/firebasejs/10.12.1/firebase-app-check.js",
|
|
51
|
+
"firebase/auth": "https://www.gstatic.com/firebasejs/10.12.1/firebase-auth.js",
|
|
52
|
+
"firebase/database": "https://www.gstatic.com/firebasejs/10.12.1/firebase-database.js",
|
|
53
|
+
"firebase/firestore": "https://www.gstatic.com/firebasejs/10.12.1/firebase-firestore.js",
|
|
54
|
+
"firebase/functions": "https://www.gstatic.com/firebasejs/10.12.1/firebase-functions.js",
|
|
55
|
+
"firebase/messaging": "https://www.gstatic.com/firebasejs/10.12.1/firebase-messaging.js",
|
|
56
|
+
"firebase/performance": "https://www.gstatic.com/firebasejs/10.12.1/firebase-performance.js",
|
|
57
|
+
"firebase/remote-config": "https://www.gstatic.com/firebasejs/10.12.1/firebase-remote-config.js",
|
|
58
|
+
"firebase/storage": "https://www.gstatic.com/firebasejs/10.12.1/firebase-storage.js",
|
|
59
|
+
"firebase/analytics": "https://www.gstatic.com/firebasejs/10.12.1/firebase-analytics.js"
|
|
60
|
+
};
|
|
61
|
+
const scope$1 = {
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var importmap = /*#__PURE__*/Object.freeze({
|
|
65
|
+
__proto__: null,
|
|
66
|
+
imports: imports$1,
|
|
67
|
+
scope: scope$1
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const SHA384 = 'SHA-384';
|
|
71
|
+
const DEFAULT_ALGO = SHA384;
|
|
72
|
+
|
|
73
|
+
const BASE64 = 'base64';
|
|
74
|
+
const SRI = 'sri';
|
|
75
|
+
const HEX = 'hex';
|
|
76
|
+
const BUFFER = 'buffer';
|
|
77
|
+
|
|
78
|
+
async function hash(data, { algo = DEFAULT_ALGO, output = BUFFER } = {}) {
|
|
79
|
+
const buffer = await new TextEncoder().encode(data);
|
|
80
|
+
const hash = await crypto.subtle.digest(algo, buffer);
|
|
81
|
+
|
|
82
|
+
switch (output) {
|
|
83
|
+
case BUFFER:
|
|
84
|
+
return hash;
|
|
85
|
+
|
|
86
|
+
case HEX:
|
|
87
|
+
return Array.from(
|
|
88
|
+
new Uint8Array(hash),
|
|
89
|
+
byte => byte.toString(16).padStart(2, '0')
|
|
90
|
+
).join('');
|
|
91
|
+
|
|
92
|
+
case BASE64:
|
|
93
|
+
return btoa(hash);
|
|
94
|
+
|
|
95
|
+
case SRI: {
|
|
96
|
+
const codeUnits = new Uint16Array(hash);
|
|
97
|
+
const charCodes = new Uint8Array(codeUnits.buffer);
|
|
98
|
+
const result = btoa(String.fromCharCode(...charCodes));
|
|
99
|
+
return `${algo.replace('-', '').toLowerCase()}-${result}`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
default:
|
|
103
|
+
throw new TypeError(`Unsupported output type: "${output}".`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const sri = async(data, { algo = SHA384 } = {}) => hash(data, { algo, output: SRI });
|
|
108
|
+
|
|
109
|
+
const UNPKG = 'https://unpkg.com/';
|
|
110
|
+
|
|
111
|
+
const cache = new Map();
|
|
112
|
+
|
|
113
|
+
function parseUnpkgURL(src) {
|
|
114
|
+
const url = new URL(src, UNPKG);
|
|
115
|
+
|
|
116
|
+
if (! url.hostname === UNPKG || url.pathname.length === 1 || url.pathname === '/[object%20Object]') {
|
|
117
|
+
throw new Error(`${src} is not an unpkg URL.`);
|
|
118
|
+
} else {
|
|
119
|
+
const path = url.pathname.substr(1).split('/');
|
|
120
|
+
|
|
121
|
+
if (path.length === 0) {
|
|
122
|
+
throw new Error(`Invalid unpkg URL: ${src}`);
|
|
123
|
+
} else if (path.length !== 1 && path[0].startsWith('@')) {
|
|
124
|
+
const [pkg, version = null] = path[1].split('@');
|
|
125
|
+
return { scope: path[0], pkg, version, module: path.splice(2).join('/') };
|
|
126
|
+
} else {
|
|
127
|
+
const [pkg, version = null] = path[0].split('@');
|
|
128
|
+
return { scope: null, pkg, version, module: path.splice(1).join('/') };
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function getUnpkgURL({ scope, pkg, version, module = '' }) {
|
|
134
|
+
// console.log({ scope, pkg, version });
|
|
135
|
+
if (typeof pkg !== 'string' || pkg.length === 0) {
|
|
136
|
+
throw new TypeError('Package name must be a non-empty string.');
|
|
137
|
+
} else if (typeof version !== 'string' || version.length === 0) {
|
|
138
|
+
throw new TypeError('Version must be a non-empty string.');
|
|
139
|
+
} else if (typeof scope === 'string' && scope.length !== 0) {
|
|
140
|
+
return new URL(`/${scope}/${pkg}@${version}/${module}`, UNPKG).href;
|
|
141
|
+
} else {
|
|
142
|
+
return new URL(`/${pkg}@${version}/${module}`, UNPKG).href;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async function getLatestVersion({ scope, pkg, signal } = {}) {
|
|
147
|
+
const path = typeof scope === 'string' ? `/${scope}/${pkg}/` : `/${pkg}/`;
|
|
148
|
+
|
|
149
|
+
if (cache.has(path)) {
|
|
150
|
+
return await cache.get(path);
|
|
151
|
+
} else {
|
|
152
|
+
const url = new URL(path, 'https://unpkg.com/');
|
|
153
|
+
url.searchParams.set('meta', '');
|
|
154
|
+
|
|
155
|
+
const promise = fetch(url, { method: 'HEAD', signal }).then(resp => {
|
|
156
|
+
const { version } = parseUnpkgURL(resp.url);
|
|
157
|
+
return version;
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
cache.set(path, promise);
|
|
161
|
+
return promise;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function update(imports) {
|
|
166
|
+
let updated = false;
|
|
167
|
+
|
|
168
|
+
const entries = await Promise.all(Object.entries(imports)
|
|
169
|
+
.filter(([,val]) => val.startsWith(UNPKG))
|
|
170
|
+
.map(async ([key, val]) => {
|
|
171
|
+
const { scope, pkg, version: oldVersion, module } = parseUnpkgURL(val);
|
|
172
|
+
const version = await getLatestVersion({ scope, pkg });
|
|
173
|
+
|
|
174
|
+
if (! updated && version > oldVersion) {
|
|
175
|
+
updated = true;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return [key, getUnpkgURL({ scope, pkg, version, module })];
|
|
179
|
+
})
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
return { imports: Object.fromEntries(entries), updated };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
async function updateUnpkg(imports) {
|
|
186
|
+
return update(imports);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
async function updateYAML(file) {
|
|
190
|
+
if (typeof file === 'string') {
|
|
191
|
+
return await updateJSON(getFileURL(file));
|
|
192
|
+
} else if (file instanceof URL && file.protocol === 'file:') {
|
|
193
|
+
const importmap = await readYAMLFile(file);
|
|
194
|
+
const { updated, imports } = await update(importmap.imports);
|
|
195
|
+
|
|
196
|
+
if (updated) {
|
|
197
|
+
await writeYAMLFile(file, { ...importmap, imports: { ...importmap.imports, ...imports }});
|
|
198
|
+
return true;
|
|
199
|
+
} else {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
throw new TypeError('File must be a path or file: URL.');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
async function updateJSON(file) {
|
|
209
|
+
if (typeof file === 'string') {
|
|
210
|
+
return await updateJSON(getFileURL(file));
|
|
211
|
+
} else if (file instanceof URL && file.protocol === 'file:') {
|
|
212
|
+
const importmap = await readJSONFile(file);
|
|
213
|
+
const { updated, imports } = await update(importmap.imports);
|
|
214
|
+
|
|
215
|
+
if (updated) {
|
|
216
|
+
await writeJSONFile(file, { ...importmap, imports: { ...importmap.imports, ...imports }});
|
|
217
|
+
return true;
|
|
218
|
+
} else {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
throw new TypeError('File must be a path or file: URL.');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var unpkg = /*#__PURE__*/Object.freeze({
|
|
227
|
+
__proto__: null,
|
|
228
|
+
update: update,
|
|
229
|
+
updateJSON: updateJSON,
|
|
230
|
+
updateUnpkg: updateUnpkg,
|
|
231
|
+
updateYAML: updateYAML
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const { imports, scope } = importmap;
|
|
235
|
+
const ENCODING = 'utf8';
|
|
236
|
+
|
|
237
|
+
function mergeWithImportmap({ imports = {}, scope = {}}) {
|
|
238
|
+
return {
|
|
239
|
+
imports: { ...imports$1, ...imports },
|
|
240
|
+
scope: { ...scope$1, ...scope },
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
async function createImportmapJSON(path = 'importmap.json', {
|
|
245
|
+
importmap = { imports, scope },
|
|
246
|
+
spaces = 2,
|
|
247
|
+
signal,
|
|
248
|
+
} = {}) {
|
|
249
|
+
await writeFile(path, JSON.stringify(importmap, null, spaces), { encoding: ENCODING, signal });
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
async function getImportmapIntegrity({
|
|
253
|
+
importmap = { imports, scope },
|
|
254
|
+
algo = DEFAULT_ALGO,
|
|
255
|
+
} = {}) {
|
|
256
|
+
return await sri(JSON.stringify(importmap), { algo });
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
async function getImportmapScript({
|
|
260
|
+
importmap = { imports, scope },
|
|
261
|
+
algo = DEFAULT_ALGO,
|
|
262
|
+
} = {}) {
|
|
263
|
+
const integrity = await getImportmapIntegrity({ importmap, algo });
|
|
264
|
+
return `<script type="importmap" integrity="${integrity}">${JSON.stringify(importmap)}</script>`;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export { ENCODING, createImportmapJSON, getImportmapIntegrity, getImportmapScript, importmap, imports, mergeWithImportmap, scope, unpkg };
|
package/package.json
CHANGED
package/importmap.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './importmap.json' with { type: 'json' };
|
package/index.mjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { writeFile } from 'node:fs/promises';
|
|
2
|
-
import * as importmap from './importmap.mjs';
|
|
3
|
-
import { sri, DEFAULT_ALGO } from './hash.js';
|
|
4
|
-
|
|
5
|
-
export const { imports, scope } = importmap;
|
|
6
|
-
export const ENCODING = 'utf8';
|
|
7
|
-
export { importmap };
|
|
8
|
-
export * as unpkg from './unpkg.js';
|
|
9
|
-
|
|
10
|
-
export function mergeWithImportmap({ imports = {}, scope = {}}) {
|
|
11
|
-
return {
|
|
12
|
-
imports: { ...importmap.imports, ...imports },
|
|
13
|
-
scope: { ...importmap.scope, ...scope },
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export async function createImportmapJSON(path = 'importmap.json', {
|
|
18
|
-
importmap = { imports, scope },
|
|
19
|
-
spaces = 2,
|
|
20
|
-
signal,
|
|
21
|
-
} = {}) {
|
|
22
|
-
await writeFile(path, JSON.stringify(importmap, null, spaces), { encoding: ENCODING, signal });
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export async function getImportmapIntegrity({
|
|
26
|
-
importmap = { imports, scope },
|
|
27
|
-
algo = DEFAULT_ALGO,
|
|
28
|
-
} = {}) {
|
|
29
|
-
return await sri(JSON.stringify(importmap), { algo });
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export async function getImportmapScript({
|
|
33
|
-
importmap = { imports, scope },
|
|
34
|
-
algo = DEFAULT_ALGO,
|
|
35
|
-
} = {}) {
|
|
36
|
-
const integrity = await getImportmapIntegrity({ importmap, algo });
|
|
37
|
-
return `<script type="importmap" integrity="${integrity}">${JSON.stringify(importmap)}</script>`;
|
|
38
|
-
}
|