@virmator/frontend 13.0.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/LICENSE-CC0 ADDED
@@ -0,0 +1,121 @@
1
+ CC0 1.0 Universal
2
+
3
+ Creative Commons Legal Code
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
package/LICENSE-MIT ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 electrovir
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.md ADDED
@@ -0,0 +1,32 @@
1
+ # @virmator/frontend
2
+
3
+ A default plugin for [virmator](https://www.npmjs.com/package/virmator).
4
+
5
+ ## Available commands
6
+
7
+ - **frontend**
8
+
9
+ Runs a frontend dev server with Vite.
10
+
11
+ - Examples
12
+ - `virmator frontend`
13
+ - Configs
14
+ - configs/vite.config.ts
15
+ - Deps
16
+ - [typescript](https://npmjs.com/package/typescript)
17
+ - [vite](https://npmjs.com/package/vite)
18
+ - Sub Commands
19
+
20
+ - **build**
21
+
22
+ Builds a frontend for deployment using Vite (and Rollup).
23
+
24
+ - Examples
25
+ - `virmator frontend build`
26
+
27
+ - **preview**
28
+
29
+ Builds a frontend and previews that build in a local dev server.
30
+
31
+ - Examples
32
+ - `virmator frontend preview`
@@ -0,0 +1,10 @@
1
+ import type { PluginOption } from 'vite';
2
+ /**
3
+ * There are similar plugins out there that try to do this but they aren't aggressive enough. This
4
+ * plugin literally always reloads on save, no questions asked.
5
+ */
6
+ export declare function alwaysReloadPlugin(config?: Partial<{
7
+ exclusions: string[];
8
+ /** Inclusions apply after exclusions so they will override exclusions. */
9
+ inclusions: string[];
10
+ }>): PluginOption;
@@ -0,0 +1,97 @@
1
+ import { logColors } from '@augment-vir/node-js';
2
+ import { existsSync, lstatSync, readlinkSync } from 'node:fs';
3
+ import { relative } from 'node:path';
4
+ /**
5
+ * Include actual paths and symlinked target paths if they exist.
6
+ *
7
+ * This is needed because when removing files from the watcher, sym links have be removed with the
8
+ * path to the symlink itself AND the path to the symlink target or the path will still be watched.
9
+ */
10
+ function mapToActualPaths(paths) {
11
+ return paths.reduce((accum, path) => {
12
+ if (existsSync(path)) {
13
+ if (lstatSync(path).isSymbolicLink()) {
14
+ console.info('reading symlink from', path);
15
+ // sym links AND the original path both need to be included
16
+ return accum.concat(readlinkSync(path), path);
17
+ }
18
+ else {
19
+ return accum.concat(path);
20
+ }
21
+ }
22
+ else {
23
+ return accum;
24
+ }
25
+ }, []);
26
+ }
27
+ /**
28
+ * There are similar plugins out there that try to do this but they aren't aggressive enough. This
29
+ * plugin literally always reloads on save, no questions asked.
30
+ */
31
+ export function alwaysReloadPlugin(config = {}) {
32
+ return {
33
+ name: 'alwaysReloadPlugin',
34
+ apply: 'serve',
35
+ config: () => ({ server: { watch: { disableGlobbing: false } } }),
36
+ handleHotUpdate() {
37
+ return [];
38
+ },
39
+ configureServer({ watcher, ws, config: { logger, publicDir = '', root = process.cwd() } }) {
40
+ const { inclusions = [], exclusions = [] } = config;
41
+ let callingAlready = false;
42
+ // eslint-disable-next-line @typescript-eslint/unbound-method
43
+ const oldInfoLog = logger.info;
44
+ function customInfoLog(message, options) {
45
+ /**
46
+ * Ignore vite's built-in extra page reload logging as this will duplicate our
47
+ * messages.
48
+ */
49
+ if (message.startsWith('page reload')) {
50
+ return;
51
+ }
52
+ oldInfoLog(message, options);
53
+ }
54
+ logger.info = customInfoLog;
55
+ function reloadCallback(path) {
56
+ // prevent duplicate calls cause the watcher is very eager to call callbacks multiple times in a row
57
+ if (!callingAlready) {
58
+ callingAlready = true;
59
+ ws.send({
60
+ type: 'full-reload',
61
+ path: '*',
62
+ });
63
+ logger.info(`${logColors.success}page reload ${logColors.faint}${relative(process.cwd(), path)}${logColors.reset}`, {
64
+ clear: true,
65
+ timestamp: true,
66
+ });
67
+ /**
68
+ * Debounce reloads calls so that they don't get spammed. If you're actually
69
+ * intentionally saving faster than this, then what the heck are you doing?
70
+ */
71
+ setTimeout(() => {
72
+ callingAlready = false;
73
+ }, 100);
74
+ }
75
+ }
76
+ watcher.add(root);
77
+ if (exclusions.length) {
78
+ watcher.unwatch(mapToActualPaths(exclusions));
79
+ }
80
+ // ignore macOS file system metadata stuff
81
+ watcher.unwatch('./**/.DS_Store');
82
+ if (inclusions.length) {
83
+ watcher.add(mapToActualPaths(inclusions));
84
+ }
85
+ if (publicDir) {
86
+ watcher.add(publicDir);
87
+ }
88
+ if (!watcher.listeners('change').includes(reloadCallback)) {
89
+ watcher.on('change', reloadCallback);
90
+ watcher.on('add', reloadCallback);
91
+ watcher.on('unlink', reloadCallback);
92
+ }
93
+ // // for debugging. Note that this isn't actually reliable, test the actual reloads.
94
+ // console.info({watched: watcher.getWatched()});
95
+ },
96
+ };
97
+ }
@@ -0,0 +1,107 @@
1
+ import { NpmDepType, PackageType, VirmatorEnv } from '@virmator/core';
2
+ /** A virmator plugin for running and building frontend packages. */
3
+ export declare const virmatorFrontendPlugin: Readonly<Readonly<{
4
+ name: string;
5
+ cliCommands: NoInfer<{
6
+ readonly frontend: {
7
+ readonly doc: {
8
+ readonly sections: readonly ["\n Runs a frontend dev server with Vite.\n "];
9
+ readonly examples: readonly [{
10
+ readonly content: "virmator frontend";
11
+ }];
12
+ };
13
+ readonly subCommands: {
14
+ readonly build: {
15
+ readonly doc: {
16
+ readonly sections: readonly ["\n Builds a frontend for deployment using Vite (and Rollup).\n "];
17
+ readonly examples: readonly [{
18
+ readonly content: "virmator frontend build";
19
+ }];
20
+ };
21
+ };
22
+ readonly preview: {
23
+ readonly doc: {
24
+ readonly sections: readonly ["\n Builds a frontend and previews that build in a local dev server.\n "];
25
+ readonly examples: readonly [{
26
+ readonly content: "virmator frontend preview";
27
+ }];
28
+ };
29
+ };
30
+ };
31
+ readonly configFiles: {
32
+ readonly vite: {
33
+ readonly copyFromPath: string;
34
+ readonly copyToPath: string;
35
+ readonly env: [VirmatorEnv.Web];
36
+ readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
37
+ readonly required: true;
38
+ readonly configFlags: ["--config"];
39
+ };
40
+ };
41
+ readonly npmDeps: {
42
+ readonly typescript: {
43
+ readonly type: NpmDepType.Dev;
44
+ readonly env: readonly [VirmatorEnv.Web];
45
+ readonly packageType: readonly [PackageType.MonoPackage, PackageType.TopPackage];
46
+ };
47
+ readonly vite: {
48
+ readonly type: NpmDepType.Dev;
49
+ readonly env: readonly [VirmatorEnv.Web];
50
+ readonly packageType: readonly [PackageType.MonoPackage, PackageType.TopPackage];
51
+ };
52
+ };
53
+ };
54
+ }>;
55
+ }> & {
56
+ pluginPackageRootPath: string;
57
+ executor: import("@virmator/core").VirmatorPluginExecutor<NoInfer<{
58
+ readonly frontend: {
59
+ readonly doc: {
60
+ readonly sections: readonly ["\n Runs a frontend dev server with Vite.\n "];
61
+ readonly examples: readonly [{
62
+ readonly content: "virmator frontend";
63
+ }];
64
+ };
65
+ readonly subCommands: {
66
+ readonly build: {
67
+ readonly doc: {
68
+ readonly sections: readonly ["\n Builds a frontend for deployment using Vite (and Rollup).\n "];
69
+ readonly examples: readonly [{
70
+ readonly content: "virmator frontend build";
71
+ }];
72
+ };
73
+ };
74
+ readonly preview: {
75
+ readonly doc: {
76
+ readonly sections: readonly ["\n Builds a frontend and previews that build in a local dev server.\n "];
77
+ readonly examples: readonly [{
78
+ readonly content: "virmator frontend preview";
79
+ }];
80
+ };
81
+ };
82
+ };
83
+ readonly configFiles: {
84
+ readonly vite: {
85
+ readonly copyFromPath: string;
86
+ readonly copyToPath: string;
87
+ readonly env: [VirmatorEnv.Web];
88
+ readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
89
+ readonly required: true;
90
+ readonly configFlags: ["--config"];
91
+ };
92
+ };
93
+ readonly npmDeps: {
94
+ readonly typescript: {
95
+ readonly type: NpmDepType.Dev;
96
+ readonly env: readonly [VirmatorEnv.Web];
97
+ readonly packageType: readonly [PackageType.MonoPackage, PackageType.TopPackage];
98
+ };
99
+ readonly vite: {
100
+ readonly type: NpmDepType.Dev;
101
+ readonly env: readonly [VirmatorEnv.Web];
102
+ readonly packageType: readonly [PackageType.MonoPackage, PackageType.TopPackage];
103
+ };
104
+ };
105
+ };
106
+ }>>;
107
+ }>;
@@ -0,0 +1,170 @@
1
+ import { isTruthy } from '@augment-vir/common';
2
+ import { toPosixPath } from '@augment-vir/node-js';
3
+ import { defineVirmatorPlugin, NpmDepType, PackageType, VirmatorEnv } from '@virmator/core';
4
+ import mri from 'mri';
5
+ import { cp, rm } from 'node:fs/promises';
6
+ import { join, relative, resolve } from 'node:path';
7
+ /** A virmator plugin for running and building frontend packages. */
8
+ export const virmatorFrontendPlugin = defineVirmatorPlugin(import.meta.dirname, {
9
+ name: 'Frontend',
10
+ cliCommands: {
11
+ frontend: {
12
+ doc: {
13
+ sections: [
14
+ `
15
+ Runs a frontend dev server with Vite.
16
+ `,
17
+ ],
18
+ examples: [
19
+ {
20
+ content: 'virmator frontend',
21
+ },
22
+ ],
23
+ },
24
+ subCommands: {
25
+ build: {
26
+ doc: {
27
+ sections: [
28
+ `
29
+ Builds a frontend for deployment using Vite (and Rollup).
30
+ `,
31
+ ],
32
+ examples: [
33
+ {
34
+ content: 'virmator frontend build',
35
+ },
36
+ ],
37
+ },
38
+ },
39
+ preview: {
40
+ doc: {
41
+ sections: [
42
+ `
43
+ Builds a frontend and previews that build in a local dev server.
44
+ `,
45
+ ],
46
+ examples: [
47
+ {
48
+ content: 'virmator frontend preview',
49
+ },
50
+ ],
51
+ },
52
+ },
53
+ },
54
+ configFiles: {
55
+ vite: {
56
+ copyFromPath: join('configs', 'vite.config.ts'),
57
+ copyToPath: join('configs', 'vite.config.ts'),
58
+ env: [
59
+ VirmatorEnv.Web,
60
+ ],
61
+ packageType: [
62
+ PackageType.TopPackage,
63
+ PackageType.MonoPackage,
64
+ ],
65
+ required: true,
66
+ configFlags: ['--config'],
67
+ },
68
+ },
69
+ npmDeps: {
70
+ typescript: {
71
+ type: NpmDepType.Dev,
72
+ env: [
73
+ VirmatorEnv.Web,
74
+ ],
75
+ packageType: [
76
+ PackageType.MonoPackage,
77
+ PackageType.TopPackage,
78
+ ],
79
+ },
80
+ vite: {
81
+ type: NpmDepType.Dev,
82
+ env: [
83
+ VirmatorEnv.Web,
84
+ ],
85
+ packageType: [
86
+ PackageType.MonoPackage,
87
+ PackageType.TopPackage,
88
+ ],
89
+ },
90
+ },
91
+ },
92
+ },
93
+ }, async ({ cliInputs: { filteredArgs, usedCommands }, package: { cwdPackagePath }, runShellCommand, cwd, configs, log, }) => {
94
+ const args = mri(filteredArgs);
95
+ const needsBuild = usedCommands.frontend?.subCommands.build || usedCommands.frontend?.subCommands.preview;
96
+ const configPath = args.config || configs.frontend.configs.vite.fullCopyToPath;
97
+ const viteConfig = await (await import(configPath)).default;
98
+ const rootDir = viteConfig.root ? resolve(cwd, viteConfig.root) : cwd;
99
+ const outDir = resolve(rootDir, viteConfig.build?.outDir || 'dist');
100
+ const configArgs = args.config
101
+ ? []
102
+ : [
103
+ '--config',
104
+ toPosixPath(relative(cwd, configPath)),
105
+ ];
106
+ const baseViteCommands = [
107
+ /** Required so that .ts vite configs can import other .ts files. */
108
+ 'NODE_OPTIONS="--import tsx"',
109
+ 'npx',
110
+ 'vite',
111
+ ];
112
+ if (needsBuild) {
113
+ await rm(join(cwdPackagePath, 'node_modules', '.vite'), { force: true, recursive: true });
114
+ await rm(outDir, { recursive: true, force: true });
115
+ const buildCommand = [
116
+ ...baseViteCommands,
117
+ 'build',
118
+ ...filteredArgs,
119
+ ...configArgs,
120
+ ]
121
+ .filter(isTruthy)
122
+ .join(' ');
123
+ log.faint('Building...');
124
+ await runShellCommand(buildCommand, {
125
+ env: {
126
+ ...process.env,
127
+ VITE_CJS_IGNORE_WARNING: 'true',
128
+ },
129
+ });
130
+ log.faint('Creating 404 page...');
131
+ const indexPath = join(outDir, 'index.html');
132
+ const dist404Path = join(outDir, '404.html');
133
+ await cp(indexPath, dist404Path);
134
+ /** Run preview. */
135
+ if (usedCommands.frontend.subCommands.preview) {
136
+ const previewCommand = [
137
+ ...baseViteCommands,
138
+ 'preview',
139
+ '--force',
140
+ ...filteredArgs,
141
+ ...configArgs,
142
+ ]
143
+ .filter(isTruthy)
144
+ .join(' ');
145
+ log.faint('Previewing...');
146
+ await runShellCommand(previewCommand, {
147
+ env: {
148
+ ...process.env,
149
+ VITE_CJS_IGNORE_WARNING: 'true',
150
+ },
151
+ });
152
+ }
153
+ }
154
+ else {
155
+ const devCommand = [
156
+ ...baseViteCommands,
157
+ '--force',
158
+ ...filteredArgs,
159
+ ...configArgs,
160
+ ]
161
+ .filter(isTruthy)
162
+ .join(' ');
163
+ await runShellCommand(devCommand, {
164
+ env: {
165
+ ...process.env,
166
+ VITE_CJS_IGNORE_WARNING: 'true',
167
+ },
168
+ });
169
+ }
170
+ });
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@virmator/frontend",
3
+ "version": "13.0.0",
4
+ "description": "Default frontend plugin for virmator.",
5
+ "keywords": [
6
+ "virmator",
7
+ "frontend",
8
+ "vite",
9
+ "build",
10
+ "dev",
11
+ "server"
12
+ ],
13
+ "homepage": "https://github.com/electrovir/virmator",
14
+ "bugs": {
15
+ "url": "https://github.com/electrovir/virmator/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/electrovir/virmator.git"
20
+ },
21
+ "license": "(MIT or CC0 1.0)",
22
+ "author": {
23
+ "name": "electrovir",
24
+ "url": "https://github.com/electrovir"
25
+ },
26
+ "type": "module",
27
+ "main": "dist/frontend.js",
28
+ "module": "dist/frontend.js",
29
+ "types": "dist/frontend.d.ts",
30
+ "scripts": {
31
+ "compile": "virmator compile",
32
+ "test": "virmator test node",
33
+ "test:coverage": "npm test",
34
+ "test:update": "npm test update"
35
+ },
36
+ "dependencies": {
37
+ "@augment-vir/common": "^29.3.0",
38
+ "@augment-vir/node-js": "^29.3.0",
39
+ "@virmator/core": "^13.0.0",
40
+ "mri": "^1.2.0"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^22.1.0",
44
+ "typescript": "^5.5.4",
45
+ "vite": "^5.3.5",
46
+ "vite-tsconfig-paths": "^4.3.2"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ }
51
+ }