acrylblends 1.0.10 → 1.1.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/dist/index.d.ts +15 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/docs/framework/api/summary.md +1 -1
- package/docs/framework/guides/production.md +20 -0
- package/docs/framework/workshop/README.md +177 -274
- package/docs/framework/workshop/facilitator.md +107 -84
- package/lib/{audit-Dw-siYTp.d.ts → audit-BFpULBCj.d.ts} +15 -3
- package/lib/cordis/door.d.ts +3 -1
- package/lib/cordis/door.js +11 -1
- package/lib/cordis/state.d.ts +3 -2
- package/lib/cordis/state.js +370 -6
- package/lib/door/host.d.ts +1 -1
- package/lib/door/host.js +1 -1
- package/lib/door/page.d.ts +10 -0
- package/lib/door/page.js +29 -7
- package/lib/{snapshot-text-BfEbEOjA.js → snapshot-text-BwM6T2nG.js} +36 -4
- package/package.json +1 -1
- package/plugins/acryl-door/src/host/channel.ts +42 -4
- package/plugins/acryl-door/src/host/door.ts +5 -0
- package/plugins/acryl-door/src/host/page-routes.ts +1 -1
- package/plugins/acryl-door/src/host/page-socket.ts +1 -1
- package/plugins/acryl-door/src/page/channel.ts +8 -0
- package/plugins/acryl-door/src/page/driver/driver.ts +17 -3
- package/plugins/acryl-door/src/page/index.ts +6 -1
- package/plugins/acryl-door/src/page/indicator.ts +14 -6
- package/plugins/acryl-state/plugin.json +4 -3
- package/plugins/acryl-state/src/client-source.ts +244 -0
- package/plugins/acryl-state/src/service.ts +33 -6
- package/plugins/acryl-state/src/socket.ts +96 -0
- package/plugins/agent-panel/client/main.ts +105 -55
- package/plugins/agent-panel/index.ts +42 -5
- package/plugins/instance/index.ts +6 -3
- package/templates/agent/AGENTS.md +3 -1
- package/templates/agent/src/routes.ts +38 -5
- package/templates/agent/test/app.test.ts +38 -2
- package/templates/chat/src/main.ts +1 -6
- package/templates/nodejs/src/main.ts +1 -6
- package/templates/notes/src/main.ts +1 -6
package/dist/index.d.ts
CHANGED
|
@@ -142,8 +142,22 @@ export declare function assertTargetFree(target: string): void;
|
|
|
142
142
|
*/
|
|
143
143
|
export declare function copyTemplate(source: string, target: string, name: string): string[];
|
|
144
144
|
export declare function readTemplatePlugins(templateDir: string): string[];
|
|
145
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Add run-time dependencies to an app's package.json, keeping what is there and sorting the keys. Returns the names added. A package the app lists as a development
|
|
147
|
+
* dependency too is taken out of that list: npm lets the development entry win, so `npm install --omit=dev` would leave a run-time dependency out.
|
|
148
|
+
*/
|
|
146
149
|
export declare function mergeDependencies(appDir: string, dependencies: Readonly<Record<string, string>>): string[];
|
|
150
|
+
/**
|
|
151
|
+
* Add a plugin's development dependencies and scripts to an app's package.json: nothing the app already has is replaced, and a package the app already needs at run time
|
|
152
|
+
* (`dependencies`) is not listed again as a development one. Returns the names of the development dependencies and scripts added.
|
|
153
|
+
*/
|
|
154
|
+
export declare function mergeTooling(appDir: string, tooling: {
|
|
155
|
+
devDependencies?: Readonly<Record<string, string>> | undefined;
|
|
156
|
+
scripts?: Readonly<Record<string, string>> | undefined;
|
|
157
|
+
}): {
|
|
158
|
+
devDependencies: string[];
|
|
159
|
+
scripts: string[];
|
|
160
|
+
};
|
|
147
161
|
//#endregion
|
|
148
162
|
//#region src/upgrade.d.ts
|
|
149
163
|
interface UpgradeOptions {
|
package/dist/index.js
CHANGED
|
@@ -409,7 +409,10 @@ function readTemplatePlugins(templateDir) {
|
|
|
409
409
|
const { plugins } = JSON.parse(readFileSync(file, "utf8"));
|
|
410
410
|
return plugins ?? [];
|
|
411
411
|
}
|
|
412
|
-
/**
|
|
412
|
+
/**
|
|
413
|
+
* Add run-time dependencies to an app's package.json, keeping what is there and sorting the keys. Returns the names added. A package the app lists as a development
|
|
414
|
+
* dependency too is taken out of that list: npm lets the development entry win, so `npm install --omit=dev` would leave a run-time dependency out.
|
|
415
|
+
*/
|
|
413
416
|
function mergeDependencies(appDir, dependencies) {
|
|
414
417
|
const file = join(appDir, "package.json");
|
|
415
418
|
const manifest = JSON.parse(readFileSync(file, "utf8"));
|
|
@@ -420,6 +423,7 @@ function mergeDependencies(appDir, dependencies) {
|
|
|
420
423
|
...current
|
|
421
424
|
};
|
|
422
425
|
manifest.dependencies = Object.fromEntries(Object.entries(merged).sort(([a], [b]) => a.localeCompare(b)));
|
|
426
|
+
if (manifest.devDependencies !== void 0) manifest.devDependencies = Object.fromEntries(Object.entries(manifest.devDependencies).filter(([name]) => !(name in merged)));
|
|
423
427
|
writeFileSync(file, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
424
428
|
return added;
|
|
425
429
|
}
|
|
@@ -450,20 +454,22 @@ function mergeOpener(appDir, opener) {
|
|
|
450
454
|
writeFileSync(file, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
451
455
|
}
|
|
452
456
|
/**
|
|
453
|
-
* Add a plugin's development dependencies and scripts to an app's package.json: nothing the app already has is replaced
|
|
454
|
-
* and scripts added.
|
|
457
|
+
* Add a plugin's development dependencies and scripts to an app's package.json: nothing the app already has is replaced, and a package the app already needs at run time
|
|
458
|
+
* (`dependencies`) is not listed again as a development one. Returns the names of the development dependencies and scripts added.
|
|
455
459
|
*/
|
|
456
460
|
function mergeTooling(appDir, tooling) {
|
|
457
461
|
const file = join(appDir, "package.json");
|
|
458
462
|
const manifest = JSON.parse(readFileSync(file, "utf8"));
|
|
459
463
|
const dev = manifest.devDependencies ?? {};
|
|
464
|
+
const runtime = manifest.dependencies ?? {};
|
|
460
465
|
const scripts = manifest.scripts ?? {};
|
|
461
|
-
const
|
|
466
|
+
const wanted = Object.entries(tooling.devDependencies ?? {}).filter(([name]) => !(name in runtime));
|
|
467
|
+
const addedDev = wanted.map(([name]) => name).filter((name) => !(name in dev));
|
|
462
468
|
const addedScripts = Object.keys(tooling.scripts ?? {}).filter((name) => !(name in scripts));
|
|
463
469
|
manifest.devDependencies = Object.fromEntries(Object.entries({
|
|
464
|
-
...
|
|
470
|
+
...Object.fromEntries(wanted),
|
|
465
471
|
...dev
|
|
466
|
-
}).sort(([a], [b]) => a.localeCompare(b)));
|
|
472
|
+
}).filter(([name]) => !(name in runtime)).sort(([a], [b]) => a.localeCompare(b)));
|
|
467
473
|
manifest.scripts = {
|
|
468
474
|
...tooling.scripts,
|
|
469
475
|
...scripts
|
|
@@ -1895,6 +1901,6 @@ function parseKv(args) {
|
|
|
1895
1901
|
return parseKvOptions(args);
|
|
1896
1902
|
}
|
|
1897
1903
|
//#endregion
|
|
1898
|
-
export { HELP, TEMPLATES, TEMPLATE_ALIASES, TEMPLATE_SUMMARY, TargetNotEmptyError, UsageError, VERSION, add, assertTargetFree, closure, copyPlugin, copyTemplate, init, isOmitted, isTemplate, isValidName, libraryRoot, listPlugins, mergeDependencies, nameFrom, parseAddOptions, parseInitOptions, parseUpgradeOptions, readLibrary, readTemplatePlugins, resolveTemplate, runCli, templateDir, templatesRoot, upgrade };
|
|
1904
|
+
export { HELP, TEMPLATES, TEMPLATE_ALIASES, TEMPLATE_SUMMARY, TargetNotEmptyError, UsageError, VERSION, add, assertTargetFree, closure, copyPlugin, copyTemplate, init, isOmitted, isTemplate, isValidName, libraryRoot, listPlugins, mergeDependencies, mergeTooling, nameFrom, parseAddOptions, parseInitOptions, parseUpgradeOptions, readLibrary, readTemplatePlugins, resolveTemplate, runCli, templateDir, templatesRoot, upgrade };
|
|
1899
1905
|
|
|
1900
1906
|
//# sourceMappingURL=index.js.map
|