@mirage-x/mirror 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.ja.md +28 -0
- package/README.md +27 -2
- package/assets/core/ResFeedback.brson +0 -0
- package/assets/frame/installFrame/ResFeedback.brson +0 -0
- package/assets/frame/simpleFrame/ResFeedback.brson +0 -0
- package/dist/assets.d.ts +7 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +8 -0
- package/dist/assets.js.map +1 -0
- package/dist/build.d.ts +49 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +79 -0
- package/dist/build.js.map +1 -0
- package/dist/compareOutput.d.ts +8 -0
- package/dist/compareOutput.d.ts.map +1 -0
- package/dist/compareOutput.js +16 -0
- package/dist/compareOutput.js.map +1 -0
- package/dist/feedback/attachCoreAndFrames.d.ts +15 -0
- package/dist/feedback/attachCoreAndFrames.d.ts.map +1 -0
- package/dist/feedback/attachCoreAndFrames.js +71 -0
- package/dist/feedback/attachCoreAndFrames.js.map +1 -0
- package/dist/feedback/attachUnits.d.ts +15 -0
- package/dist/feedback/attachUnits.d.ts.map +1 -0
- package/dist/feedback/attachUnits.js +44 -0
- package/dist/feedback/attachUnits.js.map +1 -0
- package/dist/feedback/feedbackFile.d.ts +14 -0
- package/dist/feedback/feedbackFile.d.ts.map +1 -0
- package/dist/feedback/feedbackFile.js +22 -0
- package/dist/feedback/feedbackFile.js.map +1 -0
- package/dist/feedback/fetchFeedback.d.ts +11 -0
- package/dist/feedback/fetchFeedback.d.ts.map +1 -0
- package/dist/feedback/fetchFeedback.js +48 -0
- package/dist/feedback/fetchFeedback.js.map +1 -0
- package/dist/feedback/fetchUtil.d.ts +16 -0
- package/dist/feedback/fetchUtil.d.ts.map +1 -0
- package/dist/feedback/fetchUtil.js +40 -0
- package/dist/feedback/fetchUtil.js.map +1 -0
- package/dist/feedback/index.d.ts +8 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +5 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/feedback/sanitize.d.ts +14 -0
- package/dist/feedback/sanitize.d.ts.map +1 -0
- package/dist/feedback/sanitize.js +82 -0
- package/dist/feedback/sanitize.js.map +1 -0
- package/dist/feedback/staging.d.ts +28 -0
- package/dist/feedback/staging.d.ts.map +1 -0
- package/dist/feedback/staging.js +49 -0
- package/dist/feedback/staging.js.map +1 -0
- package/dist/frame/fromFeedback.d.ts +8 -0
- package/dist/frame/fromFeedback.d.ts.map +1 -0
- package/dist/frame/fromFeedback.js +13 -0
- package/dist/frame/fromFeedback.js.map +1 -0
- package/dist/frame/installFrame/index.d.ts +19 -0
- package/dist/frame/installFrame/index.d.ts.map +1 -0
- package/dist/frame/installFrame/index.js +27 -0
- package/dist/frame/installFrame/index.js.map +1 -0
- package/dist/frame/placeCore.d.ts +24 -0
- package/dist/frame/placeCore.d.ts.map +1 -0
- package/dist/frame/placeCore.js +46 -0
- package/dist/frame/placeCore.js.map +1 -0
- package/dist/frame/simpleFrame/index.d.ts +18 -0
- package/dist/frame/simpleFrame/index.d.ts.map +1 -0
- package/dist/frame/simpleFrame/index.js +29 -0
- package/dist/frame/simpleFrame/index.js.map +1 -0
- package/dist/frdt/util.d.ts +53 -0
- package/dist/frdt/util.d.ts.map +1 -0
- package/dist/frdt/util.js +117 -0
- package/dist/frdt/util.js.map +1 -0
- package/dist/frdt/versions.d.ts +44 -0
- package/dist/frdt/versions.d.ts.map +1 -0
- package/dist/frdt/versions.js +134 -0
- package/dist/frdt/versions.js.map +1 -0
- package/dist/generateClient.d.ts +36 -0
- package/dist/generateClient.d.ts.map +1 -0
- package/dist/generateClient.js +63 -0
- package/dist/generateClient.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/unit/generateMirrorUnitFromFeedback.d.ts +25 -0
- package/dist/unit/generateMirrorUnitFromFeedback.d.ts.map +1 -0
- package/dist/unit/generateMirrorUnitFromFeedback.js +158 -0
- package/dist/unit/generateMirrorUnitFromFeedback.js.map +1 -0
- package/package.json +57 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rheniumNV
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[English](https://github.com/rheniumNV/mirage-x/blob/master/packages/mirror/README.md) | [日本語](https://github.com/rheniumNV/mirage-x/blob/master/packages/mirror/README.ja.md)
|
|
2
|
+
|
|
3
|
+
# @mirage-x/mirror
|
|
4
|
+
|
|
5
|
+
[MirageX](https://github.com/rheniumNV/mirage-x/blob/master/README.ja.md) のビルド時の部分です。MirageX は、WebSocket を介して Unit のツリーを Resonite 側のミラーと同期させるサーバーサイド React フレームワークです。
|
|
6
|
+
|
|
7
|
+
- `build()`: Unit の Resonite 側のテンプレートと、MirageX の core、frame をまとめて、Resonite に置くオブジェクト `output.brson` を作ります
|
|
8
|
+
- `generateMirrorUnitFromFeedback`: Unit のテンプレートを作ります。feedback(`ResFeedback.brson`)があればそれを使います
|
|
9
|
+
- feedback: `fetchFeedback` と `attachUnits` で、Resonite で作り込んだ Unit をプロジェクトに取り込みます
|
|
10
|
+
- 同梱の core と frame(`generateSimpleFrame`、`generateInstallFrame`)と、独自の frame の feedback から作る frame(`generateSimpleFrameFromFeedback`、`generateInstallFrameFromFeedback`、`placeCore`)
|
|
11
|
+
|
|
12
|
+
文書の読み書きには [`@frdt/frdt`](https://www.npmjs.com/package/@frdt/frdt) を使っています。`@mirage-x/server` には依存しないので、ビルドする環境にサーバーの依存は要りません。
|
|
13
|
+
|
|
14
|
+
MirageX は 3 つのパッケージで公開していて、一緒に使います。[`@mirage-x/core`](https://www.npmjs.com/package/@mirage-x/core)(共有する Unit の定義)、[`@mirage-x/server`](https://www.npmjs.com/package/@mirage-x/server)(実行時)、[`@mirage-x/mirror`](https://www.npmjs.com/package/@mirage-x/mirror)(ビルド時)です。**使い方は [MirageX の README](https://github.com/rheniumNV/mirage-x/blob/master/README.ja.md) を見てください**。完成したアプリの例は [`examples/basic`](https://github.com/rheniumNV/mirage-x/tree/master/examples/basic) にあります。
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @mirage-x/core @mirage-x/server @mirage-x/mirror react@19
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Node.js 22 以上、ESM のみです。3 つのパッケージはバージョンを揃えてください。
|
|
21
|
+
|
|
22
|
+
## ライセンス
|
|
23
|
+
|
|
24
|
+
MIT
|
|
25
|
+
|
|
26
|
+
## 生成 AI を使った開発
|
|
27
|
+
|
|
28
|
+
このプロジェクトは、生成 AI のコーディングツールを使って開発しています。変更はメンテナーが確認し、Resonite での動作も含めてテストしています。
|
package/README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
[English](https://github.com/rheniumNV/mirage-x/blob/master/packages/mirror/README.md) | [日本語](https://github.com/rheniumNV/mirage-x/blob/master/packages/mirror/README.ja.md)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @mirage-x/mirror
|
|
4
|
+
|
|
5
|
+
The build-time part of [MirageX](https://github.com/rheniumNV/mirage-x#readme), a server-side React framework that syncs a Unit tree to a Resonite-side mirror over WebSocket.
|
|
6
|
+
|
|
7
|
+
- `build()`: assembles your Units' Resonite templates, the MirageX core and a frame into `output.brson`, the object you place in Resonite
|
|
8
|
+
- `generateMirrorUnitFromFeedback`: a Unit's template, from its feedback (`ResFeedback.brson`) when there is one
|
|
9
|
+
- Feedback: `fetchFeedback` and `attachUnits` pull the Units you shaped in Resonite back into your project
|
|
10
|
+
- The bundled core and frames (`generateSimpleFrame`, `generateInstallFrame`), and your own frames from their feedback (`generateSimpleFrameFromFeedback`, `generateInstallFrameFromFeedback`, `placeCore`)
|
|
11
|
+
|
|
12
|
+
Documents are read and written with [`@frdt/frdt`](https://www.npmjs.com/package/@frdt/frdt). It does not depend on `@mirage-x/server`, so a build environment does not need the server's dependencies.
|
|
13
|
+
|
|
14
|
+
MirageX is published as three packages, used together: [`@mirage-x/core`](https://www.npmjs.com/package/@mirage-x/core) (shared Unit definitions), [`@mirage-x/server`](https://www.npmjs.com/package/@mirage-x/server) (run time) and [`@mirage-x/mirror`](https://www.npmjs.com/package/@mirage-x/mirror) (build time). **See the [MirageX README](https://github.com/rheniumNV/mirage-x#readme) for how to use them**, and [`examples/basic`](https://github.com/rheniumNV/mirage-x/tree/master/examples/basic) for a complete app.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @mirage-x/core @mirage-x/server @mirage-x/mirror react@19
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Node.js 22 or later, ESM only. Keep the three packages at the same version.
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
|
|
24
|
+
MIT
|
|
25
|
+
|
|
26
|
+
## Development with generative AI
|
|
27
|
+
|
|
28
|
+
This project is developed with generative AI coding tools. Changes are reviewed and tested by the maintainer, including in Resonite.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/assets.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Absolute path of a file shipped under `packages/mirror/assets/`.
|
|
3
|
+
* `src/assets.ts` and `dist/assets.js` sit at the same depth, so this works
|
|
4
|
+
* both from source (tsx) and from the published build.
|
|
5
|
+
*/
|
|
6
|
+
export declare const assetPath: (relative: string) => string;
|
|
7
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,UAAU,MAAM,KAAG,MACqB,CAAC"}
|
package/dist/assets.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
/**
|
|
3
|
+
* Absolute path of a file shipped under `packages/mirror/assets/`.
|
|
4
|
+
* `src/assets.ts` and `dist/assets.js` sit at the same depth, so this works
|
|
5
|
+
* both from source (tsx) and from the published build.
|
|
6
|
+
*/
|
|
7
|
+
export const assetPath = (relative) => fileURLToPath(new URL(`../assets/${relative}`, import.meta.url));
|
|
8
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAgB,EAAU,EAAE,CACpD,aAAa,CAAC,IAAI,GAAG,CAAC,aAAa,QAAQ,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { VersionSource } from "./frdt/versions.js";
|
|
2
|
+
import { type GenerateFrame, type MirrorUnits } from "./generateClient.js";
|
|
3
|
+
export declare const VERSION_VARIABLE = "Env.Version.Current";
|
|
4
|
+
export type BuildConfig = {
|
|
5
|
+
appCode: string;
|
|
6
|
+
cv: {
|
|
7
|
+
mirage: {
|
|
8
|
+
host: {
|
|
9
|
+
path: string;
|
|
10
|
+
ownerId: string;
|
|
11
|
+
fallback: string;
|
|
12
|
+
};
|
|
13
|
+
useSsl: {
|
|
14
|
+
path: string;
|
|
15
|
+
fallback: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
outputPath: string;
|
|
20
|
+
hostAccessReason?: {
|
|
21
|
+
ja: string;
|
|
22
|
+
en: string;
|
|
23
|
+
ko: string;
|
|
24
|
+
};
|
|
25
|
+
resetOnSave?: boolean;
|
|
26
|
+
developCode?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Where the output's `VersionNumber` and `FeatureFlags` come from.
|
|
29
|
+
* `"oldest"` (default): the oldest of the core's, the frame's and the
|
|
30
|
+
* Units', with the flags all of them have. `"frame"`: the frame's.
|
|
31
|
+
*/
|
|
32
|
+
versionSource?: VersionSource;
|
|
33
|
+
};
|
|
34
|
+
export type BuildResult = {
|
|
35
|
+
/** false when the output is the same as the previous build. */
|
|
36
|
+
changed: boolean;
|
|
37
|
+
/** The version in `version.json` after this build. */
|
|
38
|
+
version: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Build `output.brson` (and `version.json`) under `config.outputPath`.
|
|
42
|
+
*
|
|
43
|
+
* Ids are renumbered from a fixed seed, so the same inputs give the same
|
|
44
|
+
* bytes. The output is compared with the previous one as built with the
|
|
45
|
+
* previous version string; when nothing else changed, nothing is written and
|
|
46
|
+
* the version stays (connected clients are not asked to reload).
|
|
47
|
+
*/
|
|
48
|
+
export declare const build: (config: BuildConfig, units: MirrorUnits, generateFrame: GenerateFrame) => Promise<BuildResult>;
|
|
49
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE;QACF,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM,CAAC;gBACb,OAAO,EAAE,MAAM,CAAC;gBAChB,QAAQ,EAAE,MAAM,CAAC;aAClB,CAAC;YACF,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC;gBACb,QAAQ,EAAE,OAAO,CAAC;aACnB,CAAC;SACH,CAAC;KACH,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqBF;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,GAChB,QAAQ,WAAW,EACnB,OAAO,WAAW,EAClB,eAAe,aAAa,KAC3B,OAAO,CAAC,WAAW,CA4DrB,CAAC"}
|
package/dist/build.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { setVariableValues, str } from "./frdt/util.js";
|
|
4
|
+
import { generateClient, } from "./generateClient.js";
|
|
5
|
+
/** Seed for `renumberIds`, so that the same output writes the same bytes. */
|
|
6
|
+
const ID_SEED = 0;
|
|
7
|
+
export const VERSION_VARIABLE = "Env.Version.Current";
|
|
8
|
+
const readPreviousVersion = (outputPath) => {
|
|
9
|
+
try {
|
|
10
|
+
const version = JSON.parse(fs.readFileSync(path.resolve(outputPath, "version.json"), "utf-8")).version;
|
|
11
|
+
return typeof version === "string" ? version : undefined;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const readPrevious = (file) => {
|
|
18
|
+
try {
|
|
19
|
+
return fs.readFileSync(file);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Build `output.brson` (and `version.json`) under `config.outputPath`.
|
|
27
|
+
*
|
|
28
|
+
* Ids are renumbered from a fixed seed, so the same inputs give the same
|
|
29
|
+
* bytes. The output is compared with the previous one as built with the
|
|
30
|
+
* previous version string; when nothing else changed, nothing is written and
|
|
31
|
+
* the version stays (connected clients are not asked to reload).
|
|
32
|
+
*/
|
|
33
|
+
export const build = async (config, units, generateFrame) => {
|
|
34
|
+
const outputBrsonPath = path.resolve(config.outputPath, "output.brson");
|
|
35
|
+
const previousVersion = readPreviousVersion(config.outputPath);
|
|
36
|
+
const newVersion = `${Date.now()}`;
|
|
37
|
+
console.debug("start generating");
|
|
38
|
+
const output = generateClient({
|
|
39
|
+
appCode: config.appCode,
|
|
40
|
+
hostCVPath: config.cv.mirage.host.path,
|
|
41
|
+
useSSLCVPath: config.cv.mirage.useSsl.path,
|
|
42
|
+
cvOwnerId: config.cv.mirage.host.ownerId,
|
|
43
|
+
fallbackHost: config.cv.mirage.host.fallback,
|
|
44
|
+
fallbackUseSSL: config.cv.mirage.useSsl.fallback,
|
|
45
|
+
// Built with the previous version first, so that it can be compared.
|
|
46
|
+
currentVersion: previousVersion ?? newVersion,
|
|
47
|
+
hostAccessReason: config.hostAccessReason ?? {
|
|
48
|
+
ja: `${config.appCode}を使用するため`,
|
|
49
|
+
en: `for use ${config.appCode}`,
|
|
50
|
+
ko: `${config.appCode}을 사용하기 위해`,
|
|
51
|
+
},
|
|
52
|
+
developCode: config.developCode,
|
|
53
|
+
resetOnSave: config.resetOnSave ?? true,
|
|
54
|
+
units,
|
|
55
|
+
generateFrame,
|
|
56
|
+
versionSource: config.versionSource,
|
|
57
|
+
});
|
|
58
|
+
output.renumberIds(ID_SEED);
|
|
59
|
+
console.debug("end generating");
|
|
60
|
+
const previous = readPrevious(outputBrsonPath);
|
|
61
|
+
if (previousVersion && previous?.equals(output.writeBrson())) {
|
|
62
|
+
console.info("no change in output");
|
|
63
|
+
return { changed: false, version: previousVersion };
|
|
64
|
+
}
|
|
65
|
+
if (previousVersion) {
|
|
66
|
+
// Values only; ids and structure stay the same. Only MirageX's ENV
|
|
67
|
+
// slots (frame and core), not variables of the same name in units.
|
|
68
|
+
const updated = setVariableValues(output, VERSION_VARIABLE, str(newVersion), (slot) => slot.name() === "ENV");
|
|
69
|
+
if (updated === 0) {
|
|
70
|
+
throw new Error(`${VERSION_VARIABLE} not found in the ENV slots; the version cannot be updated`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
fs.mkdirSync(config.outputPath, { recursive: true });
|
|
74
|
+
fs.writeFileSync(outputBrsonPath, output.writeBrson());
|
|
75
|
+
fs.writeFileSync(path.resolve(config.outputPath, "version.json"), JSON.stringify({ version: newVersion }, null, 2));
|
|
76
|
+
console.info(`generated version ${newVersion}`);
|
|
77
|
+
return { changed: true, version: newVersion };
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EACL,cAAc,GAGf,MAAM,qBAAqB,CAAC;AAE7B,6EAA6E;AAC7E,MAAM,OAAO,GAAG,CAAC,CAAC;AAClB,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAwCtD,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAsB,EAAE;IACrE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CACnE,CAAC,OAAO,CAAC;QACV,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAY,EAAsB,EAAE;IACxD,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC;AA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AU,EAAE,CAAC;AAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Document, type Difference } from "@frdt/frdt";
|
|
2
|
+
/**
|
|
3
|
+
* Compare two `build` outputs by structure and values (frdt `compare`: ids
|
|
4
|
+
* are not compared), ignoring the app version `build` writes into ENV.
|
|
5
|
+
* An empty result means the outputs are the same apart from that.
|
|
6
|
+
*/
|
|
7
|
+
export declare const compareOutput: (expected: Document, actual: Document) => Difference[];
|
|
8
|
+
//# sourceMappingURL=compareOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareOutput.d.ts","sourceRoot":"","sources":["../src/compareOutput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAiBhE;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,UAAU,QAAQ,EAClB,QAAQ,QAAQ,KACf,UAAU,EACoD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Document, compare } from "@frdt/frdt";
|
|
2
|
+
import { VERSION_VARIABLE } from "./build.js";
|
|
3
|
+
import { setVariableValues, str } from "./frdt/util.js";
|
|
4
|
+
/** A copy of `doc` with the app version in MirageX's ENV slots cleared. */
|
|
5
|
+
const withoutAppVersion = (doc) => {
|
|
6
|
+
const copy = Document.open(doc.writeBrson());
|
|
7
|
+
setVariableValues(copy, VERSION_VARIABLE, str(""), (slot) => slot.name() === "ENV");
|
|
8
|
+
return copy;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Compare two `build` outputs by structure and values (frdt `compare`: ids
|
|
12
|
+
* are not compared), ignoring the app version `build` writes into ENV.
|
|
13
|
+
* An empty result means the outputs are the same apart from that.
|
|
14
|
+
*/
|
|
15
|
+
export const compareOutput = (expected, actual) => compare(withoutAppVersion(expected), withoutAppVersion(actual));
|
|
16
|
+
//# sourceMappingURL=compareOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareOutput.js","sourceRoot":"","sources":["../src/compareOutput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAmB,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAExD,2EAA2E;AAC3E,MAAM,iBAAiB,GAAG,CAAC,GAAa,EAAY,EAAE;IACpD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC7C,iBAAiB,CACf,IAAI,EACJ,gBAAgB,EAChB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,CAChC,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,QAAkB,EAClB,MAAgB,EACF,EAAE,CAChB,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AttachFeedbackPaths = {
|
|
2
|
+
/** Directory holding the fetched feedback (`ResFeedbackOriginal.brson`). */
|
|
3
|
+
inputPath: string;
|
|
4
|
+
/** Directory to write `ResFeedback.brson` / `ResFeedbackMeta.json` to. */
|
|
5
|
+
outputPath: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The core: the `Main` slot under `Static.AppRoot`, with its root being
|
|
9
|
+
* AppRoot, and without the environment (`Main/DV/ENV`) and the units
|
|
10
|
+
* (children of `Main/Package`), which are generated by the build.
|
|
11
|
+
*/
|
|
12
|
+
export declare const attachCore: (option: AttachFeedbackPaths) => void;
|
|
13
|
+
export declare const attachSimpleFrame: (option: AttachFeedbackPaths) => void;
|
|
14
|
+
export declare const attachInstallFrame: (option: AttachFeedbackPaths) => void;
|
|
15
|
+
//# sourceMappingURL=attachCoreAndFrames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachCoreAndFrames.d.ts","sourceRoot":"","sources":["../../src/feedback/attachCoreAndFrames.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,mBAAmB,GAAG;IAChC,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,mBAAmB,KAAG,IAmBxD,CAAC;AA0CF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,mBAAmB,KAAG,IAM/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,mBAAmB,KAAG,IAMhE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { requireChild, requireReference, stringOf, variableIndex } from "../frdt/util.js";
|
|
2
|
+
import { extractPart, readStagedFeedback, readStagedMeta, writePart, } from "./staging.js";
|
|
3
|
+
/** The slot the root's `Static.AppRoot` points at. */
|
|
4
|
+
const appRootOf = (doc) => doc.slotById(requireReference(doc.root(), "Static.AppRoot"));
|
|
5
|
+
/**
|
|
6
|
+
* The core: the `Main` slot under `Static.AppRoot`, with its root being
|
|
7
|
+
* AppRoot, and without the environment (`Main/DV/ENV`) and the units
|
|
8
|
+
* (children of `Main/Package`), which are generated by the build.
|
|
9
|
+
*/
|
|
10
|
+
export const attachCore = (option) => {
|
|
11
|
+
const doc = readStagedFeedback(option.inputPath);
|
|
12
|
+
const appRoot = appRootOf(doc);
|
|
13
|
+
const main = requireChild(appRoot, "Main");
|
|
14
|
+
for (const child of appRoot.children()) {
|
|
15
|
+
if (child.id() !== main.id())
|
|
16
|
+
doc.removeSlot(child);
|
|
17
|
+
}
|
|
18
|
+
doc.removeSlot(requireChild(requireChild(main, "DV"), "ENV"));
|
|
19
|
+
for (const child of requireChild(main, "Package").children()) {
|
|
20
|
+
doc.removeSlot(child);
|
|
21
|
+
}
|
|
22
|
+
writePart({
|
|
23
|
+
outputDir: option.outputPath,
|
|
24
|
+
part: extractPart(doc, appRoot),
|
|
25
|
+
meta: readStagedMeta(option.inputPath),
|
|
26
|
+
label: "core",
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A frame: the whole feedback without the core (`AppRoot/Main`) and the
|
|
31
|
+
* environment (`DV/ENV`). Skipped with a warning when the feedback is a
|
|
32
|
+
* different frame (`Static.FrameCode`).
|
|
33
|
+
*/
|
|
34
|
+
const attachFrame = (option) => {
|
|
35
|
+
const doc = readStagedFeedback(option.inputPath);
|
|
36
|
+
const root = doc.root();
|
|
37
|
+
const frameCodeIndex = variableIndex(root, "Static.FrameCode");
|
|
38
|
+
const frameCode = frameCodeIndex < 0
|
|
39
|
+
? null
|
|
40
|
+
: stringOf(root.tryComponentValue(frameCodeIndex, "Value"));
|
|
41
|
+
if (!frameCode) {
|
|
42
|
+
throw new Error("Static.FrameCode not found");
|
|
43
|
+
}
|
|
44
|
+
if (frameCode !== option.expectedFrameCode) {
|
|
45
|
+
console.warn(`FrameCode is not ${option.expectedFrameCode}. FrameCode: ${frameCode}`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
doc.removeSlot(requireChild(appRootOf(doc), "Main"));
|
|
49
|
+
doc.removeSlot(requireChild(requireChild(root, "DV"), "ENV"));
|
|
50
|
+
writePart({
|
|
51
|
+
outputDir: option.outputPath,
|
|
52
|
+
part: extractPart(doc, root),
|
|
53
|
+
meta: readStagedMeta(option.inputPath),
|
|
54
|
+
label: option.label,
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
export const attachSimpleFrame = (option) => {
|
|
58
|
+
attachFrame({
|
|
59
|
+
...option,
|
|
60
|
+
expectedFrameCode: "Simple",
|
|
61
|
+
label: "simple frame",
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
export const attachInstallFrame = (option) => {
|
|
65
|
+
attachFrame({
|
|
66
|
+
...option,
|
|
67
|
+
expectedFrameCode: "InstalledAvatar",
|
|
68
|
+
label: "install frame",
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=attachCoreAndFrames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachCoreAndFrames.js","sourceRoot":"","sources":["../../src/feedback/attachCoreAndFrames.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,SAAS,GACV,MAAM,cAAc,CAAC;AAStB,sDAAsD;AACtD,MAAM,SAAS,GAAG,CAAC,GAAa,EAAE,EAAE,CAClC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAA2B,EAAQ,EAAE;IAC9D,MAAM,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAE3C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACvC,IAAI,KAAK,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,EAAE,EAAE;YAAE,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IACD,GAAG,CA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,CAAC,CAAC;IACrD,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAE9D,SAAS,CAAC;QACR,SAAS,EAAE,MAAM,CAAC,UAAU;QAC5B,IAAI,EAAE,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC;QAC5B,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAA2B,EAAQ,EAAE;IACrE,WAAW,CAAC;QACV,GAAG,MAAM;QACT,iBAAiB,EAAE,QAAQ;QAC3B,KAAK,EAAE,cAAc;KACtB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAA2B,EAAQ,EAAE;IACtE,WAAW,CAAC;QACV,GAAG,MAAM;QACT,iBAAiB,EAAE,iBAAiB;QACpC,KAAK,EAAE,eAAe;KACvB,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AttachUnitsOptions = {
|
|
2
|
+
/** Directory holding the fetched feedback (`ResFeedbackOriginal.brson`). */
|
|
3
|
+
feedbackDir: string;
|
|
4
|
+
/** Root of unit packages (e.g. examples/basic/src/unit) */
|
|
5
|
+
unitsRoot: string;
|
|
6
|
+
/** Full regex for `Package/Unit` (e.g. `PrimitiveUix/PrimitiveImage` or `PrimitiveUix/.+`) */
|
|
7
|
+
matchPattern: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Write each matching unit's part of the feedback
|
|
11
|
+
* (`AppRoot/Main/Package/<package>/<package>/<unit>`) to
|
|
12
|
+
* `<unitsRoot>/<package>/<unit>/ResFeedback.brson`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const attachUnits: (options: AttachUnitsOptions) => void;
|
|
15
|
+
//# sourceMappingURL=attachUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachUnits.d.ts","sourceRoot":"","sources":["../../src/feedback/attachUnits.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAOF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,kBAAkB,KAAG,IA4CzD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { childNamed, requireChild, requireReference } from "../frdt/util.js";
|
|
4
|
+
import { extractPart, readStagedFeedback, readStagedMeta, writePart, } from "./staging.js";
|
|
5
|
+
const directories = (dir) => fs
|
|
6
|
+
.readdirSync(dir)
|
|
7
|
+
.filter((name) => fs.statSync(path.resolve(dir, name)).isDirectory());
|
|
8
|
+
/**
|
|
9
|
+
* Write each matching unit's part of the feedback
|
|
10
|
+
* (`AppRoot/Main/Package/<package>/<package>/<unit>`) to
|
|
11
|
+
* `<unitsRoot>/<package>/<unit>/ResFeedback.brson`.
|
|
12
|
+
*/
|
|
13
|
+
export const attachUnits = (options) => {
|
|
14
|
+
const unitFilterRegex = new RegExp(`^${options.matchPattern}$`);
|
|
15
|
+
console.info(`matchPattern=${options.matchPattern}`);
|
|
16
|
+
const doc = readStagedFeedback(options.feedbackDir);
|
|
17
|
+
const meta = readStagedMeta(options.feedbackDir);
|
|
18
|
+
if (meta === undefined) {
|
|
19
|
+
throw new Error(`Missing meta in ${options.feedbackDir}. Run feedback:fetch first.`);
|
|
20
|
+
}
|
|
21
|
+
const packageSlot = requireChild(requireChild(doc.slotById(requireReference(doc.root(), "Static.AppRoot")), "Main"), "Package");
|
|
22
|
+
const targets = directories(options.unitsRoot).flatMap((packageName) => directories(path.resolve(options.unitsRoot, packageName)).map((unit) => ({
|
|
23
|
+
packageName,
|
|
24
|
+
unit,
|
|
25
|
+
code: `${packageName}/${unit}`,
|
|
26
|
+
})));
|
|
27
|
+
const matched = targets.filter(({ code }) => unitFilterRegex.test(code));
|
|
28
|
+
console.log("unit:", matched.length, "/", targets.length);
|
|
29
|
+
for (const { packageName, unit, code } of matched) {
|
|
30
|
+
const pkg = childNamed(packageSlot, packageName);
|
|
31
|
+
const unitSlot = pkg && childNamed(pkg, code);
|
|
32
|
+
if (!unitSlot) {
|
|
33
|
+
console.info(`not found ${code}`);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
writePart({
|
|
37
|
+
outputDir: path.resolve(options.unitsRoot, packageName, unit),
|
|
38
|
+
part: extractPart(doc, unitSlot),
|
|
39
|
+
meta,
|
|
40
|
+
label: code,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=attachUnits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachUnits.js","sourceRoot":"","sources":["../../src/feedback/attachUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,SAAS,GACV,MAAM,cAAc,CAAC;AAWtB,MAAM,WAAW,GAAG,CAAC,GAAW,EAAY,EAAE,CAC5C,EAAE;KACC,WAAW,CAAC,GAAG,CAAC;KAChB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAA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G,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1D,KAAK,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,OAAO,EAAE,CAAC;QAClD,MAAM,GAAG,GAAG,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACjD,MAAM,QAAQ,GAAG,GAAG,IAAI,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;YAClC,SAAS;QACX,CAAC;QACD,SAAS,CAAC;YACR,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,CAAC;YAC7D,IAAI,EAAE,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC;YAChC,IAAI;YACJ,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Document } from "@frdt/frdt";
|
|
2
|
+
/** Feedback parts (core / frames / units) are stored as Resonite `.brson`. */
|
|
3
|
+
export type FeedbackFile = string | URL;
|
|
4
|
+
export declare const readFeedback: (file: FeedbackFile) => Document;
|
|
5
|
+
/** Like `readFeedback`, but `undefined` when the file does not exist. */
|
|
6
|
+
export declare const readFeedbackIfExists: (file: FeedbackFile) => Document | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Write a feedback part unless the file already holds the same content
|
|
9
|
+
* (compared by structure with frdt `compare`, so ids do not matter).
|
|
10
|
+
* Returns whether the file was written.
|
|
11
|
+
*/
|
|
12
|
+
export declare const writeFeedbackIfChanged: (file: FeedbackFile, feedback: Document) => boolean;
|
|
13
|
+
export declare const writeFeedback: (file: FeedbackFile, feedback: Document) => void;
|
|
14
|
+
//# sourceMappingURL=feedbackFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedbackFile.d.ts","sourceRoot":"","sources":["../../src/feedback/feedbackFile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAW,MAAM,YAAY,CAAC;AAE/C,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,GAAG,CAAC;AAExC,eAAO,MAAM,YAAY,GAAI,MAAM,YAAY,KAAG,QACZ,CAAC;AAEvC,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,GAC/B,MAAM,YAAY,KACjB,QAAQ,GAAG,SACwC,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,YAAY,EAClB,UAAU,QAAQ,KACjB,OASF,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,YAAY,EAAE,UAAU,QAAQ,SAEnE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { Document, compare } from "@frdt/frdt";
|
|
3
|
+
export const readFeedback = (file) => Document.open(fs.readFileSync(file));
|
|
4
|
+
/** Like `readFeedback`, but `undefined` when the file does not exist. */
|
|
5
|
+
export const readFeedbackIfExists = (file) => fs.existsSync(file) ? readFeedback(file) : undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Write a feedback part unless the file already holds the same content
|
|
8
|
+
* (compared by structure with frdt `compare`, so ids do not matter).
|
|
9
|
+
* Returns whether the file was written.
|
|
10
|
+
*/
|
|
11
|
+
export const writeFeedbackIfChanged = (file, feedback) => {
|
|
12
|
+
if (fs.existsSync(file) &&
|
|
13
|
+
compare(readFeedback(file), feedback).length === 0) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
fs.writeFileSync(file, feedback.writeBrson());
|
|
17
|
+
return true;
|
|
18
|
+
};
|
|
19
|
+
export const writeFeedback = (file, feedback) => {
|
|
20
|
+
fs.writeFileSync(file, feedback.writeBrson());
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=feedbackFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedbackFile.js","sourceRoot":"","sources":["../../src/feedback/feedbackFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAK/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAY,EAAE,CAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAEvC,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAkB,EACI,EAAE,CACxB,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,IAAkB,EAClB,QAAkB,EACT,EAAE;IACX,IACE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QACnB,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAClD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAkB,EAAE,QAAkB,EAAE,EAAE;IACtE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;AAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Download the latest object in the Resonite folder `link` to
|
|
3
|
+
* `<outputPath>/ResFeedbackOriginal.brson` as it is, with its record in
|
|
4
|
+
* `ResFeedbackMetaOriginal.json`. Nothing is downloaded when that record is
|
|
5
|
+
* already there.
|
|
6
|
+
*/
|
|
7
|
+
export declare const fetchFeedback: (option: {
|
|
8
|
+
link: string;
|
|
9
|
+
outputPath: string;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
//# sourceMappingURL=fetchFeedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchFeedback.d.ts","sourceRoot":"","sources":["../../src/feedback/fetchFeedback.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAU,QAAQ;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,KAAG,OAAO,CAAC,IAAI,CAmDf,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { Document } from "@frdt/frdt";
|
|
4
|
+
import { getAsset, getRecords, pickLatestObject } from "./fetchUtil.js";
|
|
5
|
+
import { STAGED_FEEDBACK, STAGED_META } from "./staging.js";
|
|
6
|
+
/**
|
|
7
|
+
* Download the latest object in the Resonite folder `link` to
|
|
8
|
+
* `<outputPath>/ResFeedbackOriginal.brson` as it is, with its record in
|
|
9
|
+
* `ResFeedbackMetaOriginal.json`. Nothing is downloaded when that record is
|
|
10
|
+
* already there.
|
|
11
|
+
*/
|
|
12
|
+
export const fetchFeedback = async (option) => {
|
|
13
|
+
const feedbackPath = path.resolve(option.outputPath, STAGED_FEEDBACK);
|
|
14
|
+
const metaPath = path.resolve(option.outputPath, STAGED_META);
|
|
15
|
+
const prevInfo = (() => {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(fs.readFileSync(metaPath, "utf-8"));
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
})();
|
|
23
|
+
const records = await getRecords(option.link);
|
|
24
|
+
const latestObject = pickLatestObject(records);
|
|
25
|
+
if (!latestObject) {
|
|
26
|
+
console.info("not found feedback");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (latestObject.id === prevInfo.id && fs.existsSync(feedbackPath)) {
|
|
30
|
+
console.info("no new feedback", `latestFeedbackTime=${latestObject.creationTime}`);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const bytes = await getAsset(latestObject.assetUri);
|
|
34
|
+
try {
|
|
35
|
+
Document.open(bytes);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
throw new Error(`${latestObject.assetUri} is not a Resonite .brson the feedback can use`, { cause: error });
|
|
39
|
+
}
|
|
40
|
+
fs.mkdirSync(option.outputPath, { recursive: true });
|
|
41
|
+
fs.writeFileSync(feedbackPath, bytes);
|
|
42
|
+
fs.writeFileSync(metaPath, JSON.stringify({
|
|
43
|
+
id: latestObject.id,
|
|
44
|
+
creationTime: latestObject.creationTime,
|
|
45
|
+
}));
|
|
46
|
+
console.info("updated ", `${prevInfo.creationTime ?? "(none)"} --> ${latestObject.creationTime}`);
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=fetchFeedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchFeedback.js","sourceRoot":"","sources":["../../src/feedback/fetchFeedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;;GAKG;AACH,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AE,CACjB,CAAC;IACJ,CAAC;IAED,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACtC,EAAE,CAAC,aAAa,CACd,QAAQ,EACR,IAAI,CAAC,SAAS,CAAC;QACb,EAAE,EAAE,YAAY,CAAC,EAAE;QACnB,YAAY,EAAE,YAAY,CAAC,YAAY;KACxC,CAAC,CACH,CAAC;IACF,OAAO,CAAC,IAAI,CACV,UAAU,EACV,GAAG,QAAQ,CAAC,YAAY,IAAI,QAAQ,QAAQ,YAAY,CAAC,YAAY,EAAE,CACxE,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type RecordInfo = {
|
|
2
|
+
id: string;
|
|
3
|
+
path: string;
|
|
4
|
+
name: string;
|
|
5
|
+
recordType: string;
|
|
6
|
+
ownerType: "users" | "groups";
|
|
7
|
+
ownerId: string;
|
|
8
|
+
creationTime: string;
|
|
9
|
+
assetUri: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const getRecordInfo: (recordLink: string) => Promise<RecordInfo>;
|
|
12
|
+
export declare const getRecords: (recordUrl: string) => Promise<RecordInfo[]>;
|
|
13
|
+
export declare const pickLatestObject: (records: RecordInfo[]) => RecordInfo | undefined;
|
|
14
|
+
/** The bytes of a `resdb:///<id>.brson` asset (a Resonite `.brson`). */
|
|
15
|
+
export declare const getAsset: (assetUri: string) => Promise<Buffer>;
|
|
16
|
+
//# sourceMappingURL=fetchUtil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchUtil.d.ts","sourceRoot":"","sources":["../../src/feedback/fetchUtil.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,KACjB,OAAO,CAAC,UAAU,CAwBpB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,UAAU,EAAE,CASxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,SAAS,UAAU,EAAE,KACpB,UAAU,GAAG,SAKf,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,QAAQ,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAY/D,CAAC"}
|