@kubohiroya/turbowarp-asset-cache 0.4.0 → 0.5.1
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.ja.md +12 -3
- package/README.md +12 -3
- package/dist/asset-cache.js +2 -2
- package/dist/composition.js +2 -2
- package/package.json +13 -10
package/README.ja.md
CHANGED
|
@@ -21,6 +21,14 @@ session backingのAPIは`@kubohiroya/turbowarp-kvs`から直接importしてく
|
|
|
21
21
|
プロジェクトでは、拡張機能IDも`kubohiroyaassetmanager`から`kubohiroyaassetcache`へ置き換える必要が
|
|
22
22
|
あります。公開済みのSB3成果物は、元の拡張機能に固定したままにしてください。
|
|
23
23
|
|
|
24
|
+
## 最小デモ
|
|
25
|
+
|
|
26
|
+
[Open in TurboWarp Editor](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-asset-cache%2Fsamples%2Fshow-cached-svg.sb3) · [Download SB3](https://kubohiroya.github.io/turbowarp-asset-cache/samples/show-cached-svg.sb3)
|
|
27
|
+
|
|
28
|
+
緑の旗で自作SVGの星を取得・登録・表示し、`Result` がtrueになります。Spaceで通常コスチュームに戻し、このサンプルの資源だけをメモリとキャッシュから削除します。`Result` はfalseになります。
|
|
29
|
+
|
|
30
|
+
公式TurboWarp Editorでカスタム拡張の確認画面の **Run extension without sandbox** をチェックし、**Allow** を選択してください。SB3はこのリポジトリの配布JSを内包します。 SVGは同じGitHub Pagesから取得します。追加拡張は不要です。
|
|
31
|
+
|
|
24
32
|
## ユーザーガイド
|
|
25
33
|
|
|
26
34
|
導入手順、安全上の注意、レシピ、図入りのblock解説は
|
|
@@ -55,7 +63,7 @@ Animated Text(`text`)が必要です。
|
|
|
55
63
|
SVG入力は既定で拒否します。remote binaryのcache entryは、保存前にサイズ・content-type・SHA-256を
|
|
56
64
|
検証します。IndexedDBは機密の境界ではなく補助的なcacheとして扱います。
|
|
57
65
|
|
|
58
|
-
メンテナはNode.js
|
|
66
|
+
メンテナはNode.js 24以降と、Corepack経由のpnpmを使います。インストール例とCDN URLのsource of truthは
|
|
59
67
|
`package.json`のversionです。
|
|
60
68
|
|
|
61
69
|
## セキュリティダイアログの説明言語
|
|
@@ -75,14 +83,14 @@ SVG入力は既定で拒否します。remote binaryのcache entryは、保存
|
|
|
75
83
|
versionを付けたnpm packageにも、同じレビュー済みビルドが入っています。
|
|
76
84
|
|
|
77
85
|
```bash
|
|
78
|
-
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.
|
|
86
|
+
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.5.1
|
|
79
87
|
```
|
|
80
88
|
|
|
81
89
|
`node_modules/@kubohiroya/turbowarp-asset-cache/dist/asset-cache.js`を読み込むか、version固定の
|
|
82
90
|
CDN URLを使います。
|
|
83
91
|
|
|
84
92
|
```text
|
|
85
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
93
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.5.1/dist/asset-cache.js
|
|
86
94
|
```
|
|
87
95
|
|
|
88
96
|
## クイックスタート
|
|
@@ -121,6 +129,7 @@ assets.releaseAll();
|
|
|
121
129
|
## 開発
|
|
122
130
|
|
|
123
131
|
```bash
|
|
132
|
+
npm install --global corepack@latest
|
|
124
133
|
corepack enable
|
|
125
134
|
pnpm install --frozen-lockfile
|
|
126
135
|
pnpm run check
|
package/README.md
CHANGED
|
@@ -15,6 +15,14 @@ session-backing APIs directly from `@kubohiroya/turbowarp-kvs`. Standalone proje
|
|
|
15
15
|
replace the extension ID `kubohiroyaassetmanager` with `kubohiroyaassetcache`; published historical
|
|
16
16
|
SB3 artifacts should remain pinned to their original extension.
|
|
17
17
|
|
|
18
|
+
## Minimal demo
|
|
19
|
+
|
|
20
|
+
[Open in TurboWarp Editor](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-asset-cache%2Fsamples%2Fshow-cached-svg.sb3) · [Download SB3](https://kubohiroya.github.io/turbowarp-asset-cache/samples/show-cached-svg.sb3)
|
|
21
|
+
|
|
22
|
+
Click the green flag to register and display the sample-owned SVG star; `Result` becomes true. Press Space to restore the costume and remove only this sample asset from memory and cache; `Result` becomes false.
|
|
23
|
+
|
|
24
|
+
In the official TurboWarp Editor, enable **Run extension without sandbox** and choose **Allow**. The SB3 embeds this repository’s distributed JavaScript. The SVG is fetched from the same GitHub Pages site; no additional extension is required.
|
|
25
|
+
|
|
18
26
|
## User Guide
|
|
19
27
|
|
|
20
28
|
For setup, safety notes, recipes, and the illustrated block guide, see the [English user guide](https://kubohiroya.github.io/turbowarp-asset-cache/) or [Japanese user guide](https://kubohiroya.github.io/turbowarp-asset-cache/ja/).
|
|
@@ -41,7 +49,7 @@ Standalone use requires TurboWarp Desktop or another TurboWarp environment that
|
|
|
41
49
|
|
|
42
50
|
SVG input is reject-by-default, remote binary cache entries are size/content-type/SHA-256 verified before storage, and IndexedDB is treated as an auxiliary cache rather than a secrecy boundary.
|
|
43
51
|
|
|
44
|
-
Maintainers use Node.js
|
|
52
|
+
Maintainers use Node.js 24 or later with pnpm through Corepack. The package version in `package.json` is the source of truth for install examples and CDN URLs.
|
|
45
53
|
|
|
46
54
|
## Security dialog description language
|
|
47
55
|
|
|
@@ -58,13 +66,13 @@ The built JavaScript file is committed to this repository so users do not need t
|
|
|
58
66
|
The versioned npm package contains the same reviewed build:
|
|
59
67
|
|
|
60
68
|
```bash
|
|
61
|
-
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.
|
|
69
|
+
pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.5.1
|
|
62
70
|
```
|
|
63
71
|
|
|
64
72
|
Load `node_modules/@kubohiroya/turbowarp-asset-cache/dist/asset-cache.js`, or use the version-pinned CDN URL:
|
|
65
73
|
|
|
66
74
|
```text
|
|
67
|
-
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.
|
|
75
|
+
https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.5.1/dist/asset-cache.js
|
|
68
76
|
```
|
|
69
77
|
|
|
70
78
|
## Quick Start
|
|
@@ -99,6 +107,7 @@ assets.releaseAll();
|
|
|
99
107
|
## Development
|
|
100
108
|
|
|
101
109
|
```bash
|
|
110
|
+
npm install --global corepack@latest
|
|
102
111
|
corepack enable
|
|
103
112
|
pnpm install --frozen-lockfile
|
|
104
113
|
pnpm run check
|
package/dist/asset-cache.js
CHANGED
|
@@ -721,7 +721,7 @@ var block_definitions_default = {
|
|
|
721
721
|
]
|
|
722
722
|
};
|
|
723
723
|
//#endregion
|
|
724
|
-
//#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.
|
|
724
|
+
//#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.4.0_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
|
|
725
725
|
var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
|
|
726
726
|
var invalidNumber = Object.freeze({
|
|
727
727
|
kind: "invalid",
|
|
@@ -1118,7 +1118,7 @@ function fixedInputRegistration(scratch) {
|
|
|
1118
1118
|
};
|
|
1119
1119
|
}
|
|
1120
1120
|
//#endregion
|
|
1121
|
-
//#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.
|
|
1121
|
+
//#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.6.1/node_modules/@kubohiroya/turbowarp-named-data/dist/composition.js
|
|
1122
1122
|
var NAMED_DATA_REGISTRY_SYMBOL_KEY = "@kubohiroya/turbowarp-named-data/registry";
|
|
1123
1123
|
var NAMED_DATA_REGISTRY_SYMBOL = Symbol.for(NAMED_DATA_REGISTRY_SYMBOL_KEY);
|
|
1124
1124
|
var NAMED_DATA_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/u;
|
package/dist/composition.js
CHANGED
|
@@ -710,7 +710,7 @@ var block_definitions_default = {
|
|
|
710
710
|
]
|
|
711
711
|
};
|
|
712
712
|
//#endregion
|
|
713
|
-
//#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.
|
|
713
|
+
//#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.4.0_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
|
|
714
714
|
var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
|
|
715
715
|
var invalidNumber = Object.freeze({
|
|
716
716
|
kind: "invalid",
|
|
@@ -1107,7 +1107,7 @@ function fixedInputRegistration(scratch) {
|
|
|
1107
1107
|
};
|
|
1108
1108
|
}
|
|
1109
1109
|
//#endregion
|
|
1110
|
-
//#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.
|
|
1110
|
+
//#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.6.1/node_modules/@kubohiroya/turbowarp-named-data/dist/composition.js
|
|
1111
1111
|
var NAMED_DATA_REGISTRY_SYMBOL_KEY = "@kubohiroya/turbowarp-named-data/registry";
|
|
1112
1112
|
var NAMED_DATA_REGISTRY_SYMBOL = Symbol.for(NAMED_DATA_REGISTRY_SYMBOL_KEY);
|
|
1113
1113
|
var NAMED_DATA_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/u;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-asset-cache",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A browser-local image, audio, and runtime-text asset cache for TurboWarp projects.",
|
|
5
5
|
"author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
|
|
6
6
|
"type": "module",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"access": "public",
|
|
37
37
|
"registry": "https://registry.npmjs.org/"
|
|
38
38
|
},
|
|
39
|
-
"packageManager": "pnpm@11.
|
|
39
|
+
"packageManager": "pnpm@11.28.8",
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
41
|
+
"node": ">=24"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "vite build --watch",
|
|
@@ -60,15 +60,18 @@
|
|
|
60
60
|
"archive:check": "node scripts/check-github-archive.ts",
|
|
61
61
|
"pack:check": "npm pack --dry-run --ignore-scripts",
|
|
62
62
|
"release:check": "npm publish --dry-run --access public",
|
|
63
|
-
"check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run build && pnpm run test:browser:opfs && pnpm run types:composition:check && pnpm run docs:check && pnpm run docs:site:check && pnpm run check:dist && pnpm run archive:check && pnpm run repo:check && pnpm run pack:check",
|
|
64
|
-
"prepack": "pnpm run build"
|
|
63
|
+
"check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run build && pnpm run test:browser:opfs && pnpm run types:composition:check && pnpm run docs:check && pnpm run docs:site:check && pnpm run check:dist && pnpm run archive:check && pnpm run repo:check && pnpm run pack:check && pnpm run samples:check",
|
|
64
|
+
"prepack": "pnpm run build",
|
|
65
|
+
"samples:build": "node scripts/build-samples.mjs",
|
|
66
|
+
"samples:check": "node scripts/build-samples.mjs --check && node --test scripts/verify-samples.mjs",
|
|
67
|
+
"pages:build": "node scripts/prepare-pages.mjs"
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
70
|
"@eslint/js": "^9.39.5",
|
|
68
|
-
"@kubohiroya/turbowarp-extension-data-editor": "^0.
|
|
69
|
-
"@kubohiroya/turbowarp-extension-manifest": "^0.
|
|
70
|
-
"@kubohiroya/turbowarp-named-data": "^0.
|
|
71
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.
|
|
71
|
+
"@kubohiroya/turbowarp-extension-data-editor": "^0.4.0",
|
|
72
|
+
"@kubohiroya/turbowarp-extension-manifest": "^0.4.0",
|
|
73
|
+
"@kubohiroya/turbowarp-named-data": "^0.6.1",
|
|
74
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.9.0",
|
|
72
75
|
"@types/node": "^22.20.1",
|
|
73
76
|
"@xmldom/xmldom": "0.9.11",
|
|
74
77
|
"eslint": "^9.39.5",
|
|
@@ -79,7 +82,7 @@
|
|
|
79
82
|
"vitest": "^4.1.10"
|
|
80
83
|
},
|
|
81
84
|
"peerDependencies": {
|
|
82
|
-
"@kubohiroya/turbowarp-named-data": "^0.
|
|
85
|
+
"@kubohiroya/turbowarp-named-data": "^0.6.0"
|
|
83
86
|
},
|
|
84
87
|
"keywords": [
|
|
85
88
|
"turbowarp",
|