@vertesia/memory-commands 0.24.0-dev.202601221707

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 ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2024 Composable
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # @vertesia/memory-commands
2
+
3
+ Commands for building Vertesia memory packs from recipe scripts. This package provides the DSL (Domain Specific Language) used in memory recipe scripts.
4
+
5
+ ## Features
6
+
7
+ - **Recipe DSL**: Simple commands for building memory packs
8
+ - **TypeScript Support**: Direct execution of TypeScript recipe files
9
+ - **File Operations**: Copy files, text, JSON, and media into memory packs
10
+ - **Document Processing**: Built-in support for PDF and DOCX conversion
11
+ - **Shell Execution**: Run shell commands during build
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @vertesia/memory-commands
17
+ # or
18
+ pnpm add @vertesia/memory-commands
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ### Writing Recipe Scripts
24
+
25
+ Recipe scripts use the exported commands to define memory pack contents:
26
+
27
+ ```typescript
28
+ import { from, copy, json, content, vars } from '@vertesia/memory-commands';
29
+
30
+ // Set the base directory for file operations
31
+ from('./src');
32
+
33
+ // Copy files into the memory pack
34
+ copy('**/*.ts', { to: 'source/' });
35
+
36
+ // Add JSON data
37
+ json({ version: vars().version, name: 'my-project' }, 'metadata.json');
38
+
39
+ // Add text content directly
40
+ content('# Project Documentation\n\nThis is the main documentation.', 'docs/README.md');
41
+
42
+ export default {}; // Required default export
43
+ ```
44
+
45
+ ### Building Programmatically
46
+
47
+ ```typescript
48
+ import { build } from '@vertesia/memory-commands';
49
+
50
+ await build('recipe.ts', {
51
+ out: 'memory.tar',
52
+ gzip: true,
53
+ vars: { version: '1.0.0' }
54
+ });
55
+ ```
56
+
57
+ ## Available Commands
58
+
59
+ ### File Operations
60
+
61
+ | Command | Description |
62
+ |---------|-------------|
63
+ | `from(path)` | Set the base directory for file operations |
64
+ | `copy(glob, options?)` | Copy files matching glob pattern |
65
+ | `copyText(glob, options?)` | Copy text files with optional transformation |
66
+ | `content(text, path)` | Add text content directly |
67
+ | `json(data, path)` | Add JSON data |
68
+
69
+ ### Document Processing
70
+
71
+ | Command | Description |
72
+ |---------|-------------|
73
+ | `pdf(path, options?)` | Extract text from PDF files |
74
+ | `docx(path, options?)` | Convert DOCX files to markdown |
75
+ | `media(path, options?)` | Add media files with optional transformation |
76
+
77
+ ### Utilities
78
+
79
+ | Command | Description |
80
+ |---------|-------------|
81
+ | `vars()` | Access variables passed via CLI |
82
+ | `tmpdir()` | Get a temporary directory for intermediate files |
83
+ | `exec(command)` | Execute a shell command |
84
+
85
+ ## Examples
86
+
87
+ ### Copy Source Code
88
+
89
+ ```typescript
90
+ import { from, copy } from '@vertesia/memory-commands';
91
+
92
+ from('./src');
93
+ copy('**/*.ts', { to: 'code/' });
94
+ copy('**/*.json', { to: 'config/' });
95
+
96
+ export default {};
97
+ ```
98
+
99
+ ### Process Documents
100
+
101
+ ```typescript
102
+ import { from, pdf, docx } from '@vertesia/memory-commands';
103
+
104
+ from('./docs');
105
+ pdf('*.pdf', { to: 'text/' });
106
+ docx('*.docx', { to: 'markdown/' });
107
+
108
+ export default {};
109
+ ```
110
+
111
+ ### Dynamic Content
112
+
113
+ ```typescript
114
+ import { json, content, vars } from '@vertesia/memory-commands';
115
+
116
+ const config = vars();
117
+
118
+ json({
119
+ name: config.name,
120
+ version: config.version,
121
+ timestamp: new Date().toISOString()
122
+ }, 'manifest.json');
123
+
124
+ content(`# ${config.name}\n\nVersion: ${config.version}`, 'README.md');
125
+
126
+ export default {};
127
+ ```
128
+
129
+ ## API
130
+
131
+ ### build(script, options?)
132
+
133
+ Execute a recipe script to build a memory pack.
134
+
135
+ ```typescript
136
+ interface BuildOptions {
137
+ out?: string; // Output file (default: 'memory.tar')
138
+ gzip?: boolean; // Compress output
139
+ indent?: number; // JSON indentation
140
+ quiet?: boolean; // Suppress output
141
+ test?: boolean; // Test mode (don't write files)
142
+ vars?: Record<string, any>; // Variables for the script
143
+ transpileDir?: string; // Directory for transpiled TypeScript
144
+ }
145
+ ```
146
+
147
+ ### getBuilder()
148
+
149
+ Get the current builder instance (for advanced use cases).
150
+
151
+ ## License
152
+
153
+ Apache-2.0
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getBuilder = getBuilder;
37
+ exports.build = build;
38
+ const memory_1 = require("@vertesia/memory");
39
+ const node_async_hooks_1 = require("node:async_hooks");
40
+ const path_1 = require("path");
41
+ const ts_loader_js_1 = require("./ts-loader.js");
42
+ const als = new node_async_hooks_1.AsyncLocalStorage();
43
+ function getBuilder() {
44
+ const builder = als.getStore();
45
+ if (!builder) {
46
+ throw new Error("No builder found in the current context.");
47
+ }
48
+ return builder;
49
+ }
50
+ function build(script, options = {}) {
51
+ const builder = new memory_1.Builder(options);
52
+ return als.run(builder, () => {
53
+ return _build(builder, script, options.transpileDir);
54
+ });
55
+ }
56
+ async function _build(builder, script, transpileDir) {
57
+ const resolvedScript = (0, path_1.resolve)(script);
58
+ let module;
59
+ if (resolvedScript.endsWith('.ts')) {
60
+ try {
61
+ module = await (0, ts_loader_js_1.importTsFile)(resolvedScript, transpileDir);
62
+ }
63
+ catch (er) {
64
+ console.error(er);
65
+ process.exit(1);
66
+ }
67
+ }
68
+ else {
69
+ module = await Promise.resolve(`${resolvedScript}`).then(s => __importStar(require(s)));
70
+ }
71
+ const output = module?.default;
72
+ if (!output) {
73
+ throw new Error("No default export found in the script.");
74
+ }
75
+ await builder.build(output);
76
+ }
77
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/build.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,gCAMC;AAED,sBAKC;AApBD,6CAAyD;AACzD,uDAAqD;AACrD,+BAA+B;AAC/B,iDAA8C;AAE9C,MAAM,GAAG,GAAG,IAAI,oCAAiB,EAAW,CAAC;AAE7C,SAAgB,UAAU;IACtB,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC/B,I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= exports.build = void 0;
4
+ exports.content = content;
5
+ exports.copy = copy;
6
+ exports.copyText = copyText;
7
+ exports.docx = docx;
8
+ exports.exec = exec;
9
+ exports.from = from;
10
+ exports.json = json;
11
+ exports.media = media;
12
+ exports.pdf = pdf;
13
+ exports.tmpdir = tmpdir;
14
+ exports.vars = vars;
15
+ const build_js_1 = require("./build.js");
16
+ Object.defineProperty(exports, "build", { enumerable: true, get: function () { return build_js_1.build; } });
17
+ Object.defineProperty(exports, "getBuilder", { enumerable: true, get: function () { return build_js_1.getBuilder; } });
18
+ function vars() {
19
+ return (0, build_js_1.getBuilder)().vars();
20
+ }
21
+ function tmpdir() {
22
+ return (0, build_js_1.getBuilder)().tmpdir();
23
+ }
24
+ function from(...args) {
25
+ return (0, build_js_1.getBuilder)().from(...args);
26
+ }
27
+ function exec(...args) {
28
+ return (0, build_js_1.getBuilder)().exec(...args);
29
+ }
30
+ function copy(...args) {
31
+ return (0, build_js_1.getBuilder)().copy(...args);
32
+ }
33
+ function copyText(...args) {
34
+ return (0, build_js_1.getBuilder)().copyText(...args);
35
+ }
36
+ function content(...args) {
37
+ return (0, build_js_1.getBuilder)().content(...args);
38
+ }
39
+ function json(...args) {
40
+ return (0, build_js_1.getBuilder)().json(...args);
41
+ }
42
+ function pdf(...args) {
43
+ return (0, build_js_1.getBuilder)().pdf(...args);
44
+ }
45
+ function docx(...args) {
46
+ return (0, build_js_1.getBuilder)().docx(...args);
47
+ }
48
+ function media(...args) {
49
+ return (0, build_js_1.getBuilder)().media(...args);
50
+ }
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAiDW,0BAAO;AAAE,oBAAI;AAAE,4BAAQ;AAAE,oBAAI;AAAE,oBAAI;AAAE,oBAAI;AAAc,oBAAI;AAAE,sBAAK;AAAE,kBAAG;AAAE,wBAAM;AAAE,oBAAI;AAhDhG,yCAA+C;AAgD3C,s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AAG,IAAmC;IACjD,OAAO,IAAA,qBAAU,GAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.importTsFile = importTsFile;
37
+ const fs_1 = require("fs");
38
+ const path_1 = require("path");
39
+ const ts = __importStar(require("typescript"));
40
+ function compile(fileNames, options) {
41
+ let program = ts.createProgram(fileNames, {
42
+ ...options,
43
+ listEmittedFiles: true,
44
+ });
45
+ let emitResult = program.emit();
46
+ let allDiagnostics = ts
47
+ .getPreEmitDiagnostics(program)
48
+ .concat(emitResult.diagnostics);
49
+ let errors = 0;
50
+ allDiagnostics.forEach(diagnostic => {
51
+ let prefix = '';
52
+ const categories = new Set();
53
+ if (diagnostic.relatedInformation && diagnostic.relatedInformation.length > 0) {
54
+ for (const ri of diagnostic.relatedInformation) {
55
+ categories.add(ri.category);
56
+ }
57
+ if (categories.has(ts.DiagnosticCategory.Error)) {
58
+ prefix: 'Error: ';
59
+ errors++;
60
+ }
61
+ else if (categories.has(ts.DiagnosticCategory.Warning)) {
62
+ prefix: 'Warning: ';
63
+ }
64
+ else if (categories.has(ts.DiagnosticCategory.Suggestion)) {
65
+ prefix: 'Suggestion: ';
66
+ }
67
+ }
68
+ if (diagnostic.file) {
69
+ let { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
70
+ let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
71
+ console.log(`${prefix}${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
72
+ }
73
+ else {
74
+ console.log(prefix + ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"));
75
+ }
76
+ });
77
+ return {
78
+ errors,
79
+ emittedFiles: emitResult.emittedFiles
80
+ };
81
+ }
82
+ function transpileFile(source, target, options) {
83
+ const input = (0, fs_1.readFileSync)(source, "utf-8");
84
+ // now simply transpile the module to javascript
85
+ const output = ts.transpileModule(input, {
86
+ compilerOptions: options
87
+ });
88
+ (0, fs_1.writeFileSync)(target, output.outputText, "utf-8");
89
+ }
90
+ function tryDeleteFile(file) {
91
+ try {
92
+ (0, fs_1.rmSync)(file);
93
+ }
94
+ catch (_er) {
95
+ // ignore
96
+ }
97
+ }
98
+ function importTsFile(file, outdir = '.') {
99
+ if (!file.endsWith('.ts')) {
100
+ throw new Error("Not a type script file: " + file);
101
+ }
102
+ file = (0, path_1.resolve)(file);
103
+ const baseOptions = {
104
+ skipLibCheck: true,
105
+ moduleResolution: ts.ModuleResolutionKind.Bundler,
106
+ module: ts.ModuleKind.ESNext,
107
+ target: ts.ScriptTarget.ESNext,
108
+ };
109
+ // we nly use compile to find errors. To generate the code we use transpileModule
110
+ // since the compile will generate js files for all the dependencies.
111
+ const result = compile([file], {
112
+ ...baseOptions,
113
+ noEmit: true
114
+ });
115
+ if (result.errors > 0) {
116
+ console.log(`Found ${result.errors} in typescript compilation. Aborting.`);
117
+ process.exit(1);
118
+ }
119
+ const fname = (0, path_1.basename)(file).slice(0, -3);
120
+ const emittedFile = (0, path_1.resolve)(outdir, `__${Date.now()}-${fname}.mjs`);
121
+ transpileFile(file, emittedFile, baseOptions);
122
+ return Promise.resolve(`${emittedFile}`).then(s => __importStar(require(s))).finally(() => tryDeleteFile(emittedFile));
123
+ }
124
+ //# sourceMappingURL=ts-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-loader.js","sourceRoot":"","sources":["../../src/ts-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,oCA0BC;AA3FD,2BAAyD;AACzD,+BAAyC;AACzC,+CAAiC;AAEjC,SAAS,OAAO,CAAC,SAAmB,EAAE,OAA2B;IAC7D,IAAI,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE;QACtC,GAAG,OAAO;QACV,gBAAgB,EAAE,IAAI;KACI,CAAC,CAAC;IAChC,IAAI,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAEhC,IAAI,cAAc,GAAG,EAAE;SAClB,qBAAqB,CAAC,OAAO,CAAC;SAC9B,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAEpC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAChC,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,MAAM,UAAU,GAAG,IAAI,GAAG,EAAyB,CAAC;QACpD,IAAI,UAAU,CAAC,kBAAkB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AAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,MAAM,uCAAuC,CAAC,CAAC;QAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,eAAQ,EAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,MAAM,EAAE,KAAK,IAAI,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC;IACpE,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAE9C,OAAO,mBAAO,WAAW,wCAAE,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Builder } from "@vertesia/memory";
2
+ import { AsyncLocalStorage } from "node:async_hooks";
3
+ import { resolve } from "path";
4
+ import { importTsFile } from "./ts-loader.js";
5
+ const als = new AsyncLocalStorage();
6
+ export function getBuilder() {
7
+ const builder = als.getStore();
8
+ if (!builder) {
9
+ throw new Error("No builder found in the current context.");
10
+ }
11
+ return builder;
12
+ }
13
+ export function build(script, options = {}) {
14
+ const builder = new Builder(options);
15
+ return als.run(builder, () => {
16
+ return _build(builder, script, options.transpileDir);
17
+ });
18
+ }
19
+ async function _build(builder, script, transpileDir) {
20
+ const resolvedScript = resolve(script);
21
+ let module;
22
+ if (resolvedScript.endsWith('.ts')) {
23
+ try {
24
+ module = await importTsFile(resolvedScript, transpileDir);
25
+ }
26
+ catch (er) {
27
+ console.error(er);
28
+ process.exit(1);
29
+ }
30
+ }
31
+ else {
32
+ module = await import(resolvedScript);
33
+ }
34
+ const output = module?.default;
35
+ if (!output) {
36
+ throw new Error("No default export found in the script.");
37
+ }
38
+ await builder.build(output);
39
+ }
40
+ //# sourceMappingURL=build.js.map
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AAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC;IAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { build, getBuilder } from "./build.js";
2
+ function vars() {
3
+ return getBuilder().vars();
4
+ }
5
+ function tmpdir() {
6
+ return getBuilder().tmpdir();
7
+ }
8
+ function from(...args) {
9
+ return getBuilder().from(...args);
10
+ }
11
+ function exec(...args) {
12
+ return getBuilder().exec(...args);
13
+ }
14
+ function copy(...args) {
15
+ return getBuilder().copy(...args);
16
+ }
17
+ function copyText(...args) {
18
+ return getBuilder().copyText(...args);
19
+ }
20
+ function content(...args) {
21
+ return getBuilder().content(...args);
22
+ }
23
+ function json(...args) {
24
+ return getBuilder().json(...args);
25
+ }
26
+ function pdf(...args) {
27
+ return getBuilder().pdf(...args);
28
+ }
29
+ function docx(...args) {
30
+ return getBuilder().docx(...args);
31
+ }
32
+ function media(...args) {
33
+ return getBuilder().media(...args);
34
+ }
35
+ export { build, content, copy, copyText, docx, exec, from, getBuilder, json, media, pdf, tmpdir, vars };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG/C,SAAS,IAAI;IACT,OAAO,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,SAAS,MAAM;IACX,OAAO,UAAU,EAAE,CAAC,MAAM,EAAE,CAA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C"}
@@ -0,0 +1,88 @@
1
+ import { readFileSync, rmSync, writeFileSync } from "fs";
2
+ import { basename, resolve } from "path";
3
+ import * as ts from "typescript";
4
+ function compile(fileNames, options) {
5
+ let program = ts.createProgram(fileNames, {
6
+ ...options,
7
+ listEmittedFiles: true,
8
+ });
9
+ let emitResult = program.emit();
10
+ let allDiagnostics = ts
11
+ .getPreEmitDiagnostics(program)
12
+ .concat(emitResult.diagnostics);
13
+ let errors = 0;
14
+ allDiagnostics.forEach(diagnostic => {
15
+ let prefix = '';
16
+ const categories = new Set();
17
+ if (diagnostic.relatedInformation && diagnostic.relatedInformation.length > 0) {
18
+ for (const ri of diagnostic.relatedInformation) {
19
+ categories.add(ri.category);
20
+ }
21
+ if (categories.has(ts.DiagnosticCategory.Error)) {
22
+ prefix: 'Error: ';
23
+ errors++;
24
+ }
25
+ else if (categories.has(ts.DiagnosticCategory.Warning)) {
26
+ prefix: 'Warning: ';
27
+ }
28
+ else if (categories.has(ts.DiagnosticCategory.Suggestion)) {
29
+ prefix: 'Suggestion: ';
30
+ }
31
+ }
32
+ if (diagnostic.file) {
33
+ let { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
34
+ let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
35
+ console.log(`${prefix}${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
36
+ }
37
+ else {
38
+ console.log(prefix + ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"));
39
+ }
40
+ });
41
+ return {
42
+ errors,
43
+ emittedFiles: emitResult.emittedFiles
44
+ };
45
+ }
46
+ function transpileFile(source, target, options) {
47
+ const input = readFileSync(source, "utf-8");
48
+ // now simply transpile the module to javascript
49
+ const output = ts.transpileModule(input, {
50
+ compilerOptions: options
51
+ });
52
+ writeFileSync(target, output.outputText, "utf-8");
53
+ }
54
+ function tryDeleteFile(file) {
55
+ try {
56
+ rmSync(file);
57
+ }
58
+ catch (_er) {
59
+ // ignore
60
+ }
61
+ }
62
+ export function importTsFile(file, outdir = '.') {
63
+ if (!file.endsWith('.ts')) {
64
+ throw new Error("Not a type script file: " + file);
65
+ }
66
+ file = resolve(file);
67
+ const baseOptions = {
68
+ skipLibCheck: true,
69
+ moduleResolution: ts.ModuleResolutionKind.Bundler,
70
+ module: ts.ModuleKind.ESNext,
71
+ target: ts.ScriptTarget.ESNext,
72
+ };
73
+ // we nly use compile to find errors. To generate the code we use transpileModule
74
+ // since the compile will generate js files for all the dependencies.
75
+ const result = compile([file], {
76
+ ...baseOptions,
77
+ noEmit: true
78
+ });
79
+ if (result.errors > 0) {
80
+ console.log(`Found ${result.errors} in typescript compilation. Aborting.`);
81
+ process.exit(1);
82
+ }
83
+ const fname = basename(file).slice(0, -3);
84
+ const emittedFile = resolve(outdir, `__${Date.now()}-${fname}.mjs`);
85
+ transpileFile(file, emittedFile, baseOptions);
86
+ return import(emittedFile).finally(() => tryDeleteFile(emittedFile));
87
+ }
88
+ //# sourceMappingURL=ts-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-loader.js","sourceRoot":"","sources":["../../src/ts-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,SAAS,OAAO,CAAC,SAAmB,EAAE,OAA2B;IAC7D,IAAI,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE;QACtC,GAAG,OAAO;QACV,gBAAgB,EAAE,IAAI;KACI,CAAC,CAAC;IAChC,IAAI,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAEhC,IAAI,cAAc,GAAG,EAAE;SAClB,qBAAqB,CAAC,OAAO,CAAC;SAC9B,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAEpC,IAAI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AAqE;IACrE,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE;QAC3B,GAAG,WAAW;QACd,MAAM,EAAE,IAAI;KACf,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,MAAM,uCAAuC,CAAC,CAAC;QAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC;IACpE,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAE9C,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../memory/lib/types/contentsource.d.ts","../../memory/lib/types/contentobject.d.ts","../../memory/lib/types/commands/copy.d.ts","../../memory/lib/types/utils/cmdline.d.ts","../../memory/lib/types/commands/exec.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.19.3/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+tar-stream@3.1.4/node_modules/@types/tar-stream/index.d.ts","../../memory/lib/types/utils/tar.d.ts","../../memory/lib/types/memorypack.d.ts","../../memory/lib/types/memorypackbuilder.d.ts","../../memory/lib/types/builder.d.ts","../../memory/lib/types/index.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.d.ts","../src/ts-loader.ts","../src/build.ts","../src/index.ts"],"fileIdsList":[[69,114,115,117,134,135],[69,116,117,134,135],[117,134,135],[69,117,122,134,135,152],[69,117,118,123,128,134,135,137,149,160],[69,117,118,119,128,134,135,137],[69,117,134,135],[64,65,66,69,117,134,135],[69,117,120,134,135,161],[69,117,121,122,129,134,135,138],[69,117,122,134,135,149,157],[69,117,123,125,128,134,135,137],[69,116,117,124,134,135],[69,117,125,126,134,135],[69,117,127,128,134,135],[69,116,117,128,134,135],[69,117,128,129,130,134,135,149,160],[69,117,128,129,130,134,135,144,149,152],[69,110,117,125,128,131,134,135,137,149,160],[69,117,128,129,131,132,134,135,137,149,157,160],[69,117,131,133,134,135,149,157,160],[67,68,69,70,71,72,73,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],[69,117,128,134,135],[69,117,134,135,136,160],[69,117,125,128,134,135,137,149],[69,117,134,135,138],[69,117,134,135,139],[69,116,117,134,135,140],[69,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],[69,117,134,135,142],[69,117,134,135,143],[69,117,128,134,135,144,145],[69,117,134,135,144,146,161,163],[69,117,129,134,135],[69,117,128,134,135,149,150,152],[69,117,134,135,151,152],[69,117,134,135,149,150],[69,117,134,135,152],[69,117,134,135,153],[69,114,117,134,135,149,154],[69,117,128,134,135,155,156],[69,117,134,135,155,156],[69,117,122,134,135,137,149,157],[69,117,134,135,158],[69,117,134,135,137,159],[69,117,131,134,135,143,160],[69,117,122,134,135,161],[69,117,134,135,149,162],[69,117,134,135,136,163],[69,117,134,135,164],[69,110,117,134,135],[69,110,117,128,130,134,135,140,149,152,160,162,163,165],[69,117,134,135,149,166],[69,117,134,135,149,167],[69,82,86,117,134,135,160],[69,82,117,134,135,149,160],[69,77,117,134,135],[69,79,82,117,134,135,157,160],[69,117,134,135,137,157],[69,117,134,135,167],[69,77,117,134,135,167],[69,79,82,117,134,135,137,160],[69,74,75,78,81,117,128,134,135,149,160],[69,82,89,117,134,135],[69,74,80,117,134,135],[69,82,103,104,117,134,135],[69,78,82,117,134,135,152,160,167],[69,103,117,134,135,167],[69,76,77,117,134,135,167],[69,82,117,134,135],[69,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,107,108,109,117,134,135],[69,82,97,117,134,135],[69,82,89,90,117,134,135],[69,80,82,90,91,117,134,135],[69,81,117,134,135],[69,74,77,82,117,134,135],[69,82,86,90,91,117,134,135],[69,86,117,134,135],[69,80,82,85,117,134,135,160],[69,74,79,82,89,117,134,135],[69,117,134,135,149],[69,77,82,103,117,134,135,165,167],[69,116,117,134,135,139,173,175],[69,117,134,135,173,176],[69,117,129,134,135,139,174],[59,60,61,63,69,117,134,135,171],[59,60,69,117,134,135,172],[62,69,117,134,135,149],[59,69,117,129,134,135,172],[59,60,61,63,69,117,134,135,169,170,171,172],[59,69,117,134,135,169],[59,69,117,134,135,170,172],[69,117,129,130,134,135,168]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"da603bbb3fdddb13a05068bb9e3023e108fa4180b3fb2191ada7ac9946b78c85","133782c738135aac614a9f95c9063a27f0dd71e3d6cd9f630b472b81b2a9fe02","ba83b3f21c8568a33d2fb17b53b36929a81265a0d06d6224fb5a2fbc2a0e040f","0d8fc8fd3f229a4d993b014e1467f63555c658d1a862693502cfb86132fa51f2","22737d4a6aa1be697c7757b3d3714c8376e2f4236de8099067e19a78a6be70c4",{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"2cbe0621042e2a68c7cbce5dfed3906a1862a16a7d496010636cdbdb91341c0f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"bb45cd435da536500f1d9692a9b49d0c570b763ccbf00473248b777f5c1f353b","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac39df6dfb9e284bb0c205b15f4d9a2b260f5bab5c85bf2fb97d0cdd509c06ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"dba28a419aec76ed864ef43e5f577a5c99a010c32e5949fe4e17a4d57c58dd11","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c959a391a75be9789b43c8468f71e3fa06488b4d691d5729dde1416dcd38225b","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"5ebe6f4cc3b803cbfc962bae0d954f9c80e5078ca41eb3f1de41d92e7193ef37","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f663c2f91127ef7024e8ca4b3b4383ff2770e5f826696005de382282794b127","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"24af1742f907d8311b928821ee9770c45c3711ae4e505a00d5e8e9d1322162f3","affectsGlobalScope":true,"impliedFormat":1},"94675453ac64c675d8cf2f7d13d3dffb82f091069d9b2e8e99fde8c5d92ec38b","1417b1b9c4439d271c1551d25061dd6704a2b8cc42a9133026d5648c7238e234","69ca9f72155035bbd9a9ef58e1f5e4e947051b930902c4e6da12f267f4998ef0","410a1ff1fb721db0d3b86d5a7d7dacaabda8a68ff4826f1a230db6d39f603d2b","ad9d9360ae23df40dec3e7c4da00ddf3ee5159628dbcbc2f3086c172a19efd28",{"version":"e134052a6b1ded61693b4037f615dc72f14e2881e79c1ddbff6c514c8a516b05","impliedFormat":1},{"version":"0cd131718c2ba0370718c18486211e323da1ed5156808d90d8e3938158dd2b3b","signature":"1c4fee6da70f1b299b2f4c907309217842571448201afc33be014fef6b85b9c7"},{"version":"f723cbf6d8acd8005d6ef8f2c7568e374898daa995823c6003ad04c5f78f2fb3","signature":"0b7609334ee8a6386c1b8868cdfbedbe8c468c78c792f9e3fc9f3264c4a576c8"},{"version":"25652518ef88543b0a62169152352955ddd23ef1f0282287dd27289465b0f5b6","signature":"a9786230d6a11b46ac6d53fd3240e63dbf65641851894ab290552779bdb12ae2"}],"root":[[175,177]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declarationDir":"./types","esModuleInterop":true,"experimentalDecorators":true,"module":99,"noFallthroughCasesInSwitch":true,"noPropertyAccessFromIndexSignature":false,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"useDefineForClassFields":true,"useUnknownInCatchVariables":true},"referencedMap":[[114,1],[115,1],[116,2],[69,3],[117,4],[118,5],[119,6],[64,7],[67,8],[65,7],[66,7],[120,9],[121,10],[122,11],[123,12],[124,13],[125,14],[126,14],[127,15],[128,16],[129,17],[130,18],[70,7],[68,7],[131,19],[132,20],[133,21],[167,22],[134,23],[135,7],[136,24],[137,25],[138,26],[139,27],[140,28],[141,29],[142,30],[143,31],[144,32],[145,32],[146,33],[147,7],[148,34],[149,35],[151,36],[150,37],[152,38],[153,39],[154,40],[155,41],[156,42],[157,43],[158,44],[159,45],[160,46],[161,47],[162,48],[163,49],[164,50],[71,7],[72,7],[73,7],[111,51],[112,7],[113,7],[165,52],[166,53],[168,54],[57,7],[58,7],[10,7],[12,7],[11,7],[2,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[3,7],[21,7],[22,7],[4,7],[23,7],[27,7],[24,7],[25,7],[26,7],[28,7],[29,7],[30,7],[5,7],[31,7],[32,7],[33,7],[34,7],[6,7],[38,7],[35,7],[36,7],[37,7],[39,7],[7,7],[40,7],[45,7],[46,7],[41,7],[42,7],[43,7],[44,7],[8,7],[50,7],[47,7],[48,7],[49,7],[51,7],[9,7],[52,7],[53,7],[54,7],[56,7],[55,7],[1,7],[174,7],[89,55],[99,56],[88,55],[109,57],[80,58],[79,59],[108,60],[102,61],[107,62],[82,63],[96,64],[81,65],[105,66],[77,67],[76,60],[106,68],[78,69],[83,70],[84,7],[87,70],[74,7],[110,71],[100,72],[91,73],[92,74],[94,75],[90,76],[93,77],[103,60],[85,78],[86,79],[95,80],[75,81],[98,72],[97,70],[101,7],[104,82],[176,83],[177,84],[175,85],[172,86],[61,87],[63,88],[60,89],[59,7],[173,90],[170,91],[171,92],[62,7],[169,93]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.9.3"}
@@ -0,0 +1,3 @@
1
+ import { Builder, BuildOptions } from "@vertesia/memory";
2
+ export declare function getBuilder(): Builder;
3
+ export declare function build(script: string, options?: BuildOptions): Promise<void>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOzD,wBAAgB,UAAU,YAMzB;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/E"}
@@ -0,0 +1,14 @@
1
+ import type { Commands } from "@vertesia/memory";
2
+ import { build, getBuilder } from "./build.js";
3
+ declare function vars(): ReturnType<Commands['vars']>;
4
+ declare function tmpdir(): ReturnType<Commands['tmpdir']>;
5
+ declare function from(...args: Parameters<Commands['from']>): ReturnType<Commands['from']>;
6
+ declare function exec(...args: Parameters<Commands['exec']>): ReturnType<Commands['exec']>;
7
+ declare function copy(...args: Parameters<Commands['copy']>): ReturnType<Commands['copy']>;
8
+ declare function copyText(...args: Parameters<Commands['copyText']>): ReturnType<Commands['copyText']>;
9
+ declare function content(...args: Parameters<Commands['content']>): ReturnType<Commands['content']>;
10
+ declare function json(...args: Parameters<Commands['json']>): ReturnType<Commands['json']>;
11
+ declare function pdf(...args: Parameters<Commands['pdf']>): ReturnType<Commands['pdf']>;
12
+ declare function docx(...args: Parameters<Commands['docx']>): ReturnType<Commands['docx']>;
13
+ declare function media(...args: Parameters<Commands['media']>): ReturnType<Commands['media']>;
14
+ export { build, content, copy, copyText, docx, exec, from, getBuilder, json, media, pdf, tmpdir, vars };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG/C,iBAAS,IAAI,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAE5C;AAED,iBAAS,MAAM,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAEhD;AAED,iBA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QAAQ,CAAC,OAAO,CAAC,CAAC,CAEpF;AAED,OAAO,EACH,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAC/F,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function importTsFile(file: string, outdir?: string): Promise<any>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-loader.d.ts","sourceRoot":"","sources":["../../src/ts-loader.ts"],"names":[],"mappings":"AAiEA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CA0B7E"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@vertesia/memory-commands",
3
+ "description": "Memory commands for memory recipe scripts",
4
+ "version": "0.24.0-dev.202601221707",
5
+ "type": "module",
6
+ "types": "./lib/types/index.d.ts",
7
+ "files": [
8
+ "lib",
9
+ "src"
10
+ ],
11
+ "license": "Apache-2.0",
12
+ "devDependencies": {
13
+ "@types/node": "^22.19.2",
14
+ "ts-dual-module": "^0.6.3",
15
+ "vitest": "^4.0.16"
16
+ },
17
+ "dependencies": {
18
+ "typescript": "^5.6.3",
19
+ "@vertesia/memory": "0.24.0-dev.202601221707"
20
+ },
21
+ "ts_dual_module": {
22
+ "outDir": "lib"
23
+ },
24
+ "exports": {
25
+ "types": "./lib/types/index.d.ts",
26
+ "import": "./lib/esm/index.js",
27
+ "require": "./lib/cjs/index.js"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/vertesia/composableai.git",
32
+ "directory": "packages/memory-commands"
33
+ },
34
+ "keywords": [
35
+ "vertesia",
36
+ "memory",
37
+ "commands",
38
+ "recipe",
39
+ "llm",
40
+ "ai",
41
+ "typescript"
42
+ ],
43
+ "scripts": {
44
+ "eslint": "eslint './src/**/*.{jsx,js,tsx,ts}'",
45
+ "build": "pnpm exec tsmod build",
46
+ "clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo"
47
+ }
48
+ }
package/src/build.ts ADDED
@@ -0,0 +1,41 @@
1
+ import { Builder, BuildOptions } from "@vertesia/memory";
2
+ import { AsyncLocalStorage } from "node:async_hooks";
3
+ import { resolve } from "path";
4
+ import { importTsFile } from "./ts-loader.js";
5
+
6
+ const als = new AsyncLocalStorage<Builder>();
7
+
8
+ export function getBuilder() {
9
+ const builder = als.getStore();
10
+ if (!builder) {
11
+ throw new Error("No builder found in the current context.");
12
+ }
13
+ return builder;
14
+ }
15
+
16
+ export function build(script: string, options: BuildOptions = {}): Promise<void> {
17
+ const builder = new Builder(options);
18
+ return als.run(builder, () => {
19
+ return _build(builder, script, options.transpileDir);
20
+ });
21
+ }
22
+
23
+ async function _build(builder: Builder, script: string, transpileDir?: string): Promise<void> {
24
+ const resolvedScript = resolve(script);
25
+ let module: any;
26
+ if (resolvedScript.endsWith('.ts')) {
27
+ try {
28
+ module = await importTsFile(resolvedScript, transpileDir);
29
+ } catch (er: any) {
30
+ console.error(er);
31
+ process.exit(1);
32
+ }
33
+ } else {
34
+ module = await import(resolvedScript);
35
+ }
36
+ const output = module?.default;
37
+ if (!output) {
38
+ throw new Error("No default export found in the script.");
39
+ }
40
+ await builder.build(output);
41
+ }
package/src/index.ts ADDED
@@ -0,0 +1,51 @@
1
+ import type { Commands } from "@vertesia/memory";
2
+ import { build, getBuilder } from "./build.js";
3
+
4
+
5
+ function vars(): ReturnType<Commands['vars']> {
6
+ return getBuilder().vars();
7
+ }
8
+
9
+ function tmpdir(): ReturnType<Commands['tmpdir']> {
10
+ return getBuilder().tmpdir();
11
+ }
12
+
13
+ function from(...args: Parameters<Commands['from']>): ReturnType<Commands['from']> {
14
+ return getBuilder().from(...args);
15
+ }
16
+
17
+ function exec(...args: Parameters<Commands['exec']>): ReturnType<Commands['exec']> {
18
+ return getBuilder().exec(...args);
19
+ }
20
+
21
+ function copy(...args: Parameters<Commands['copy']>): ReturnType<Commands['copy']> {
22
+ return getBuilder().copy(...args);
23
+ }
24
+
25
+ function copyText(...args: Parameters<Commands['copyText']>): ReturnType<Commands['copyText']> {
26
+ return getBuilder().copyText(...args);
27
+ }
28
+
29
+ function content(...args: Parameters<Commands['content']>): ReturnType<Commands['content']> {
30
+ return getBuilder().content(...args);
31
+ }
32
+
33
+ function json(...args: Parameters<Commands['json']>): ReturnType<Commands['json']> {
34
+ return getBuilder().json(...args);
35
+ }
36
+
37
+ function pdf(...args: Parameters<Commands['pdf']>): ReturnType<Commands['pdf']> {
38
+ return getBuilder().pdf(...args);
39
+ }
40
+
41
+ function docx(...args: Parameters<Commands['docx']>): ReturnType<Commands['docx']> {
42
+ return getBuilder().docx(...args);
43
+ }
44
+
45
+ function media(...args: Parameters<Commands['media']>): ReturnType<Commands['media']> {
46
+ return getBuilder().media(...args);
47
+ }
48
+
49
+ export {
50
+ build, content, copy, copyText, docx, exec, from, getBuilder, json, media, pdf, tmpdir, vars
51
+ };
@@ -0,0 +1,92 @@
1
+ import { readFileSync, rmSync, writeFileSync } from "fs";
2
+ import { basename, resolve } from "path";
3
+ import * as ts from "typescript";
4
+
5
+ function compile(fileNames: string[], options: ts.CompilerOptions): { errors: number, emittedFiles: string[] | undefined } {
6
+ let program = ts.createProgram(fileNames, {
7
+ ...options,
8
+ listEmittedFiles: true,
9
+ } satisfies ts.CompilerOptions);
10
+ let emitResult = program.emit();
11
+
12
+ let allDiagnostics = ts
13
+ .getPreEmitDiagnostics(program)
14
+ .concat(emitResult.diagnostics);
15
+
16
+ let errors = 0;
17
+ allDiagnostics.forEach(diagnostic => {
18
+ let prefix = '';
19
+ const categories = new Set<ts.DiagnosticCategory>();
20
+ if (diagnostic.relatedInformation && diagnostic.relatedInformation.length > 0) {
21
+ for (const ri of diagnostic.relatedInformation) {
22
+ categories.add(ri.category);
23
+ }
24
+ if (categories.has(ts.DiagnosticCategory.Error)) {
25
+ prefix: 'Error: ';
26
+ errors++;
27
+ } else if (categories.has(ts.DiagnosticCategory.Warning)) {
28
+ prefix: 'Warning: ';
29
+ } else if (categories.has(ts.DiagnosticCategory.Suggestion)) {
30
+ prefix: 'Suggestion: ';
31
+ }
32
+ }
33
+ if (diagnostic.file) {
34
+ let { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start!);
35
+ let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
36
+ console.log(`${prefix}${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
37
+ } else {
38
+ console.log(prefix + ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"));
39
+ }
40
+ });
41
+
42
+ return {
43
+ errors,
44
+ emittedFiles: emitResult.emittedFiles
45
+ }
46
+ }
47
+
48
+ function transpileFile(source: string, target: string, options: ts.CompilerOptions) {
49
+ const input = readFileSync(source, "utf-8");
50
+ // now simply transpile the module to javascript
51
+ const output = ts.transpileModule(input, {
52
+ compilerOptions: options
53
+ });
54
+ writeFileSync(target, output.outputText, "utf-8");
55
+ }
56
+
57
+
58
+ function tryDeleteFile(file: string) {
59
+ try {
60
+ rmSync(file)
61
+ } catch (_er: any) {
62
+ // ignore
63
+ }
64
+ }
65
+
66
+ export function importTsFile(file: string, outdir: string = '.'): Promise<any> {
67
+ if (!file.endsWith('.ts')) {
68
+ throw new Error("Not a type script file: " + file);
69
+ }
70
+ file = resolve(file);
71
+ const baseOptions = {
72
+ skipLibCheck: true,
73
+ moduleResolution: ts.ModuleResolutionKind.Bundler,
74
+ module: ts.ModuleKind.ESNext,
75
+ target: ts.ScriptTarget.ESNext,
76
+ } satisfies ts.CompilerOptions;
77
+ // we nly use compile to find errors. To generate the code we use transpileModule
78
+ // since the compile will generate js files for all the dependencies.
79
+ const result = compile([file], {
80
+ ...baseOptions,
81
+ noEmit: true
82
+ });
83
+ if (result.errors > 0) {
84
+ console.log(`Found ${result.errors} in typescript compilation. Aborting.`);
85
+ process.exit(1);
86
+ }
87
+ const fname = basename(file).slice(0, -3);
88
+ const emittedFile = resolve(outdir, `__${Date.now()}-${fname}.mjs`);
89
+ transpileFile(file, emittedFile, baseOptions);
90
+
91
+ return import(emittedFile).finally(() => tryDeleteFile(emittedFile));
92
+ }