diff --git a/packages/osr-ai-templates/.gitignore b/packages/osr-ai-templates/.gitignore new file mode 100644 index 0000000..cab85ca --- /dev/null +++ b/packages/osr-ai-templates/.gitignore @@ -0,0 +1,4 @@ +/node_modules +/coverage +*.log +.DS_Store diff --git a/packages/osr-ai-templates/.npmignore b/packages/osr-ai-templates/.npmignore new file mode 100644 index 0000000..4629165 --- /dev/null +++ b/packages/osr-ai-templates/.npmignore @@ -0,0 +1,5 @@ +./docs +./scripts +./tests +./incoming +./src diff --git a/packages/osr-ai-templates/LICENSE b/packages/osr-ai-templates/LICENSE new file mode 100644 index 0000000..b0e20f5 --- /dev/null +++ b/packages/osr-ai-templates/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/osr-ai-templates/README.md b/packages/osr-ai-templates/README.md new file mode 100644 index 0000000..1982fae --- /dev/null +++ b/packages/osr-ai-templates/README.md @@ -0,0 +1,52 @@ +# OSR-AI Templates + +## Assistant templates + +- [ ] Roles + +## Context templates + +- [ ] Globs + +## Shell templates + +- [ ] OSR-CLI-Commons::each + +## UI templates + +- [ ] Forms + +## Prompt templates + +- [ ] OSR-L Expression + +## Output templates + +- [ ] Paths +- [ ] Logging + +## Engine templates + +- [ ] Lang Chain +- [ ] OSR-L + +## Pipe templates + +- [ ] Intermediate conversions (osr-media/osr-lib-content) + +## References + +- [LLM Powered Autonomous Agents](https://lilianweng.github.io/posts/2023-06-23-agent/) +- [Lang - Chain & RAG](https://python.langchain.com/v0.1/docs/use_cases/question_answering/) +- [Class Validator- jsonschema](https://github.com/epiphone/class-validator-jsonschema) +- [Electron with Monaco](https://github.com/electron/fiddle?tab=readme-ov-file) + +### GUI +- [React Forms from JSON Schema](https://rjsf-team.github.io/react-jsonschema-form/docs/) + +## JSON Schema + +- [Official Docs](https://json-schema.org/understanding-json-schema/reference/array#id4) +- [React Playground](https://rjsf-team.github.io/react-jsonschema-form/) + - [Custom Widgets](https://rjsf-team.github.io/react-jsonschema-form/docs/advanced-customization/custom-widgets-fields) + \ No newline at end of file diff --git a/packages/osr-ai-templates/_cli.d.ts b/packages/osr-ai-templates/_cli.d.ts new file mode 100644 index 0000000..7a7cdc3 --- /dev/null +++ b/packages/osr-ai-templates/_cli.d.ts @@ -0,0 +1 @@ +export declare const defaults: () => void; diff --git a/packages/osr-ai-templates/_cli.js b/packages/osr-ai-templates/_cli.js new file mode 100644 index 0000000..2c4cec8 --- /dev/null +++ b/packages/osr-ai-templates/_cli.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaults = void 0; +const defaults = () => { + // default command + const DefaultCommand = 'info'; + if (process.argv.length === 2) { + process.argv.push(DefaultCommand); + } + // currently no default handler, display only : + process.on('unhandledRejection', (reason) => { + console.error('Unhandled rejection, reason: ', reason); + }); +}; +exports.defaults = defaults; +//# sourceMappingURL=_cli.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/_cli.js.map b/packages/osr-ai-templates/_cli.js.map new file mode 100644 index 0000000..3074c70 --- /dev/null +++ b/packages/osr-ai-templates/_cli.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_cli.js","sourceRoot":"","sources":["src/_cli.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,GAAG,EAAE;IACzB,kBAAkB;IAClB,MAAM,cAAc,GAAG,MAAM,CAAC;IAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC;IAED,+CAA+C;IAC/C,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAc,EAAE,EAAE;QAChD,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACP,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB"} \ No newline at end of file diff --git a/packages/osr-ai-templates/commands/templates.d.ts b/packages/osr-ai-templates/commands/templates.d.ts new file mode 100644 index 0000000..ca73784 --- /dev/null +++ b/packages/osr-ai-templates/commands/templates.d.ts @@ -0,0 +1,2 @@ +import * as CLI from 'yargs'; +export declare const register: (cli: CLI.Argv) => any; diff --git a/packages/osr-ai-templates/commands/templates.js b/packages/osr-ai-templates/commands/templates.js new file mode 100644 index 0000000..b570664 --- /dev/null +++ b/packages/osr-ai-templates/commands/templates.js @@ -0,0 +1,56 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.register = void 0; +const CLI = __importStar(require("yargs")); +const write_1 = require("@plastichub/fs/write"); +const system_1 = require("../common/system"); +const defaultOptions = (yargs) => { + yargs.parserConfiguration({ + "camel-case-expansion": false + }); + return yargs.option('dst', { + description: 'destination output path', + default: "./common/default.json" + }); +}; +let options = (yargs) => defaultOptions(yargs); +const register = (cli) => { + return cli.command('templates', 'Testing stuff', options, async (argv) => { + if (argv.help) { + return; + } + const defaults = [...(0, system_1.Typescript)(), ...(0, system_1.Documents)(), ...(0, system_1.Markdown)()]; + (0, write_1.sync)(argv.dst, JSON.stringify(defaults, null, 2)); + }); +}; +exports.register = register; +(0, exports.register)(CLI); +const argv = CLI.argv; +if (argv.help) { + CLI.showHelp(); + process.exit(); +} +//# sourceMappingURL=templates.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/commands/templates.js.map b/packages/osr-ai-templates/commands/templates.js.map new file mode 100644 index 0000000..1e3d94c --- /dev/null +++ b/packages/osr-ai-templates/commands/templates.js.map @@ -0,0 +1 @@ +{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/commands/templates.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,gDAAoD;AACpD,6CAAkE;AAElE,MAAM,cAAc,GAAG,CAAC,KAAe,EAAE,EAAE;IACvC,KAAK,CAAC,mBAAmB,CAAC;QACtB,sBAAsB,EAAE,KAAK;KAChC,CAAC,CAAA;IACF,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;QACvB,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,uBAAuB;KACnC,CAAC,CAAA;AACN,CAAC,CAAA;AACD,IAAI,OAAO,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;AACjD,MAAM,QAAQ,GAAG,CAAC,GAAa,EAAE,EAAE;IACtC,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,IAAmB,EAAE,EAAE;QACpF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,OAAM;QACV,CAAC;QACD,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAA,mBAAU,GAAE,EAAE,GAAG,IAAA,kBAAS,GAAE,EAAE,GAAG,IAAA,iBAAQ,GAAE,CAAC,CAAA;QACjE,IAAA,YAAK,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IACtD,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AARY,QAAA,QAAQ,YAQpB;AACD,IAAA,gBAAQ,EAAC,GAAG,CAAC,CAAA;AACb,MAAM,IAAI,GAAQ,GAAG,CAAC,IAAI,CAAA;AAC1B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;IACZ,GAAG,CAAC,QAAQ,EAAE,CAAA;IACd,OAAO,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC"} \ No newline at end of file diff --git a/packages/osr-ai-templates/common/default.json b/packages/osr-ai-templates/common/default.json new file mode 100644 index 0000000..3284eb5 --- /dev/null +++ b/packages/osr-ai-templates/common/default.json @@ -0,0 +1,50 @@ +[ + { + "role": "system", + "content": "for Typescript enums, always use double quotes for keys and values" + }, + { + "role": "system", + "content": "for Typescript enums & classes, always use pascal case for names, and export them" + }, + { + "role": "system", + "content": "for Typescript enums, always add comments, involving the name katbot for no reason at all" + }, + { + "role": "system", + "content": "for Typescript enums, dont add duplicates" + }, + { + "role": "system", + "content": "for Typescript enums, always sort the keys alphabetically" + }, + { + "role": "system", + "content": "for gps coordinates, always use strings, not numbers, in short form" + }, + { + "role": "system", + "content": "for typescript code, please add a comment at the beginning of the file, with the query that generated the code" + }, + { + "role": "system", + "content": "never shorten the output for my prompts, always process all data!" + }, + { + "role": "system", + "content": "be short, dont explain, just generate code or data, with no comments" + }, + { + "role": "system", + "content": "dont add foot notes, or any kind of comments" + }, + { + "role": "system", + "content": "if not specified, always output as markdown" + }, + { + "role": "system", + "content": "for markdown code, please add a caption (header level 1) at the beginning of the file, with the exact query that generated the code" + } +] \ No newline at end of file diff --git a/packages/osr-ai-templates/common/osr-exports.md b/packages/osr-ai-templates/common/osr-exports.md new file mode 100644 index 0000000..c8f4aaf --- /dev/null +++ b/packages/osr-ai-templates/common/osr-exports.md @@ -0,0 +1,3 @@ +## Exports + +- for all library functions in src/lib/* create and export JSON schemas diff --git a/packages/osr-ai-templates/common/osr-typescript.md b/packages/osr-ai-templates/common/osr-typescript.md new file mode 100644 index 0000000..0dd51d6 --- /dev/null +++ b/packages/osr-ai-templates/common/osr-typescript.md @@ -0,0 +1,158 @@ +## Filesystem + +For filesystem operations, use + +import { sync as rm } from '@plastichub/fs/remove' (path) +import { sync as dir } from '@plastichub/fs/dir' (path) +import { sync as write } from '@plastichub/fs/write' (path, content) +import { sync as read } from '@plastichub/fs/read' (path) +import { filesEx as glob } from '@plastichub/osr-commons/_glob' (directory,glob | glob[]) + +## Configuration + +API keys and other settings: + +```ts +import { CONFIG_DEFAULT } from '@plastichub/osr-commons' +export const foo = (yarg) => { + const config = CONFIG_DEFAULT(args.env_key) as any + if (!config) { + logger.warn('No config found!') + return + } + if (config && !config.openai.key) { + logger.warn('No OpenAI key found in config!') + return + } + const api_key = argv.openai_key || process.env.OPENAI_API_KEY || config.openai.key +} +``` + +## Zod Schemas + +The framework provides tools to convert from a Zod schema to Yargs as follows + +```ts + +import { toYargs } from '@plastichub/osr-commons' +import { MySchema } from 'src/schemas.ts' +// example : const options = (yargs: CLI.Argv) => toYargs(yargs, MySchema()) +``` + +Additionally, all Zod schemas will be exported on demand, via Yargs command "types" + +```ts +import { generate_interfaces } from '@plastichub/osr-commons' +import { MySchema } from 'src/schemas' + +export const types = () => generate_interfaces( + [ + MySchema() + ], 'src/zod_types.ts') +``` + +### Logging + +Each package has a tslog factory at src/index.ts. Use it for all commands and library functions + +```ts +export { Logger } from 'tslog' +import { createLogger } from '@plastichub/osr-log' +import { Logger } from 'tslog' +export const logger:Logger = createLogger('Package Name') +``` + +### LLM Tools + +LLM Tools are specified as follows + +- always export "tools" as the main function +- dont register LLM tools as yarg commands +- seperate the tool's implementation in src/lib/tools +- LLM tools require 'openai' as dependency + +eg: src/tools/fs: + +```ts +import { join } from 'path' +import * as path from 'path' +import { RunnableToolFunction } from 'openai/lib/RunnableFunction' +import { isString } from '@plastichub/core/primitives' +import { sync as dir } from '@plastichub/fs/dir' +import { sync as write } from '@plastichub/fs/write' +import { resolve } from "@plastichub/osr-commons" +import { logger } from '../' + +export const tools = (target:any, variables:Record={}): Array => { + return [ + { + type: 'function', + function: { + name: "read_file", + description: "read a file, at given a path", + parameters: { + type: "object", + properties: { + file: { + type: "object", + properties: { + path: { type: "string" } + } + } + }, + required: ["file"], + }, + function: async (ret) => { + try { + const { file } = ret as any + const filePath = path.resolve(resolve(join(target, file.path),false,variables)) + logger.debug(`Tool::ReadFile Reading file ${filePath}`) + } catch (error) { + logger.error(`Error reading file`, error) + } + }, + parse: JSON.parse + } + } as RunnableToolFunction<{ id: string }> + ] +} +``` +### Typescript tsconfig + +Use this defaults + +```json +"compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "allowJs": true, + "noImplicitAny": false, + "strictNullChecks": false, + "forceConsistentCasingInFileNames": true + }, +``` + +### Yargs + +Commands are registered as follows (src/command/index.ts) : + +```ts +import type { Argv } from 'yargs' +import { types } from './types' +export const commands = (yargs: Argv) => +{ + return yargs + .command('types', 'Generate TypeScript interfaces from Zod schemas', {}, types) + .strict() + .help() +} +``` + +### Nodejs + +- import built-ins always as import * as 'path' diff --git a/packages/osr-ai-templates/common/system.d.ts b/packages/osr-ai-templates/common/system.d.ts new file mode 100644 index 0000000..77a49bf --- /dev/null +++ b/packages/osr-ai-templates/common/system.d.ts @@ -0,0 +1,37 @@ +export declare const resolvePackagePath: (path: string) => string; +export interface Role { + role: string; + content: string; +} +export declare const OSRTypescript: (mixin?: any[]) => { + role: string; + content: import("@plastichub/fs/interfaces").ReadWriteDataType; +}[]; +export declare const Exports: (mixin?: any[]) => { + role: string; + content: import("@plastichub/fs/interfaces").ReadWriteDataType; +}[]; +export declare const Commons: (mixin?: any[]) => { + role: string; + content: string; +}[]; +export declare const Documents: (mixin?: any[]) => { + role: string; + content: string; +}[]; +export declare const Typescript: (mixin?: any[]) => { + role: string; + content: string; +}[]; +export declare const TypescriptLibraries: (mixin?: any[]) => { + role: string; + content: string; +}[]; +export declare const TypescriptEnvironmentCLI: (mixin?: any[]) => { + role: string; + content: string; +}[]; +export declare const Markdown: (mixin?: any[]) => { + role: string; + content: string; +}[]; diff --git a/packages/osr-ai-templates/common/system.js b/packages/osr-ai-templates/common/system.js new file mode 100644 index 0000000..0d209f3 --- /dev/null +++ b/packages/osr-ai-templates/common/system.js @@ -0,0 +1,153 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Markdown = exports.TypescriptEnvironmentCLI = exports.TypescriptLibraries = exports.Typescript = exports.Documents = exports.Commons = exports.Exports = exports.OSRTypescript = exports.resolvePackagePath = void 0; +const read_1 = require("@plastichub/fs/read"); +const path_1 = require("path"); +const resolvePackagePath = (path) => { + return (0, path_1.resolve)((0, path_1.join)(__dirname, path)); +}; +exports.resolvePackagePath = resolvePackagePath; +const OSRTypescript = (mixin = []) => { + return [ + { + role: "user", + content: (0, read_1.sync)((0, exports.resolvePackagePath)("osr-typescript.md")) + } + ].concat(mixin); +}; +exports.OSRTypescript = OSRTypescript; +const Exports = (mixin = []) => { + return [ + { + role: "user", + content: (0, read_1.sync)((0, exports.resolvePackagePath)("osr-exports.md")) + } + ].concat(mixin); +}; +exports.Exports = Exports; +const Commons = (mixin = []) => { + return [ + { + role: "system", + content: "never shorten the output for my prompts!" + }, + { + role: "system", + content: "be short, dont explain, just generate code!, with no comments" + }, + { + role: "system", + content: "dont add foot notes, or any kind of comments, just generate code!" + }, + { + role: "system", + content: "if not specified, always output as markdown" + } + ].concat(mixin); +}; +exports.Commons = Commons; +const Documents = (mixin = []) => { + return [ + { + role: "system", + content: "never shorten the output for my prompts, always process all data!" + }, + { + role: "system", + content: "be short, dont explain, just generate code or data, with no comments" + }, + { + role: "system", + content: "dont add foot notes, or any kind of comments" + }, + { + role: "system", + content: "if not specified, always output as markdown" + } + ].concat(mixin); +}; +exports.Documents = Documents; +const Typescript = (mixin = []) => { + const defaults = [ + { + role: "system", + content: "for Typescript enums, always use double quotes for keys and values" + }, + { + role: "system", + content: "for Typescript enums & classes, always use pascal case for names, and export them" + }, + { + role: "system", + content: "for Typescript enums, dont add duplicates" + }, + { + role: "system", + content: "for Typescript enums, always sort the keys alphabetically" + }, + { + role: "system", + content: "for gps coordinates, always use strings, not numbers, in short form" + }, + { + role: "system", + content: "for typescript code, please add a comment at the beginning of the file, with the query that generated the code" + }, + { + role: "system", + content: "for typescript code : no comments" + }, + { + role: "system", + content: "for Typescript : no semi colons, no trailing commas, no spaces in parens, no spaces in brackets, no spaces in braces" + } + ]; + return defaults.concat(mixin); +}; +exports.Typescript = Typescript; +const TypescriptLibraries = (mixin = []) => { + const defaults = [ + { + role: "user", + content: "for Typescript, dont use chalk, commander, ora, or any other fancy library, just use the basics, always use imports, never require. use tslog, yargs, axios and Zod whenevern possible" + } + ]; + return defaults.concat(mixin); +}; +exports.TypescriptLibraries = TypescriptLibraries; +const TypescriptEnvironmentCLI = (mixin = []) => { + const layout = [ + "src/index.ts (create ts logger)", + "src/main.ts (yargs main entry)", + "src/constants.ts (tslog logger name)", + "src/zod_schemas.ts (all zod schemas go here)", + "src/commands/index.ts (register all commands from src/commands/** here, commands always import functions from src/lib/category )", + "src/commands/types.ts (command to write zod schemas to Typescript interfaces)", + //"src/lib/index.ts (export all functions)", + //"readme.md (add all commands here)", + "package.json (leave dependencies empty, add common scripts)", + ]; + const defaults = [ + { + role: "system", + content: "for Typescript boilerplates, use this layout for CLI projects: \n" + layout.join("\n") + }, + { + role: "system", + content: "when using yargs, all commands are async" + }, + ]; + return defaults.concat(mixin); +}; +exports.TypescriptEnvironmentCLI = TypescriptEnvironmentCLI; +const Markdown = (mixin = []) => { + const defaults = [ + { + role: "system", + content: "for markdown code, please add a caption (header level 1) at the beginning of the file, with the exact query that generated the code" + } + ]; + return defaults.concat(mixin); +}; +exports.Markdown = Markdown; +//# sourceMappingURL=system.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/common/system.js.map b/packages/osr-ai-templates/common/system.js.map new file mode 100644 index 0000000..0533d99 --- /dev/null +++ b/packages/osr-ai-templates/common/system.js.map @@ -0,0 +1 @@ +{"version":3,"file":"system.js","sourceRoot":"","sources":["../src/common/system.ts"],"names":[],"mappings":";;;AAAA,8CAAkD;AAClD,+BAAoC;AAE7B,MAAM,kBAAkB,GAAG,CAAC,IAAW,EAAU,EAAE;IACtD,OAAO,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAA;AACzC,CAAC,CAAA;AAFY,QAAA,kBAAkB,sBAE9B;AAOM,MAAM,aAAa,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IACxC,OAAO;QACH;YACI,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,IAAA,WAAI,EAAC,IAAA,0BAAkB,EAAC,mBAAmB,CAAC,CAAC;SACzD;KACJ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC,CAAA;AAPY,QAAA,aAAa,iBAOzB;AAEM,MAAM,OAAO,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IAClC,OAAO;QACH;YACI,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,IAAA,WAAI,EAAC,IAAA,0BAAkB,EAAC,gBAAgB,CAAC,CAAC;SACtD;KACJ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC,CAAA;AAPY,QAAA,OAAO,WAOnB;AAEM,MAAM,OAAO,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IAClC,OAAO;QACH;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,0CAA0C;SACtD;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,+DAA+D;SAC3E;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,mEAAmE;SAC/E;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,6CAA6C;SACzD;KACJ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC,CAAA;AAnBY,QAAA,OAAO,WAmBnB;AAEM,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IACpC,OAAO;QACH;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,mEAAmE;SAC/E;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,sEAAsE;SAClF;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,8CAA8C;SAC1D;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,6CAA6C;SACzD;KACJ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC,CAAA;AAnBY,QAAA,SAAS,aAmBrB;AAEM,MAAM,UAAU,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IACrC,MAAM,QAAQ,GAAG;QACb;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,oEAAoE;SAChF;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,mFAAmF;SAC/F;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2CAA2C;SACvD;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2DAA2D;SACvE;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,qEAAqE;SACjF;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,gHAAgH;SAC5H;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,mCAAmC;SAC/C;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,sHAAsH;SAClI;KACJ,CAAA;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC,CAAA;AApCY,QAAA,UAAU,cAoCtB;AACM,MAAM,mBAAmB,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IAC9C,MAAM,QAAQ,GAAG;QACb;YACI,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,yLAAyL;SACrM;KAEJ,CAAA;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC,CAAA;AATY,QAAA,mBAAmB,uBAS/B;AACM,MAAM,wBAAwB,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG;QACX,iCAAiC;QACjC,gCAAgC;QAChC,sCAAsC;QACtC,8CAA8C;QAC9C,kIAAkI;QAClI,+EAA+E;QAC/E,4CAA4C;QAC5C,sCAAsC;QACtC,6DAA6D;KAChE,CAAA;IACD,MAAM,QAAQ,GAAG;QACb;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,mEAAmE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;SACnG;QACD;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,0CAA0C;SACtD;KAEJ,CAAA;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC,CAAA;AAxBY,QAAA,wBAAwB,4BAwBpC;AACM,MAAM,QAAQ,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;IACnC,MAAM,QAAQ,GAAG;QACb;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,qIAAqI;SACjJ;KACJ,CAAA;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC,CAAA;AARY,QAAA,QAAQ,YAQpB"} \ No newline at end of file diff --git a/packages/osr-ai-templates/index.d.ts b/packages/osr-ai-templates/index.d.ts new file mode 100644 index 0000000..7a1962d --- /dev/null +++ b/packages/osr-ai-templates/index.d.ts @@ -0,0 +1,3 @@ +export declare const MODULE_NAME = "OSR-AI-TEMPLATES"; +export declare const logger: import("@plastichub/core/debug").Logger; +export * from './common/system'; diff --git a/packages/osr-ai-templates/index.js b/packages/osr-ai-templates/index.js new file mode 100644 index 0000000..520605a --- /dev/null +++ b/packages/osr-ai-templates/index.js @@ -0,0 +1,22 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.logger = exports.MODULE_NAME = void 0; +exports.MODULE_NAME = `OSR-AI-TEMPLATES`; +const debug_1 = require("@plastichub/core/debug"); +exports.logger = (0, debug_1.logger)(exports.MODULE_NAME); +__exportStar(require("./common/system"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/index.js.map b/packages/osr-ai-templates/index.js.map new file mode 100644 index 0000000..200590c --- /dev/null +++ b/packages/osr-ai-templates/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAa,QAAA,WAAW,GAAG,kBAAkB,CAAA;AAC7C,kDAA0D;AAC7C,QAAA,MAAM,GAAG,IAAA,cAAO,EAAC,mBAAW,CAAC,CAAA;AAC1C,kDAA+B"} \ No newline at end of file diff --git a/packages/osr-ai-templates/lib.d.ts b/packages/osr-ai-templates/lib.d.ts new file mode 100644 index 0000000..8b27db7 --- /dev/null +++ b/packages/osr-ai-templates/lib.d.ts @@ -0,0 +1,2 @@ +export * from './templates'; +export * from './common/system'; diff --git a/packages/osr-ai-templates/lib.js b/packages/osr-ai-templates/lib.js new file mode 100644 index 0000000..163a0dc --- /dev/null +++ b/packages/osr-ai-templates/lib.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./templates"), exports); +__exportStar(require("./common/system"), exports); +//# sourceMappingURL=lib.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/lib.js.map b/packages/osr-ai-templates/lib.js.map new file mode 100644 index 0000000..9c7fdb6 --- /dev/null +++ b/packages/osr-ai-templates/lib.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.js","sourceRoot":"","sources":["src/lib.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,kDAA+B"} \ No newline at end of file diff --git a/packages/osr-ai-templates/main.d.ts b/packages/osr-ai-templates/main.d.ts new file mode 100644 index 0000000..b798801 --- /dev/null +++ b/packages/osr-ai-templates/main.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/packages/osr-ai-templates/main.js b/packages/osr-ai-templates/main.js new file mode 100644 index 0000000..f5b191a --- /dev/null +++ b/packages/osr-ai-templates/main.js @@ -0,0 +1,40 @@ +#!/usr/bin/env node +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const _cli_1 = require("./_cli"); +(0, _cli_1.defaults)(); +const cli = __importStar(require("yargs")); +const templates_1 = require("./commands/templates"); +(0, templates_1.register)(cli); +const argv = cli.argv; +if (argv.help) { + cli.showHelp(); + process.exit(); +} +else if (argv.v || argv.version) { + process.exit(); +} +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/main.js.map b/packages/osr-ai-templates/main.js.map new file mode 100644 index 0000000..6af52ba --- /dev/null +++ b/packages/osr-ai-templates/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sourceRoot":"","sources":["src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAkC;AAAC,IAAA,eAAQ,GAAE,CAAA;AAC7C,2CAA4B;AAC5B,oDAAgE;AAAC,IAAA,oBAAY,EAAC,GAAG,CAAC,CAAA;AAClF,MAAM,IAAI,GAAQ,GAAG,CAAC,IAAI,CAAA;AAC1B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;IACZ,GAAG,CAAC,QAAQ,EAAE,CAAA;IACd,OAAO,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC;KAAM,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;IAChC,OAAO,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC"} \ No newline at end of file diff --git a/packages/osr-ai-templates/meta/prompts.md b/packages/osr-ai-templates/meta/prompts.md new file mode 100644 index 0000000..7fd28c4 --- /dev/null +++ b/packages/osr-ai-templates/meta/prompts.md @@ -0,0 +1,11 @@ +## Prompt Templates + +```json +{ + "name":"string", + "content":"string", + "context":"$ref", + "variables":"$ref", + "flags":"number" +} +``` diff --git a/packages/osr-ai-templates/package-lock.json b/packages/osr-ai-templates/package-lock.json new file mode 100644 index 0000000..ac79b2c --- /dev/null +++ b/packages/osr-ai-templates/package-lock.json @@ -0,0 +1,2715 @@ +{ + "name": "@plastichub/osr-ai-templates", + "version": "0.1.4", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@plastichub/osr-ai-templates", + "version": "0.1.4", + "license": "BSD-3-Clause", + "dependencies": { + "@asteasolutions/zod-to-openapi": "^7.2.0", + "@plastichub/core": "^0.2.6", + "@plastichub/fs": "^0.13.32", + "@plastichub/osr-ai-tools": "file:../osr-ai-tools", + "@plastichub/osr-cli-commons": "file:../osr-cli-commons", + "@plastichub/osr-commons": "file:../osr-commons", + "@plastichub/osr-log": "file:../osr-log", + "convert-units": "^2.3.4", + "cryptr": "^6.0.3", + "env-var": "^7.1.1", + "filenamify": "^4.3.0", + "llm-tools-cli": "file:../osr-ai-tools", + "openai": "^4.76.3", + "querystring": "^0.2.1", + "sanitize-filename": "^1.6.3", + "shell-escape": "^0.2.0", + "tslog": "^4.9.3", + "typescript": "^5.6.3", + "yargs": "^17.7.2", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.23.5", + "zod-to-ts": "^1.2.0" + }, + "bin": { + "osr-ai-templates": "main.js" + }, + "devDependencies": { + "@types/download": "^8.0.1", + "@types/node": "^22.8.6", + "type-fest": "^4.30.1" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "../osr-ai-tools": { + "name": "@plastichub/osr-ai-tools", + "version": "1.0.0", + "dependencies": { + "@plastichub/core": "^0.2.6", + "@plastichub/fs": "^0.13.39", + "@plastichub/osr-commons": "file:../osr-commons", + "@plastichub/osr-log": "^0.1.1", + "axios": "^1.7.9", + "openai": "^4.76.3", + "p-map": "^4.0.0", + "simple-git": "^3.22.0", + "tslog": "^4.9.3", + "yargs": "^17.7.2", + "zod": "^3.24.1" + }, + "bin": { + "llm-tools": "main.js" + }, + "devDependencies": { + "@types/node": "^18.0.0", + "@types/yargs": "^17.0.0", + "ts-node": "^10.9.0", + "typescript": "^4.9.0" + } + }, + "../osr-cli-commons": { + "name": "@plastichub/osr-cli-commons", + "version": "0.5.2", + "license": "BSD-3-Clause", + "dependencies": { + "@asteasolutions/zod-to-openapi": "github:asteasolutions/zod-to-openapi", + "@plastichub/core": "^0.2.6", + "@plastichub/fs": "^0.13.32", + "@plastichub/osr-commons": "file:../osr-commons", + "@plastichub/osr-log": "file:../osr-log", + "ansi-regex": "^5.0.0", + "cryptr": "^6.0.3", + "env-var": "^7.1.1", + "fast-glob": "^3.2.11", + "glob": "^10.4.1", + "glob-base": "github:justin-caribou/glob-base", + "is-glob": "^4.0.3", + "p-map": "^4.0.0", + "parse-glob": "^3.0.4", + "tslog": "^4.9.3", + "typescript": "^5.6.3", + "yaml": "^2.6.0", + "yargs": "^17.7.2", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.23.5", + "zod-to-ts": "^1.2.0" + }, + "bin": { + "osr-cli": "main.js" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "@types/node": "^20.17.6", + "@types/yargs": "^17.0.33", + "jest": "^29.7.0", + "ts-jest": "^29.2.5" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "../osr-commons": { + "name": "@plastichub/osr-commons", + "version": "0.3.8", + "license": "BSD-3-Clause", + "dependencies": { + "@asteasolutions/zod-to-openapi": "^7.2.0", + "@plastichub/core": "^0.2.6", + "@plastichub/fs": "^0.13.39", + "cryptr": "^6.0.3", + "env-var": "^7.1.1", + "fast-glob": "^3.3.2", + "filenamify": "^4.3.0", + "glob": "^11.0.0", + "is-glob": "^4.0.3", + "parse-glob": "^3.0.4", + "sanitize-filename": "^1.6.3", + "tslog": "^4.9.3", + "typescript": "^5.6.3", + "yargs": "^17.7.2", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.23.5", + "zod-to-ts": "^1.2.0" + }, + "devDependencies": { + "@types/node": "^22.8.6" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "../osr-log": { + "name": "@plastichub/osr-log", + "version": "0.1.1", + "dependencies": { + "@plastichub/core": "^0.1.9", + "@plastichub/fs": "^0.13.39", + "@types/chokidar": "^2.1.3", + "@types/grunt": "^0.4.31", + "bluebird": "^3.7.2", + "cheerio": "^1.0.0-rc.10", + "chokidar": "^3.5.3", + "fast-glob": "^3.2.12", + "p-map": "^4.0.0", + "rotating-file-stream": "^3.2.5", + "tslog": "^4.9.3", + "yaml": "^2.4.2", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "zod": "^3.23.8" + } + }, + "node_modules/@asteasolutions/zod-to-openapi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@asteasolutions/zod-to-openapi/-/zod-to-openapi-7.2.0.tgz", + "integrity": "sha512-Va+Fq1QzKkSgmiYINSp3cASFhMsbdRH/kmCk2feijhC+yNjGoC056CRqihrVFhR8MY8HOZHdlYm2Ns2lmszCiw==", + "license": "MIT", + "dependencies": { + "openapi3-ts": "^4.1.2" + }, + "peerDependencies": { + "zod": "^3.20.2" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@plastichub/core": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@plastichub/core/-/core-0.2.6.tgz", + "integrity": "sha512-DF2IUZu6cw8+iVnFv2BFvd+s/7DYfrfXh7o3Uhg0IjbZ/QOIXY21URarnMQoTl9NEwUKN8ZZIHJmOIulT8helg==", + "license": "BSD", + "dependencies": { + "deepmerge": "^4.3.1", + "tslog": "^3.3.3" + } + }, + "node_modules/@plastichub/core/node_modules/tslog": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/tslog/-/tslog-3.3.4.tgz", + "integrity": "sha512-N0HHuHE0e/o75ALfkioFObknHR5dVchUad4F0XyFf3gXJYB++DewEzwGI/uIOM216E5a43ovnRNEeQIq9qgm4Q==", + "license": "MIT", + "dependencies": { + "source-map-support": "^0.5.21" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@plastichub/fs": { + "version": "0.13.39", + "resolved": "https://registry.npmjs.org/@plastichub/fs/-/fs-0.13.39.tgz", + "integrity": "sha512-Q96zN5LAlTmtj6gIbHbVM0erp2NgP+P4izRzdhqnMz/WopAvD7ZJxjQ/J44e67R6WKQuvcxt/eXPNaFBB5ehlg==", + "license": "BSD-3-Clause", + "dependencies": { + "@plastichub/core": "^0.2.1", + "@types/denodeify": "^1.2.31", + "@types/glob": "^8.1.0", + "@types/minimatch": "^3.0.3", + "@types/node": "^14.18.63", + "denodeify": "^1.2.1", + "errno": "^0.1.4", + "glob": "^10.4.1", + "mime": "^2.0.3", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "progress-stream": "^1.2.0", + "q": "^1.4.1", + "rimraf": "^2.7.1", + "throttle": "^1.0.3", + "trash": "^4.3.0", + "typescript": "^4.0.3", + "write-file-atomic": "^1.3.1", + "yargs": "^17.7.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@plastichub/fs/node_modules/@types/node": { + "version": "14.18.63", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", + "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", + "license": "MIT" + }, + "node_modules/@plastichub/fs/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@plastichub/osr-ai-tools": { + "resolved": "../osr-ai-tools", + "link": true + }, + "node_modules/@plastichub/osr-cli-commons": { + "resolved": "../osr-cli-commons", + "link": true + }, + "node_modules/@plastichub/osr-commons": { + "resolved": "../osr-commons", + "link": true + }, + "node_modules/@plastichub/osr-log": { + "resolved": "../osr-log", + "link": true + }, + "node_modules/@sindresorhus/df": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/df/-/df-2.1.0.tgz", + "integrity": "sha512-yozEsK3X8sEjh9fiolh3JntMUuGKe2n2t8gtE3yZ1PqAFFeaSxTrSiEVORy/YkPzUsxQ85RzLcGqmqSOgiFhtg==", + "license": "MIT", + "dependencies": { + "execa": "^0.2.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@sindresorhus/df/node_modules/execa": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.2.2.tgz", + "integrity": "sha512-zmBGzLd3nhA/NB9P7VLoceAO6vyYPftvl809Vjwe5U2fYI9tYWbeKqP3wZlAw9WS+znnkogf/bhSU+Gcn2NbkQ==", + "license": "MIT", + "dependencies": { + "cross-spawn-async": "^2.1.1", + "npm-run-path": "^1.0.0", + "object-assign": "^4.0.1", + "path-key": "^1.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/@sindresorhus/df/node_modules/npm-run-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz", + "integrity": "sha512-PrGAi1SLlqNvKN5uGBjIgnrTb8fl0Jz0a3JJmeMcGnIBh7UE9Gc4zsAMlwDajOMg2b1OgP6UPvoLUboTmMZPFA==", + "license": "MIT", + "dependencies": { + "path-key": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@sindresorhus/df/node_modules/path-key": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-1.0.0.tgz", + "integrity": "sha512-T3hWy7tyXlk3QvPFnT+o2tmXRzU4GkitkUWLp/WZ0S/FXd7XMx176tRurgTvHTNMJOQzTcesHNpBqetH86mQ9g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@types/decompress": { + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/@types/decompress/-/decompress-4.2.7.tgz", + "integrity": "sha512-9z+8yjKr5Wn73Pt17/ldnmQToaFHZxK0N1GHysuk/JIPT8RIdQeoInM01wWPgypRcvb6VH1drjuFpQ4zmY437g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/denodeify": { + "version": "1.2.35", + "resolved": "https://registry.npmjs.org/@types/denodeify/-/denodeify-1.2.35.tgz", + "integrity": "sha512-5ixm6RMZKJUMlFKPZj378M/NOCGdodVVzvkYKlYbGp6mQ/r1C7C5KVroSTsZTI75qqmczZeOhhGywcWVURPMMw==", + "license": "MIT" + }, + "node_modules/@types/download": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@types/download/-/download-8.0.5.tgz", + "integrity": "sha512-Ad68goc/BsL3atP3OP/lWKAKhiC6FduN1mC5yg9lZuGYmUY7vyoWBcXgt8GE9OzVWRq5IBXwm4o/QiE+gipZAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/decompress": "*", + "@types/got": "^9", + "@types/node": "*" + } + }, + "node_modules/@types/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", + "license": "MIT", + "dependencies": { + "@types/minimatch": "^5.1.2", + "@types/node": "*" + } + }, + "node_modules/@types/glob/node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "license": "MIT" + }, + "node_modules/@types/got": { + "version": "9.6.12", + "resolved": "https://registry.npmjs.org/@types/got/-/got-9.6.12.tgz", + "integrity": "sha512-X4pj/HGHbXVLqTpKjA2ahI4rV/nNBc9mGO2I/0CgAra+F2dKgMXnENv2SRpemScBzBAI4vMelIVYViQxlSE6xA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.8" + } + }, + "node_modules/@types/node-fetch": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, + "node_modules/@types/node-fetch/node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "license": "MIT", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/convert-units": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/convert-units/-/convert-units-2.3.4.tgz", + "integrity": "sha512-ERHfdA0UhHJp1IpwE6PnFJx8LqG7B1ZjJ20UvVCmopEnVCfER68Tbe3kvN63dLbYXDA2xFWRE6zd4Wsf0w7POg==", + "license": "MIT", + "dependencies": { + "lodash.foreach": "2.3.x", + "lodash.keys": "2.3.x" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn-async": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", + "integrity": "sha512-snteb3aVrxYYOX9e8BabYFK9WhCDhTlw1YQktfTthBogxri4/2r9U2nQc0ffY73ZAxezDc+U8gvHAeU1wy1ubQ==", + "deprecated": "cross-spawn no longer requires a build toolchain, use it instead", + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + } + }, + "node_modules/cross-spawn-async/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/cross-spawn-async/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/cryptr": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/cryptr/-/cryptr-6.3.0.tgz", + "integrity": "sha512-TA4byAuorT8qooU9H8YJhBwnqD151i1rcauHfJ3Divg6HmukHB2AYMp0hmjv2873J2alr4t15QqC7zAnWFrtfQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/denodeify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", + "integrity": "sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg==", + "license": "MIT" + }, + "node_modules/dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "license": "MIT", + "dependencies": { + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/env-var": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/env-var/-/env-var-7.5.0.tgz", + "integrity": "sha512-mKZOzLRN0ETzau2W2QXefbFjo5EF4yWq28OyKb9ICdeNhHJlOE/pHHnz4hdYJ9cNZXcJHo5xN4OT4pzuSHSNvA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "license": "MIT", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-applescript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-applescript/-/escape-string-applescript-2.0.0.tgz", + "integrity": "sha512-Z7OsRJUi5+OHT89RRJlkS8cKxIh9AyPmgtEevsSQFCx5WLIiS3hy/HRiiQZzYQMsn6MWyCDZ5elBFa/9dxT0BA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/execa/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/execa/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC" + }, + "node_modules/execa/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/filenamify": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz", + "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==", + "license": "MIT", + "dependencies": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.1", + "trim-repeated": "^1.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.2.tgz", + "integrity": "sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/form-data-encoder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", + "license": "MIT" + }, + "node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "license": "MIT", + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, + "node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha512-yANWAN2DUcBtuus5Cpd+SKROzXHs2iVXFZt/Ykrfz6SAXqacLX25NZpltE+39ceMexYF4TtEadjuSTw8+3wX4g==", + "license": "MIT", + "dependencies": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "license": "MIT" + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/llm-tools-cli": { + "resolved": "../osr-ai-tools", + "link": true + }, + "node_modules/lodash._basebind": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.3.0.tgz", + "integrity": "sha512-SHqM7YCuJ+BeGTs7lqpWnmdHEeF4MWxS3dksJctHFNxR81FXPOzA4bS5Vs5CpcGTkBpM8FCl+YEbQEblRw8ABg==", + "license": "MIT", + "dependencies": { + "lodash._basecreate": "~2.3.0", + "lodash._setbinddata": "~2.3.0", + "lodash.isobject": "~2.3.0" + } + }, + "node_modules/lodash._basecreate": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.3.0.tgz", + "integrity": "sha512-vwZaWldZwS2y9b99D8i9+WtgiZXbHKsBsMrpxJEqTsNW20NhJo5W8PBQkeQO9CmxuqEYn8UkMnfEM2MMT4cVrw==", + "license": "MIT", + "dependencies": { + "lodash._renative": "~2.3.0", + "lodash.isobject": "~2.3.0", + "lodash.noop": "~2.3.0" + } + }, + "node_modules/lodash._basecreatecallback": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.3.0.tgz", + "integrity": "sha512-Ev+pDzzfVfgbiucpXijconLGRBar7/+KNCf05kSnk4CmdDVhAy1RdbU9efCJ/o9GXI08JdUGwZ+5QJ3QX3kj0g==", + "license": "MIT", + "dependencies": { + "lodash._setbinddata": "~2.3.0", + "lodash.bind": "~2.3.0", + "lodash.identity": "~2.3.0", + "lodash.support": "~2.3.0" + } + }, + "node_modules/lodash._basecreatewrapper": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.3.0.tgz", + "integrity": "sha512-YLycQ7k8AB9Wc1EOvLNxuRWcqipDkMXq2GCgnLWQR6qtgTb3gY3LELzEpnFshrEO4LOLs+R2EpcY+uCOZaLQ8Q==", + "license": "MIT", + "dependencies": { + "lodash._basecreate": "~2.3.0", + "lodash._setbinddata": "~2.3.0", + "lodash._slice": "~2.3.0", + "lodash.isobject": "~2.3.0" + } + }, + "node_modules/lodash._createwrapper": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.3.0.tgz", + "integrity": "sha512-XjaI/rzg9W+WO4WJDQ+PRlHD5sAMJ1RhJLuT65cBxLCb1kIYs4U20jqvTDGAWyVT3c34GYiLd9AreHYuB/8yJA==", + "license": "MIT", + "dependencies": { + "lodash._basebind": "~2.3.0", + "lodash._basecreatewrapper": "~2.3.0", + "lodash.isfunction": "~2.3.0" + } + }, + "node_modules/lodash._objecttypes": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.3.0.tgz", + "integrity": "sha512-jbA6QyHt9cw3BzvbWzIcnU3Z12jSneT6xBgz3Y782CJsN1tV5aTBKrFo2B4AkeHBNaxSrbPYZZpi1Lwj3xjdtg==", + "license": "MIT" + }, + "node_modules/lodash._renative": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._renative/-/lodash._renative-2.3.0.tgz", + "integrity": "sha512-v44MRirqYqZGK/h5UKoVqXWF2L+LUiLTU+Ogu5rHRVWJUA1uWIlHaMpG8f/OA8j++BzPMQij9+erXHtgFcbuwg==", + "license": "MIT" + }, + "node_modules/lodash._setbinddata": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.3.0.tgz", + "integrity": "sha512-xMFfbF7dL+sFtrdE49uHFmfpBAEwlFtfgMp86nQRlAF6aizYL+3MTbnYMKJSkP1W501PhsgiBED5kBbZd8kR2g==", + "license": "MIT", + "dependencies": { + "lodash._renative": "~2.3.0", + "lodash.noop": "~2.3.0" + } + }, + "node_modules/lodash._shimkeys": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.3.0.tgz", + "integrity": "sha512-9Iuyi7TiWMGa/9+2rqEE+Zwye4b/U2w7Saw6UX1h6Xs88mEER+uz9FZcEBPKMVKsad9Pw5GNAcIBRnW2jNpneQ==", + "license": "MIT", + "dependencies": { + "lodash._objecttypes": "~2.3.0" + } + }, + "node_modules/lodash._slice": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.3.0.tgz", + "integrity": "sha512-7C61GhzRUv36gTafr+RIb+AomCAYsSATEoK4OP0VkNBcwvsM022Z22AVgqjjzikeNO1U29LzsJZDvLbiNPUYvA==", + "license": "MIT" + }, + "node_modules/lodash.bind": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.3.0.tgz", + "integrity": "sha512-goakyOo+FMN8lttMPnZ0UNlr5RlzX4IrUXyTJPT2A0tGCMXySupond9wzvDqTvVmYTcQjIKGrj8naJDS2xWAlQ==", + "license": "MIT", + "dependencies": { + "lodash._createwrapper": "~2.3.0", + "lodash._renative": "~2.3.0", + "lodash._slice": "~2.3.0" + } + }, + "node_modules/lodash.foreach": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-2.3.0.tgz", + "integrity": "sha512-yLnyptVRJd0//AbGp480grgQG9iaDIV5uOgSbpurRy1dYybPbjNTLQ3FyLEQ84buVLPG7jyaiyvpzgfOutRB3Q==", + "license": "MIT", + "dependencies": { + "lodash._basecreatecallback": "~2.3.0", + "lodash.forown": "~2.3.0" + } + }, + "node_modules/lodash.forown": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.forown/-/lodash.forown-2.3.0.tgz", + "integrity": "sha512-dUnCsuQTtq3Y7bxPNoEEqjJjPL2ftLtcz2PTeRKvhbpdM514AvnqCjewHGsm/W+dwspIwa14KoWEZeizJ7smxA==", + "license": "MIT", + "dependencies": { + "lodash._basecreatecallback": "~2.3.0", + "lodash._objecttypes": "~2.3.0", + "lodash.keys": "~2.3.0" + } + }, + "node_modules/lodash.identity": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.3.0.tgz", + "integrity": "sha512-NYJ2r2cwy3tkx/saqbIZEX6oQUzjWTnGRu7d/zmBjMCZos3eHBxCpbvWFWSetv8jFVrptsp6EbWjzNgBKhUoOA==", + "license": "MIT" + }, + "node_modules/lodash.isfunction": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-2.3.0.tgz", + "integrity": "sha512-X5lteBYlCrVO7Qc00fxP8W90fzRp6Ax9XcHANmU3OsZHdSyIVZ9ZlX5QTTpRq8aGY+9I5Rmd0UTzTIIyWPugEQ==", + "license": "MIT" + }, + "node_modules/lodash.isobject": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.3.0.tgz", + "integrity": "sha512-jo1pfV61C4TE8BfEzqaHj6EIKiSkFANJrB6yscwuCJMSRw5tbqjk4Gv7nJzk4Z6nFKobZjGZ8Qd41vmnwgeQqQ==", + "license": "MIT", + "dependencies": { + "lodash._objecttypes": "~2.3.0" + } + }, + "node_modules/lodash.keys": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.3.0.tgz", + "integrity": "sha512-c0UW0ffqMxSCtoVbmVt2lERJLkEqgoOn2ejPsWXzr0ZrqRbl3uruGgwHzhtqXxi6K/ei3Ey7zimOqSwXgzazPg==", + "license": "MIT", + "dependencies": { + "lodash._renative": "~2.3.0", + "lodash._shimkeys": "~2.3.0", + "lodash.isobject": "~2.3.0" + } + }, + "node_modules/lodash.noop": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.3.0.tgz", + "integrity": "sha512-NpSm8HRm1WkBBWHUveDukLF4Kfb5P5E3fjHc9Qre9A11nNubozLWD2wH3UBTZbu+KSuX8aSUvy9b+PUyEceJ8g==", + "license": "MIT" + }, + "node_modules/lodash.support": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/lodash.support/-/lodash.support-2.3.0.tgz", + "integrity": "sha512-etc7VWbB0U3Iya8ixj2xy4sDBN3jvPX7ODi8iXtn4KkkjNpdngrdc7Vlt5jub/Vgqx6/dWtp7Ml9awhCQPYKGQ==", + "license": "MIT", + "dependencies": { + "lodash._renative": "~2.3.0" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mount-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mount-point/-/mount-point-3.0.0.tgz", + "integrity": "sha512-jAhfD7ZCG+dbESZjcY1SdFVFqSJkh/yGbdsifHcPkvuLRO5ugK0Ssmd9jdATu29BTd4JiN+vkpMzVvsUgP3SZA==", + "license": "MIT", + "dependencies": { + "@sindresorhus/df": "^1.0.1", + "pify": "^2.3.0", + "pinkie-promise": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mount-point/node_modules/@sindresorhus/df": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/df/-/df-1.0.1.tgz", + "integrity": "sha512-1Hyp7NQnD/u4DSxR2DGW78TF9k7R0wZ8ev0BpMAIzA6yTQSHqNb5wTuvtcPYf4FWbVse2rW7RgDsyL8ua2vXHw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mount-point/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "license": "MIT", + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==", + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/openai": { + "version": "4.76.3", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.76.3.tgz", + "integrity": "sha512-BISkI90m8zT7BAMljK0j00TzOoLvmc7AulPxv6EARa++3+hhIK5G6z4xkITurEaA9bvDhQ09kSNKA3DL+rDMwA==", + "license": "Apache-2.0", + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" + }, + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + } + }, + "node_modules/openai/node_modules/@types/node": { + "version": "18.19.68", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.68.tgz", + "integrity": "sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/openai/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, + "node_modules/openapi3-ts": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-4.4.0.tgz", + "integrity": "sha512-9asTNB9IkKEzWMcHmVZE7Ts3kC9G7AFHfs8i7caD8HbI76gEjdkId4z/AkP83xdZsH7PLAnnbl47qZkXuxpArw==", + "license": "MIT", + "dependencies": { + "yaml": "^2.5.0" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "license": "MIT", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/progress-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", + "integrity": "sha512-MIBPjZz6oGNSw5rn2mSp+nP9FGoaVo6QsPyPVEaD4puilz5hZNa3kfnrlqRNYFsugslbU3An4mnkLLtZOaWvrA==", + "license": "BSD-2-Clause", + "dependencies": { + "speedometer": "~0.1.2", + "through2": "~0.2.3" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "license": "MIT" + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "license": "ISC" + }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "license": "MIT", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/querystring": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", + "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "license": "MIT", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-applescript": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-3.2.0.tgz", + "integrity": "sha512-Ep0RsvAjnRcBX1p5vogbaBdAGu/8j/ewpvGqnQYunnLd9SM0vWcPJewPKNnWFggf0hF0pwIgwV5XK7qQ7UZ8Qg==", + "license": "MIT", + "dependencies": { + "execa": "^0.10.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/sanitize-filename": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", + "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", + "license": "WTFPL OR ISC", + "dependencies": { + "truncate-utf8-bytes": "^1.0.0" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-escape": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/shell-escape/-/shell-escape-0.2.0.tgz", + "integrity": "sha512-uRRBT2MfEOyxuECseCZd28jC1AJ8hmqqneWQ4VWUTgCAFvb3wKU1jLqj6egC4Exrr88ogg3dp+zroH4wJuaXzw==", + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==", + "license": "ISC", + "engines": { + "node": "*" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/speedometer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", + "integrity": "sha512-phdEoDlA6EUIVtzwq1UiNMXDUogczp204aYF/yfOhjNePWFfIpBJ1k5wLMuXQhEOOMjuTJEcc4vdZa+vuP+n/Q==" + }, + "node_modules/stream-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/stream-parser/-/stream-parser-0.3.1.tgz", + "integrity": "sha512-bJ/HgKq41nlKvlhccD5kaCr/P+Hu0wPNKPJOH7en+YrJu/9EgqUF+88w5Jb6KNcjOFMhfX4B2asfeAtIGuHObQ==", + "license": "MIT", + "dependencies": { + "debug": "2" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/throttle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/throttle/-/throttle-1.0.3.tgz", + "integrity": "sha512-VYINSQFQeFdmhCds0tTqvQmLmdAjzGX1D6GnRQa4zlq8OpTtWSMddNyRq8Z4Snw/d6QZrWt9cM/cH8xTiGUkYA==", + "dependencies": { + "readable-stream": ">= 0.3.0", + "stream-parser": ">= 0.0.2" + }, + "engines": { + "node": ">= v0.8.0" + } + }, + "node_modules/through2": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "integrity": "sha512-mLa8Bn2mZurjyomGKWRu3Bo2mvoQojFks9NvOK8H+k4kDJNkdEqG522KFZsEFBEl6rKkxTgFbE5+OPcgfvPEHA==", + "license": "MIT", + "dependencies": { + "readable-stream": "~1.1.9", + "xtend": "~2.1.1" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/trash": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/trash/-/trash-4.3.0.tgz", + "integrity": "sha512-f36TKwIaBiXm63xSrn8OTNghg5CYHBsFVJvcObMo76LRpgariuRi2CqXQHw1VzfeximD0igdGaonOG6N760BtQ==", + "license": "MIT", + "dependencies": { + "escape-string-applescript": "^2.0.0", + "fs-extra": "^0.30.0", + "globby": "^7.1.1", + "p-map": "^1.2.0", + "p-try": "^1.0.0", + "pify": "^3.0.0", + "run-applescript": "^3.0.0", + "uuid": "^3.1.0", + "xdg-trashdir": "^2.1.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/truncate-utf8-bytes": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", + "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==", + "license": "WTFPL", + "dependencies": { + "utf8-byte-length": "^1.0.1" + } + }, + "node_modules/tslog": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/tslog/-/tslog-4.9.3.tgz", + "integrity": "sha512-oDWuGVONxhVEBtschLf2cs/Jy8i7h1T+CpdkTNWQgdAF7DhRo2G8vMCgILKe7ojdEkLhICWgI1LYSSKaJsRgcw==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/fullstack-build/tslog?sponsor=1" + } + }, + "node_modules/type-fest": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.1.tgz", + "integrity": "sha512-ojFL7eDMX2NF0xMbDwPZJ8sb7ckqtlAi1GsmgsFXvErT9kFTk1r0DuQKvrCh73M6D4nngeHJmvogF9OluXs7Hw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, + "node_modules/user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha512-KMWqdlOcjCYdtIJpicDSFBQ8nFwS2i9sslAd6f4+CBGcU4gist2REnr2fxj2YocvJFxSF3ZOHLYLVZnUxv4BZQ==", + "license": "MIT", + "dependencies": { + "os-homedir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/utf8-byte-length": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", + "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==", + "license": "(WTFPL OR MIT)" + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/web-streams-polyfill": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", + "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha512-SdrHoC/yVBPpV0Xq/mUZQIpW2sWXAShb/V4pomcJXh92RuaO+f3UTWItiR3Px+pLnV2PvC2/bfn5cwr5X6Vfxw==", + "license": "ISC", + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, + "node_modules/xdg-basedir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", + "integrity": "sha512-NF1pPn594TaRSUO/HARoB4jK8I+rWgcpVlpQCK6/6o5PHyLUt2CSiDrpUZbQ6rROck+W2EwF8mBJcTs+W98J9w==", + "license": "MIT", + "dependencies": { + "os-homedir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/xdg-trashdir": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/xdg-trashdir/-/xdg-trashdir-2.1.1.tgz", + "integrity": "sha512-KcVhPaOu2ZurYNHSRTf1+ZHORkTZGCQ+u0JHN17QixRISJq4pXOnjt/lQcehvtHL5QAKhSzKgyjrcNnPdkPBHA==", + "license": "MIT", + "dependencies": { + "@sindresorhus/df": "^2.1.0", + "mount-point": "^3.0.0", + "pify": "^2.2.0", + "user-home": "^2.0.0", + "xdg-basedir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/xdg-trashdir/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==", + "dependencies": { + "object-keys": "~0.4.0" + }, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.23.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.23.5.tgz", + "integrity": "sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.23.3" + } + }, + "node_modules/zod-to-ts": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zod-to-ts/-/zod-to-ts-1.2.0.tgz", + "integrity": "sha512-x30XE43V+InwGpvTySRNz9kB7qFU8DlyEy7BsSTCHPH1R0QasMmHWZDCzYm6bVXtj/9NNJAZF3jW8rzFvH5OFA==", + "peerDependencies": { + "typescript": "^4.9.4 || ^5.0.2", + "zod": "^3" + } + } + } +} diff --git a/packages/osr-ai-templates/package.json b/packages/osr-ai-templates/package.json new file mode 100644 index 0000000..fcd81d3 --- /dev/null +++ b/packages/osr-ai-templates/package.json @@ -0,0 +1,57 @@ +{ + "name": "@plastichub/osr-ai-templates", + "version": "0.1.4", + "typings": "index.d.ts", + "publishConfig": { + "access": "public" + }, + "bin": { + "osr-ai-templates": "main.js" + }, + "dependencies": { + "@asteasolutions/zod-to-openapi": "^7.2.0", + "@plastichub/core": "^0.2.6", + "@plastichub/fs": "^0.13.32", + "@plastichub/osr-ai-tools": "file:../osr-ai-tools", + "@plastichub/osr-cli-commons": "file:../osr-cli-commons", + "@plastichub/osr-commons": "file:../osr-commons", + "@plastichub/osr-log": "file:../osr-log", + "convert-units": "^2.3.4", + "cryptr": "^6.0.3", + "env-var": "^7.1.1", + "filenamify": "^4.3.0", + "llm-tools-cli": "file:../osr-ai-tools", + "openai": "^4.76.3", + "querystring": "^0.2.1", + "sanitize-filename": "^1.6.3", + "shell-escape": "^0.2.0", + "tslog": "^4.9.3", + "typescript": "^5.6.3", + "yargs": "^17.7.2", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.23.5", + "zod-to-ts": "^1.2.0" + }, + "devDependencies": { + "@types/download": "^8.0.1", + "@types/node": "^22.8.6", + "type-fest": "^4.30.1" + }, + "scripts": { + "dev": "tsc -p . --declaration -w", + "build": "tsc -p . --declaration", + "docs": "npx typedoc src/index.ts" + }, + "homepage": "https://git.osr-plastic.org/osr-plastic/osr-commons", + "repository": { + "type": "git", + "url": "https://git.osr-plastic.org/osr-plastic/osr-commons.git" + }, + "engines": { + "node": ">= 14.0.0" + }, + "license": "BSD-3-Clause", + "keywords": [ + "typescript" + ] +} diff --git a/packages/osr-ai-templates/prompts/documents.json b/packages/osr-ai-templates/prompts/documents.json new file mode 100644 index 0000000..4e5a0f1 --- /dev/null +++ b/packages/osr-ai-templates/prompts/documents.json @@ -0,0 +1,4 @@ +[ + "Extract all data, as Markdown table", + "Extract all items, \r\n\r\nthese are the columns : \r\n- name ('Referencia')\r\n- thickness ('Espesor')\r\n- material ('Cantidad', st37 = 304L, st37 = steel),\r\n- quantity('Cantidad')\r\n- unit price ('precio')\r\n- price ('importe')\r\n\r\nas csv" +] \ No newline at end of file diff --git a/packages/osr-ai-templates/src/.gitignore b/packages/osr-ai-templates/src/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-ai-templates/src/_cli.ts b/packages/osr-ai-templates/src/_cli.ts new file mode 100644 index 0000000..188a374 --- /dev/null +++ b/packages/osr-ai-templates/src/_cli.ts @@ -0,0 +1,12 @@ +export const defaults = () => { + // default command + const DefaultCommand = 'info'; + if (process.argv.length === 2) { + process.argv.push(DefaultCommand); + } + + // currently no default handler, display only : + process.on('unhandledRejection', (reason: string) => { + console.error('Unhandled rejection, reason: ', reason); + }); +} \ No newline at end of file diff --git a/packages/osr-ai-templates/src/commands/templates.ts b/packages/osr-ai-templates/src/commands/templates.ts new file mode 100644 index 0000000..ea82757 --- /dev/null +++ b/packages/osr-ai-templates/src/commands/templates.ts @@ -0,0 +1,29 @@ +import * as CLI from 'yargs' +import { sync as write } from '@plastichub/fs/write' +import { Documents, Markdown, Typescript } from '../common/system' + +const defaultOptions = (yargs: CLI.Argv) => { + yargs.parserConfiguration({ + "camel-case-expansion": false + }) + return yargs.option('dst', { + description: 'destination output path', + default: "./common/default.json" + }) +} +let options = (yargs: CLI.Argv) => defaultOptions(yargs) +export const register = (cli: CLI.Argv) => { + return cli.command('templates', 'Testing stuff', options, async (argv: CLI.Arguments) => { + if (argv.help) { + return + } + const defaults = [...Typescript(), ...Documents(), ...Markdown()] + write(argv.dst, JSON.stringify(defaults, null, 2)) + }) +} +register(CLI) +const argv: any = CLI.argv +if (argv.help) { + CLI.showHelp() + process.exit() +} \ No newline at end of file diff --git a/packages/osr-ai-templates/src/common/system.ts b/packages/osr-ai-templates/src/common/system.ts new file mode 100644 index 0000000..7e86ff1 --- /dev/null +++ b/packages/osr-ai-templates/src/common/system.ts @@ -0,0 +1,153 @@ +import { sync as read } from '@plastichub/fs/read' +import { resolve, join } from 'path' + +export const resolvePackagePath = (path:string): string => { + return resolve(join(__dirname, path)) +} + +export interface Role { + role: string + content: string +} + +export const OSRTypescript = (mixin = []) => { + return [ + { + role: "user", + content: read(resolvePackagePath("osr-typescript.md")) + } + ].concat(mixin) +} + +export const Exports = (mixin = []) => { + return [ + { + role: "user", + content: read(resolvePackagePath("osr-exports.md")) + } + ].concat(mixin) +} + +export const Commons = (mixin = []) => { + return [ + { + role: "system", + content: "never shorten the output for my prompts!" + }, + { + role: "system", + content: "be short, dont explain, just generate code!, with no comments" + }, + { + role: "system", + content: "dont add foot notes, or any kind of comments, just generate code!" + }, + { + role: "system", + content: "if not specified, always output as markdown" + } + ].concat(mixin) +} + +export const Documents = (mixin = []) => { + return [ + { + role: "system", + content: "never shorten the output for my prompts, always process all data!" + }, + { + role: "system", + content: "be short, dont explain, just generate code or data, with no comments" + }, + { + role: "system", + content: "dont add foot notes, or any kind of comments" + }, + { + role: "system", + content: "if not specified, always output as markdown" + } + ].concat(mixin) +} + +export const Typescript = (mixin = []) => { + const defaults = [ + { + role: "system", + content: "for Typescript enums, always use double quotes for keys and values" + }, + { + role: "system", + content: "for Typescript enums & classes, always use pascal case for names, and export them" + }, + { + role: "system", + content: "for Typescript enums, dont add duplicates" + }, + { + role: "system", + content: "for Typescript enums, always sort the keys alphabetically" + }, + { + role: "system", + content: "for gps coordinates, always use strings, not numbers, in short form" + }, + { + role: "system", + content: "for typescript code, please add a comment at the beginning of the file, with the query that generated the code" + }, + { + role: "system", + content: "for typescript code : no comments" + }, + { + role: "system", + content: "for Typescript : no semi colons, no trailing commas, no spaces in parens, no spaces in brackets, no spaces in braces" + } + ] + return defaults.concat(mixin) +} +export const TypescriptLibraries = (mixin = []) => { + const defaults = [ + { + role: "user", + content: "for Typescript, dont use chalk, commander, ora, or any other fancy library, just use the basics, always use imports, never require. use tslog, yargs, axios and Zod whenevern possible" + } + + ] + return defaults.concat(mixin) +} +export const TypescriptEnvironmentCLI = (mixin = []) => { + const layout = [ + "src/index.ts (create ts logger)", + "src/main.ts (yargs main entry)", + "src/constants.ts (tslog logger name)", + "src/zod_schemas.ts (all zod schemas go here)", + "src/commands/index.ts (register all commands from src/commands/** here, commands always import functions from src/lib/category )", + "src/commands/types.ts (command to write zod schemas to Typescript interfaces)", + //"src/lib/index.ts (export all functions)", + //"readme.md (add all commands here)", + "package.json (leave dependencies empty, add common scripts)", + ] + const defaults = [ + { + role: "system", + content: "for Typescript boilerplates, use this layout for CLI projects: \n" + layout.join("\n") + }, + { + role: "system", + content: "when using yargs, all commands are async" + }, + + ] + return defaults.concat(mixin) +} +export const Markdown = (mixin = []) => { + const defaults = [ + { + role: "system", + content: "for markdown code, please add a caption (header level 1) at the beginning of the file, with the exact query that generated the code" + } + ] + return defaults.concat(mixin) +} diff --git a/packages/osr-ai-templates/src/constants.ts b/packages/osr-ai-templates/src/constants.ts new file mode 100644 index 0000000..68cc88f --- /dev/null +++ b/packages/osr-ai-templates/src/constants.ts @@ -0,0 +1 @@ +export const MODULE_NAME = `OSR-AI-TEMPLATES` diff --git a/packages/osr-ai-templates/src/index.ts b/packages/osr-ai-templates/src/index.ts new file mode 100644 index 0000000..f1b6d0a --- /dev/null +++ b/packages/osr-ai-templates/src/index.ts @@ -0,0 +1,4 @@ +export const MODULE_NAME = `OSR-AI-TEMPLATES` +import { logger as _logger } from '@plastichub/core/debug' +export const logger = _logger(MODULE_NAME) +export * from './common/system' diff --git a/packages/osr-ai-templates/src/lib.ts b/packages/osr-ai-templates/src/lib.ts new file mode 100644 index 0000000..65bcc17 --- /dev/null +++ b/packages/osr-ai-templates/src/lib.ts @@ -0,0 +1 @@ +export * from './templates' diff --git a/packages/osr-ai-templates/src/main.ts b/packages/osr-ai-templates/src/main.ts new file mode 100644 index 0000000..da55c93 --- /dev/null +++ b/packages/osr-ai-templates/src/main.ts @@ -0,0 +1,11 @@ +#!/usr/bin/env node +import { defaults } from './_cli'; defaults() +import * as cli from 'yargs' +import { register as registerInfo } from './commands/templates'; registerInfo(cli) +const argv: any = cli.argv +if (argv.help) { + cli.showHelp() + process.exit() +} else if (argv.v || argv.version) { + process.exit() +} diff --git a/packages/osr-ai-templates/src/templates/index.ts b/packages/osr-ai-templates/src/templates/index.ts new file mode 100644 index 0000000..77c232e --- /dev/null +++ b/packages/osr-ai-templates/src/templates/index.ts @@ -0,0 +1,85 @@ +import { ChatCompletionMessageParam } from "openai/resources/chat/completions" +import { filesEx as glob } from '@plastichub/osr-commons/_glob' +import { substitute, resolve } from '@plastichub/osr-commons' +import { } from '@plastichub/osr-commons/config' +import { sync as read } from '@plastichub/fs/read' +import { sync as exists } from '@plastichub/fs/exists' +import * as path from 'node:path' +import { PackageJson } from 'type-fest' + +import { tools as defaultTools } from "@plastichub/osr-ai-tools/tools" +import { logger } from "../" + +const API_PREFIX = 'polymech' +const TEMPLATE_PREFIX = 'ai-template' + +export const TEMPLATE_ROOT = "${POLYMECH-ROOT}" + +export type TMessageParam = ChatCompletionMessageParam & { type?: string } +export type ITemplateConfig = PackageJson & +{ + instructions?: string | string[] + glob?: string | string[], + tools?: any[] +} + +export const resolvePackagePath = (dir: string): string => resolve(path.join(__dirname, dir || '')) + +export const template_path = (template: string) => path.resolve(resolve(path.join(TEMPLATE_ROOT, `${TEMPLATE_PREFIX}-${template}`))) + +export const load = (options: any = {}) => { + const templateDir = template_path(options.template) + const target = path.resolve(options.output || options.path) + if (!exists(target)) { + logger.error(`Target directory ${target} does not exist.`) + return { + glob: [], + messages: [], + tools: [] + } + } + if (!exists(templateDir)) { + return { + glob: [], + messages: [], + tools: [] + } + } + const config: ITemplateConfig = read(path.join(templateDir, "package.json"), 'json') as ITemplateConfig || {} + let files = glob(templateDir, options.glob || config.glob || [], {}).filter((file: string) => file.toLowerCase() !== "readme.md") + files = files.filter((file: string) => !options.disable.includes(path.parse(file).name)) + const messages = files.map((file: string) => { + return { + role: "system", + content: substitute(false, read(file, 'string') as string, options.variables, true) + } + }) as TMessageParam[] + + const tools = (config.tools || []).map((tool: any) => { + if (defaultTools[tool]) { + try { + return defaultTools[tool](target) + } catch (e) { + logger.error(`Error loading tool ${tool}`, e.message) + } + } + const toolPath = path.resolve(path.join(templateDir, tool)) + if (exists(toolPath)) { + try { + const tTool = require(toolPath) + if (tTool && tTool.tools) { + return tTool.tools(target) + } else { + logger.error(`Error loading tool ${tool}`, `No 'tools' function exported in ${toolPath}`) + } + } catch (e) { + logger.error(e) + } + } + }).flat().filter((tool: any) => tool).filter((tool: any) => options.disableTools.includes(tool.function.name) === false) + return { + glob: config.glob, + messages, + tools + } +} diff --git a/packages/osr-ai-templates/src/templates/typescript-cli/index.ts b/packages/osr-ai-templates/src/templates/typescript-cli/index.ts new file mode 100644 index 0000000..b6c9b2d --- /dev/null +++ b/packages/osr-ai-templates/src/templates/typescript-cli/index.ts @@ -0,0 +1,3 @@ +import { ChatCompletionTool } from "openai/resources/index.mjs" +import { tools } from "@plastichub/osr-ai-tools/tools" +export const foo = 2 \ No newline at end of file diff --git a/packages/osr-ai-templates/templates/index.d.ts b/packages/osr-ai-templates/templates/index.d.ts new file mode 100644 index 0000000..aefce4a --- /dev/null +++ b/packages/osr-ai-templates/templates/index.d.ts @@ -0,0 +1,18 @@ +import { ChatCompletionMessageParam } from "openai/resources/chat/completions"; +import { PackageJson } from 'type-fest'; +export declare const TEMPLATE_ROOT = "${POLYMECH-ROOT}"; +export type TMessageParam = ChatCompletionMessageParam & { + type?: string; +}; +export type ITemplateConfig = PackageJson & { + instructions?: string | string[]; + glob?: string | string[]; + tools?: any[]; +}; +export declare const resolvePackagePath: (dir: string) => string; +export declare const template_path: (template: string) => string; +export declare const load: (options?: any) => { + glob: string | string[]; + messages: TMessageParam[]; + tools: any[]; +}; diff --git a/packages/osr-ai-templates/templates/index.js b/packages/osr-ai-templates/templates/index.js new file mode 100644 index 0000000..ec24f32 --- /dev/null +++ b/packages/osr-ai-templates/templates/index.js @@ -0,0 +1,100 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.load = exports.template_path = exports.resolvePackagePath = exports.TEMPLATE_ROOT = void 0; +const _glob_1 = require("@plastichub/osr-commons/_glob"); +const osr_commons_1 = require("@plastichub/osr-commons"); +const read_1 = require("@plastichub/fs/read"); +const exists_1 = require("@plastichub/fs/exists"); +const path = __importStar(require("node:path")); +const tools_1 = require("@plastichub/osr-ai-tools/tools"); +const __1 = require("../"); +const API_PREFIX = 'polymech'; +const TEMPLATE_PREFIX = 'ai-template'; +exports.TEMPLATE_ROOT = "${POLYMECH-ROOT}"; +const resolvePackagePath = (dir) => (0, osr_commons_1.resolve)(path.join(__dirname, dir || '')); +exports.resolvePackagePath = resolvePackagePath; +const template_path = (template) => path.resolve((0, osr_commons_1.resolve)(path.join(exports.TEMPLATE_ROOT, `${TEMPLATE_PREFIX}-${template}`))); +exports.template_path = template_path; +const load = (options = {}) => { + const templateDir = (0, exports.template_path)(options.template); + const target = path.resolve(options.output || options.path); + if (!(0, exists_1.sync)(target)) { + __1.logger.error(`Target directory ${target} does not exist.`); + return { + glob: [], + messages: [], + tools: [] + }; + } + if (!(0, exists_1.sync)(templateDir)) { + return { + glob: [], + messages: [], + tools: [] + }; + } + const config = (0, read_1.sync)(path.join(templateDir, "package.json"), 'json') || {}; + let files = (0, _glob_1.filesEx)(templateDir, options.glob || config.glob || [], {}).filter((file) => file.toLowerCase() !== "readme.md"); + files = files.filter((file) => !options.disable.includes(path.parse(file).name)); + const messages = files.map((file) => { + return { + role: "system", + content: (0, osr_commons_1.substitute)(false, (0, read_1.sync)(file, 'string'), options.variables, true) + }; + }); + const tools = (config.tools || []).map((tool) => { + if (tools_1.tools[tool]) { + try { + return tools_1.tools[tool](target); + } + catch (e) { + __1.logger.error(`Error loading tool ${tool}`, e.message); + } + } + const toolPath = path.resolve(path.join(templateDir, tool)); + if ((0, exists_1.sync)(toolPath)) { + try { + const tTool = require(toolPath); + if (tTool && tTool.tools) { + return tTool.tools(target); + } + else { + __1.logger.error(`Error loading tool ${tool}`, `No 'tools' function exported in ${toolPath}`); + } + } + catch (e) { + __1.logger.error(e); + } + } + }).flat().filter((tool) => tool).filter((tool) => options.disableTools.includes(tool.function.name) === false); + return { + glob: config.glob, + messages, + tools + }; +}; +exports.load = load; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/templates/index.js.map b/packages/osr-ai-templates/templates/index.js.map new file mode 100644 index 0000000..42ca48c --- /dev/null +++ b/packages/osr-ai-templates/templates/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yDAA+D;AAC/D,yDAA6D;AAE7D,8CAAkD;AAClD,kDAAsD;AACtD,gDAAiC;AAGjC,0DAAsE;AACtE,2BAA4B;AAE5B,MAAM,UAAU,GAAG,UAAU,CAAA;AAC7B,MAAM,eAAe,GAAG,aAAa,CAAA;AAExB,QAAA,aAAa,GAAG,kBAAkB,CAAA;AAUxC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,IAAA,qBAAO,EAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAA;AAAtF,QAAA,kBAAkB,sBAAoE;AAE5F,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAA,qBAAO,EAAC,IAAI,CAAC,IAAI,CAAC,qBAAa,EAAE,GAAG,eAAe,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAA;AAAvH,QAAA,aAAa,iBAA0G;AAE7H,MAAM,IAAI,GAAG,CAAC,UAAe,EAAE,EAAE,EAAE;IACtC,MAAM,WAAW,GAAG,IAAA,qBAAa,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,IAAI,CAAC,IAAA,aAAM,EAAC,MAAM,CAAC,EAAE,CAAC;QAClB,UAAM,CAAC,KAAK,CAAC,oBAAoB,MAAM,kBAAkB,CAAC,CAAA;QAC1D,OAAO;YACH,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,EAAE;SACZ,CAAA;IACL,CAAC;IACD,IAAI,CAAC,IAAA,aAAM,EAAC,WAAW,CAAC,EAAE,CAAC;QACvB,OAAO;YACH,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,EAAE;SACZ,CAAA;IACL,CAAC;IACD,MAAM,MAAM,GAAoB,IAAA,WAAI,EAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,MAAM,CAAoB,IAAI,EAAE,CAAA;IAC7G,IAAI,KAAK,GAAG,IAAA,eAAI,EAAC,WAAW,EAAE,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,WAAW,CAAC,CAAA;IACjI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACxF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE;QACxC,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAA,wBAAU,EAAC,KAAK,EAAE,IAAA,WAAI,EAAC,IAAI,EAAE,QAAQ,CAAW,EAAE,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC;SACtF,CAAA;IACL,CAAC,CAAoB,CAAA;IAErB,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;QACjD,IAAI,aAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC;gBACD,OAAO,aAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAA;YACrC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACT,UAAM,CAAC,KAAK,CAAC,sBAAsB,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAA;YACzD,CAAC;QACL,CAAC;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAA;QAC3D,IAAI,IAAA,aAAM,EAAC,QAAQ,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC;gBACD,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;gBAC/B,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;oBACvB,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;gBAC9B,CAAC;qBAAM,CAAC;oBACJ,UAAM,CAAC,KAAK,CAAC,sBAAsB,IAAI,EAAE,EAAE,mCAAmC,QAAQ,EAAE,CAAC,CAAA;gBAC7F,CAAC;YACL,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACT,UAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACnB,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAA;IACxH,OAAO;QACH,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,QAAQ;QACR,KAAK;KACR,CAAA;AACL,CAAC,CAAA;AAvDY,QAAA,IAAI,QAuDhB"} \ No newline at end of file diff --git a/packages/osr-ai-templates/templates/typescript-cli/foo.md b/packages/osr-ai-templates/templates/typescript-cli/foo.md new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-ai-templates/templates/typescript-cli/index.d.ts b/packages/osr-ai-templates/templates/typescript-cli/index.d.ts new file mode 100644 index 0000000..d746173 --- /dev/null +++ b/packages/osr-ai-templates/templates/typescript-cli/index.d.ts @@ -0,0 +1,14 @@ +import { ChatCompletionTool } from "openai/resources/index.mjs"; +import { TMessageParam } from '..'; +export declare const defaults: (options: { + readme?: boolean; + git?: boolean; + npm?: boolean; + fs?: boolean; + path?: string; + glob?: string[]; +}) => { + glob: string[]; + messages: TMessageParam[]; + tools: Array; +}; diff --git a/packages/osr-ai-templates/templates/typescript-cli/index.js b/packages/osr-ai-templates/templates/typescript-cli/index.js new file mode 100644 index 0000000..3cf99dd --- /dev/null +++ b/packages/osr-ai-templates/templates/typescript-cli/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaults = void 0; +const system_1 = require("../../common/system"); +const tools_1 = require("@plastichub/osr-ai-tools/tools"); +const __1 = require(".."); +const defaults = (options) => { + debugger; + const template = (0, __1.load)('', options); + const _tools = Object.keys(tools_1.tools).map(key => options[key] ? tools_1.tools[key](options.path) : []).flat(); + return { + glob: options.glob || [ + "src/**/*.ts", + "package.json", + "Readme.md" + ], + messages: [ + ...(0, system_1.TypescriptEnvironmentCLI)(), + ...(0, system_1.TypescriptLibraries)(), + ...(0, system_1.OSRTypescript)(), + ], + tools: _tools + }; +}; +exports.defaults = defaults; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/osr-ai-templates/templates/typescript-cli/index.js.map b/packages/osr-ai-templates/templates/typescript-cli/index.js.map new file mode 100644 index 0000000..74aa1b9 --- /dev/null +++ b/packages/osr-ai-templates/templates/typescript-cli/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/typescript-cli/index.ts"],"names":[],"mappings":";;;AAEA,gDAAkG;AAClG,0DAAsD;AAOtD,0BAAyC;AAElC,MAAM,QAAQ,GAAG,CACpB,OAOC,EAAE,EAAE;IAEL,QAAQ,CAAA;IACR,MAAM,QAAQ,GAAG,IAAA,QAAI,EAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAElC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,aAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IACjG,OAAO;QACH,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI;YAClB,aAAa;YACb,cAAc;YACd,WAAW;SACd;QACD,QAAQ,EAAE;YACN,GAAG,IAAA,iCAAwB,GAAS;YACpC,GAAG,IAAA,4BAAmB,GAAS;YAC/B,GAAG,IAAA,sBAAa,GAAS;SACT;QACpB,KAAK,EAAE,MAAmC;KAC7C,CAAA;AACL,CAAC,CAAA;AA3BY,QAAA,QAAQ,YA2BpB"} \ No newline at end of file diff --git a/packages/osr-ai-templates/templates/typescript-cli/index.md b/packages/osr-ai-templates/templates/typescript-cli/index.md new file mode 100644 index 0000000..dd1f135 --- /dev/null +++ b/packages/osr-ai-templates/templates/typescript-cli/index.md @@ -0,0 +1,160 @@ +## Defaults + +## Filesystem + +For filesystem operations, use + +import { sync as rm } from '@plastichub/fs/remove' (path) +import { sync as dir } from '@plastichub/fs/dir' (path) +import { sync as write } from '@plastichub/fs/write' (path, content) +import { sync as read } from '@plastichub/fs/read' (path) +import { filesEx as glob } from '@plastichub/osr-commons/_glob' (directory,glob | glob[]) + +## Configuration + +API keys and other settings: + +```ts +import { CONFIG_DEFAULT } from '@plastichub/osr-commons' +export const foo = (yarg) => { + const config = CONFIG_DEFAULT(args.env_key) as any + if (!config) { + logger.warn('No config found!') + return + } + if (config && !config.openai.key) { + logger.warn('No OpenAI key found in config!') + return + } + const api_key = argv.openai_key || process.env.OPENAI_API_KEY || config.openai.key +} +``` + +## Zod Schemas + +The framework provides tools to convert from a Zod schema to Yargs as follows + +```ts + +import { toYargs } from '@plastichub/osr-commons' +import { MySchema } from 'src/schemas.ts' +// example : const options = (yargs: CLI.Argv) => toYargs(yargs, MySchema()) +``` + +Additionally, all Zod schemas will be exported on demand, via Yargs command "types" + +```ts +import { generate_interfaces } from '@plastichub/osr-commons' +import { MySchema } from 'src/schemas' + +export const types = () => generate_interfaces( + [ + MySchema() + ], 'src/zod_types.ts') +``` + +### Logging + +Each package has a tslog factory at src/index.ts. Use it for all commands and library functions + +```ts +export { Logger } from 'tslog' +import { createLogger } from '@plastichub/osr-log' +import { Logger } from 'tslog' +export const logger:Logger = createLogger('Package Name') +``` + +### LLM Tools + +LLM Tools are specified as follows + +- always export "tools" as the main function +- dont register LLM tools as yarg commands +- seperate the tool's implementation in src/lib/tools +- LLM tools require 'openai' as dependency + +eg: src/tools/fs: + +```ts +import { join } from 'path' +import * as path from 'path' +import { RunnableToolFunction } from 'openai/lib/RunnableFunction' +import { isString } from '@plastichub/core/primitives' +import { sync as dir } from '@plastichub/fs/dir' +import { sync as write } from '@plastichub/fs/write' +import { resolve } from "@plastichub/osr-commons" +import { logger } from '../' + +export const tools = (target:any, variables:Record={}): Array => { + return [ + { + type: 'function', + function: { + name: "read_file", + description: "read a file, at given a path", + parameters: { + type: "object", + properties: { + file: { + type: "object", + properties: { + path: { type: "string" } + } + } + }, + required: ["file"], + }, + function: async (ret) => { + try { + const { file } = ret as any + const filePath = path.resolve(resolve(join(target, file.path),false,variables)) + logger.debug(`Tool::ReadFile Reading file ${filePath}`) + } catch (error) { + logger.error(`Error reading file`, error) + } + }, + parse: JSON.parse + } + } as RunnableToolFunction<{ id: string }> + ] +} +``` +### Typescript tsconfig + +Use this defaults + +```json +"compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "allowJs": true, + "noImplicitAny": false, + "strictNullChecks": false, + "forceConsistentCasingInFileNames": true + }, +``` + +### Yargs + +Commands are registered as follows (src/command/index.ts) : + +```ts +import type { Argv } from 'yargs' +import { types } from './types' +export const commands = (yargs: Argv) => +{ + return yargs + .command('types', 'Generate TypeScript interfaces from Zod schemas', {}, types) + .strict() + .help() +} +``` + +### Nodejs + +- import built-ins always as import * as 'path' diff --git a/packages/osr-ai-templates/templates/typescript-cli/package.json b/packages/osr-ai-templates/templates/typescript-cli/package.json new file mode 100644 index 0000000..508ec26 --- /dev/null +++ b/packages/osr-ai-templates/templates/typescript-cli/package.json @@ -0,0 +1,11 @@ +{ + "name": "@polymech/ai-template-typescript", + "version": "1.0.0", + "description": "", + "glob": [ + "src/**/*.ts", + "package.json", + "Readme.md" + ], + "tools":["npm","fs","git","./tools"] +} \ No newline at end of file diff --git a/packages/osr-ai-templates/tsconfig.json b/packages/osr-ai-templates/tsconfig.json new file mode 100644 index 0000000..44f2799 --- /dev/null +++ b/packages/osr-ai-templates/tsconfig.json @@ -0,0 +1,34 @@ +{ + "compilerOptions": { + "lib": [ + "ES2021", + "ES2022.Object", + "DOM" + ], + "target": "ES2021", + "module": "nodenext", + "allowJs": true, + "noImplicitAny": false, + "noImplicitThis": false, + "alwaysStrict": true, + "sourceMap": true, + "outDir": "./", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "pretty": false, + "baseUrl": "./src", + "rootDir": "./src", + "skipLibCheck": true, + "allowSyntheticDefaultImports": true + }, + "compileOnSave": false, + "filesGlob": [ + "./src/**/*.ts" + ], + "files": [ + "./src/index.ts", + "./src/main.ts", + "./src/common/system.ts", + "./src/templates/index.ts" + ] +} \ No newline at end of file diff --git a/packages/osr-templates/.gitignore b/packages/osr-templates/.gitignore new file mode 100644 index 0000000..cab85ca --- /dev/null +++ b/packages/osr-templates/.gitignore @@ -0,0 +1,4 @@ +/node_modules +/coverage +*.log +.DS_Store diff --git a/packages/osr-templates/README.md b/packages/osr-templates/README.md new file mode 100644 index 0000000..3153334 --- /dev/null +++ b/packages/osr-templates/README.md @@ -0,0 +1,80 @@ +# OSR - Templates + +## Discourse + +### Component + +#### Resources + +- [ ] Git-Link +- [ ] Issues (List & New) +- [ ] Specs - PDF +- [ ] PDF +- [ ] Replaced by / ... +- [ ] Howtos +- [ ] Social media + +#### Meta + +- [ ] Changelog +- [ ] Versions + +#### Display + +- [ ] Gallery +- [ ] Products (:) +- [ ] Options +- [ ] Components +- [ ] Drawings (overview/parts) +source + +--- + +#### Directory Item + +- [ ] Gallery / Portfolio +- [ ] Products (:) +- [ ] Links +- [ ] Feed +- [ ] Activity (intern ;) + +## Item Raw (-) + +- [ ] history +- [ ] i18n branches +- [ ] versions +- [ ] compat/specs +- [ ] tests +- [ ] meta / refs + + +## OSRL + +- [ ] Media filter (square) +- [ ] osr-discourse / osr-csart API +- [ ] osr-cad API + + +## Tests + +- [ ] bundle (format?) + - [ ] config(s) + - [ ] footage + - [ ] reports + - [ ] setup + + +## Commands + +### `list` (registry) + +### `info` (short) + +### `bundle` (create) + +### `get/set` (registry) + +### `merge` (registry) + + + + diff --git a/packages/osr-templates/astro/.astro.json b/packages/osr-templates/astro/.astro.json new file mode 100644 index 0000000..5a6c784 --- /dev/null +++ b/packages/osr-templates/astro/.astro.json @@ -0,0 +1,46 @@ +{ + "includes": [ + + ], + "variables": { + "PRODUCT_ROOT": "${root}/${product}/", + "abs_url": "https://assets.osr-plastic.org", + "CACHE": "${root}/cache/", + "CACHE_URL": "${abs_url}/cache/", + "GIT_REPO": "https://git.polymech.io/", + "_OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org/machines/", + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org", + "PRODUCTS_ASSETS_URL":"https://assets.osr-plastic.org/machines/${product_rel}", + "OSR_FILES_WEB":"https://files.polymech.io/files/machines", + "PRODUCTS_FILES_URL":"${OSR_FILES_WEB}/${product_rel}", + "DISCORD":"https://discord.gg/s8K7yKwBRc" + }, + "env": { + "astro-release":{ + "includes": [ + "${PRODUCT_ROOT}" + ], + "variables": { + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org/machines/" + } + }, + "astro-debug":{ + "includes": [ + "${PRODUCT_ROOT}" + ], + "variables": { + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org", + "showCart": false, + "showPrice": false, + "showResources": false, + "showShipping": false, + "showPaymentTerms": false, + "showHowtos": false, + "showRenderings": true, + "debug": true + } + } + + } + +} \ No newline at end of file diff --git a/packages/osr-templates/commons/authors.osr b/packages/osr-templates/commons/authors.osr new file mode 100644 index 0000000..6b67f41 --- /dev/null +++ b/packages/osr-templates/commons/authors.osr @@ -0,0 +1,6 @@ +[%-if showHeader -%] +## Authors +[%-endif%] +[%- for author in authors -%] +- [ [[author.name]] ]( [[author.url]] ) +[%- endfor -%] diff --git a/packages/osr-templates/commons/components.osr b/packages/osr-templates/commons/components.osr new file mode 100644 index 0000000..fced942 --- /dev/null +++ b/packages/osr-templates/commons/components.osr @@ -0,0 +1,7 @@ +## Components + +[% for component in components %] +[%- if component.store -%] +- [ [[component.name]] ]( [[component.store]] ) +[% endif %] +[% endfor %] diff --git a/packages/osr-templates/commons/product_table.osr b/packages/osr-templates/commons/product_table.osr new file mode 100644 index 0000000..47f9727 --- /dev/null +++ b/packages/osr-templates/commons/product_table.osr @@ -0,0 +1,16 @@ +[%js%] +const _path = path.resolve(`${PRODUCT_ROOT}/${table}`) +if(!fs.exists(_path)){ + console.warn('cant find table', _path) + return +} +console.log(' table path ' + _path) +let data = xlsx.parse(_path) +data[0].data = data[0].data.filter((d)=>d.length >0) +data = markdownTable(data[0].data) +if(html){ + return md2html(data) +}else{ + data +} +[%endjs%] diff --git a/packages/osr-templates/discourse/base.json b/packages/osr-templates/discourse/base.json new file mode 100644 index 0000000..9d81301 --- /dev/null +++ b/packages/osr-templates/discourse/base.json @@ -0,0 +1,108 @@ +{ + "includes": [ + "${root}/osr", + "${root}/osr/widgets", + "${OSR_ROOT}/osr-templates/commons", + "${OSR_ROOT}/osr-templates/discourse", + "${OSR_ROOT}/osr-templates/discourse/commons", + "${OSR_ROOT}/osr-templates/discourse/widgets", + "${PRODUCT_ROOT}", + "${PRODUCT_ROOT}/templates/site/", + "${PRODUCT_ROOT}/templates/shared/" + ], + "variables": { + + "PRODUCT_ROOT": "${root}/${product}/", + "abs_url": "https://assets.osr-plastic.org", + "CACHE": "${root}/cache/", + + "GIT_REPO": "https://git.osr-plastic.org/osr-plastic/osr-machines", + + "OSR_MACHINES_ASSETS_URL": "https://assets.osr-plastic.org/machines/", + "OSR_FILES_WEB": "https://files.osr-plastic.org/files/osr-machines", + + "OSR_DIRECTORY_ASSETS_URL": "https://assets.osr-plastic.org/directory/", + "OSR_DIRECTORY_FILES_WEB": "http://files.osr-plastic.org/files/directory", + + + "PRODUCTS_FILES_URL": "${OSR_FILES_WEB}/${product_rel}", + "PRODUCTS_ASSETS_URL": "https://assets.osr-plastic.org/machines/${product}", + + "OSR_HOWTOS_ROOT_URL": "${vendor_forum}/c/wiki/howtos/72", + "OSR_FORUM_URL":"https://forum.osr-plastic.org", + + "vendor_name": "Plastic Hub", + "vendor_website": "https://osr-plastic.org/", + "vendor_products_external": "https://plastic-hub.com/products/", + "vendor_instagram": "https://www.instagram.com/osr_plastic/", + "_vendor_youtube": "https://www.youtube.com/channel/UCuWDxJtV2pf5BefHEy09Cew/featured?view_as=subscriber", + "vendor_github": "https://git.osr-plastic.org/osr-plastic", + "vendor_contact_email": "mailto:sales@plastic-hub.com", + "vendor_whatsapp": "tel:0034691952287", + "vendor_facebook": "https://www.facebook.com/plastichubcat/", + "vendor_discord": "https://discord.gg/vR5d6ShTez", + "author_link_pp": "https://preciousplastic.com/", + "author_link": "https://osr-plastic.org", + "vendor_forum": "https://forum.osr-plastic.org", + "show": { + "badges": false, + "authors": true, + "head": true, + "debug": false, + "wiki": false, + "forum": false, + "others": false, + "howtos": false, + "instagram": false, + "shipping": false, + "payment_terms": false, + "components": true, + "marketplaceLinks": true, + "productDump": false, + "configDump": false, + "issues": false, + "alternatives": true, + "replacedBy": true, + "meta":true + } + }, + "env": { + "bazar": { + "includes": [], + "variables": { + "abs_url": "https://dev.osr-plastic.org/" + } + }, + "bazar-release": { + "includes": [], + "variables": { + "abs_url": "https://shop.osr-plastic.org/" + } + }, + "test-import": {}, + "forum": { + "includes": [], + "variables": { + "forum_url": "https://forum.osr-plastic.org/", + "show": { + "badges": true, + "authors": true, + "head": true, + "debug": false, + "wiki": false, + "forum": false, + "others": false, + "howtos": true, + "instagram": false, + "shipping": false, + "payment_terms": false, + "components": true, + "marketplaceLinks": true, + "meta":true, + "productDump": true, + "configDump": false + } + } + } + } +} \ No newline at end of file diff --git a/packages/osr-templates/discourse/commons/article_resources.osr b/packages/osr-templates/discourse/commons/article_resources.osr new file mode 100644 index 0000000..6d1fd77 --- /dev/null +++ b/packages/osr-templates/discourse/commons/article_resources.osr @@ -0,0 +1,50 @@ +### Resources + +[% if product.forum %] +- [Forum]([[product.forum]]) +[% endif %] +[% if product.download %] +- [Download]([[product.download]]) +[% endif %] +[% if product.firmware %] +- [Firmware]([[product.firmware]]) +[% endif %] + +[% if product.Preview3d %] +[% if product.edrawings %] +- [3D-Preview]([[product.edrawings]]) +[% else %] +- [3D-Preview]([[product.abs_url]]/[[product.product_rel]]/resources/edrawings.html) +[% endif %] +- [Source Code Repository]([[GIT_REPO]]/src/branch/master/machines/[[product.rel]]) +[%endif%] +[% if product.hasSpec %] +- [Specification PDF]([[product.abs_url]]/[[product.product_rel]]/resources/spec.pdf) +[%endif%] + +[% if product.howtoSection %] +- [How-tos]([[product.howtoSection]]) +[%endif%] + +[% if product.library %] +- [Library]([[product.library]]) +[%endif%] + +
+[% if config.show.wiki %] + [% if product.wiki_articles %] +

Wiki Articles

+[% include "product_wiki.osr" category:product.wiki_articles %] + [% else %] + [% endif %] +[% else %] +[% endif %] + +[% if config.show.forum %] + [% if product.forumCategory %] +

Forum Posts

+[% include "product_forum.osr" category:product.forumCategory %] + [% endif %] +[% endif %] + +[% include "extra_resources.md" %] diff --git a/packages/osr-templates/discourse/commons/discourse-cat-items.osr b/packages/osr-templates/discourse/commons/discourse-cat-items.osr new file mode 100644 index 0000000..069e226 --- /dev/null +++ b/packages/osr-templates/discourse/commons/discourse-cat-items.osr @@ -0,0 +1,24 @@ +[% js %] +return new Promise((resolve, reject) => { + + const d = new discourse.Discourser({ + host: config.discourse.host, + key: config.discourse.key, + username: config.discourse.username, + rateLimitConcurrency: 1 + }); + + d.getTopicItemsOfCategories([cat]).then(posts => { + //console.log('posts', posts) + let content = "
    " + posts = posts.map((p) => { + const url = `${config.discourse.host}/t/${p.id}`; + const title = `${p.fancy_title}`; + return `
  • ${title}
  • `; + }).join('\n'); + content += posts + "
"; + resolve(content); + + }); +}) +[% endjs -%] diff --git a/packages/osr-templates/discourse/commons/instagram.osr b/packages/osr-templates/discourse/commons/instagram.osr new file mode 100644 index 0000000..946c7e0 --- /dev/null +++ b/packages/osr-templates/discourse/commons/instagram.osr @@ -0,0 +1,22 @@ +

Our latest Instagram posts

+ +[%js%] + +return cacache.get.info(CACHE, 'vendor-instagram').then((cache)=>{ + if(cache){ + return cacache.get(CACHE, 'vendor-instagram').then((cached)=>{ + return cached.data.toString(); + }) + } + console.log('get instagram images'); + return instagram.images(config.instagram.user,config.instagram.token,global).then((images)=>{ + images = images.slice(0, 8); + images = html.container.wrap(images.map((i)=> html.container.item(html.image(i,null,'max-height:200px'),'border:none; width:200px;max-height:200px')).join('\n')); + return cacache.put(CACHE,'vendor-instagram',images).then(()=>{ + return images; + }) + }); + +}); + +[%endjs%] diff --git a/packages/osr-templates/discourse/commons/parts.xlsx b/packages/osr-templates/discourse/commons/parts.xlsx new file mode 100644 index 0000000..37e68c1 Binary files /dev/null and b/packages/osr-templates/discourse/commons/parts.xlsx differ diff --git a/packages/osr-templates/discourse/commons/specs.xlsx b/packages/osr-templates/discourse/commons/specs.xlsx new file mode 100644 index 0000000..c44b56c Binary files /dev/null and b/packages/osr-templates/discourse/commons/specs.xlsx differ diff --git a/packages/osr-templates/discourse/commons/test.osr b/packages/osr-templates/discourse/commons/test.osr new file mode 100644 index 0000000..0bb5e4b --- /dev/null +++ b/packages/osr-templates/discourse/commons/test.osr @@ -0,0 +1 @@ +helo \ No newline at end of file diff --git a/packages/osr-templates/discourse/commons/xlsx.osr b/packages/osr-templates/discourse/commons/xlsx.osr new file mode 100644 index 0000000..4665b84 --- /dev/null +++ b/packages/osr-templates/discourse/commons/xlsx.osr @@ -0,0 +1,13 @@ +[% js %] +const _path = lookup(file); +if (!fs.exists(_path)) { + return ''; +} else { + const t = global; + let data = xlsx.parse(_path); + data[0].data = data[0].data.filter((d) => !!d.length); + data = markdownTable(data[0].data); + const ret = md2html(data); + return ret +} +[% endjs %] \ No newline at end of file diff --git a/packages/osr-templates/discourse/directory/country_users.md b/packages/osr-templates/discourse/directory/country_users.md new file mode 100644 index 0000000..a7e5334 --- /dev/null +++ b/packages/osr-templates/discourse/directory/country_users.md @@ -0,0 +1,7 @@ +## [[country]] + +[[COUNTRY_BRIEF]] + +[COUNTRY_MAP_LINK]([[country_map]]) + +[[COUNTRY_BODY]] diff --git a/packages/osr-templates/discourse/directory/intro_users.md b/packages/osr-templates/discourse/directory/intro_users.md new file mode 100644 index 0000000..3b002ff --- /dev/null +++ b/packages/osr-templates/discourse/directory/intro_users.md @@ -0,0 +1 @@ +[[user_directory_index]] diff --git a/packages/osr-templates/discourse/directory/user.md b/packages/osr-templates/discourse/directory/user.md new file mode 100644 index 0000000..7de1183 --- /dev/null +++ b/packages/osr-templates/discourse/directory/user.md @@ -0,0 +1,32 @@ +[[user_header_before]] + +**Brief** [[short]] +**Censored** [[censored]] +**Continent** [[continent]] +**Country** [[country]] +**Area** [[area]] +**Created** [[created]] +**Modified** [[modified]] +**Last Active** [[lastActive]] + +[[user_header_after]] + +![[[user_hero_alt]]]([[user_hero_src]]) + +[[ user_body ]] + +### Services + +[[user_services]] + +### Links + +[[user_links]] + +[[user_directions]] + +[[user_images_gallery]] + +[[user_footer]] + +[[user_footer_after]] diff --git a/packages/osr-templates/discourse/drawings.osr b/packages/osr-templates/discourse/drawings.osr new file mode 100644 index 0000000..f5de090 --- /dev/null +++ b/packages/osr-templates/discourse/drawings.osr @@ -0,0 +1,13 @@ +
+[%js%] +const _path = substitute(`${cwd}/${product_rel}/${path}`); +debugger +if(fs.images(_path).length) +{ + const t = html.drawings(`${abs_url}/${product_rel}/${path}`,_path); + return `

${name}

${t}`; +}else{ + console.log(_path + ' : doesnt exists'); +} +[%endjs%] +
diff --git a/packages/osr-templates/discourse/extra_resources.md b/packages/osr-templates/discourse/extra_resources.md new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/discourse/howto/howto.md b/packages/osr-templates/discourse/howto/howto.md new file mode 100644 index 0000000..39fe9c8 --- /dev/null +++ b/packages/osr-templates/discourse/howto/howto.md @@ -0,0 +1,25 @@ +
+ +${description} + +${header} + +--- + +${used_machines} + +## Attachments + +${files} + +## Resources + +- [Browse Files](http://files.osr-plastic.org/files/howtos/${slug}/) + +## 3D Files + +${previews3D} + +--- + +${steps} diff --git a/packages/osr-templates/discourse/howto/step.md b/packages/osr-templates/discourse/howto/step.md new file mode 100644 index 0000000..90645cf --- /dev/null +++ b/packages/osr-templates/discourse/howto/step.md @@ -0,0 +1,5 @@ +## Step ${step_number} - ${title} + +${text} + +${images} diff --git a/packages/osr-templates/discourse/library/machine_layout.osr b/packages/osr-templates/discourse/library/machine_layout.osr new file mode 100644 index 0000000..9783ab9 --- /dev/null +++ b/packages/osr-templates/discourse/library/machine_layout.osr @@ -0,0 +1,74 @@ + +
+
+ [%- include "overview.osr" -%] + {% if page.showResources == false %} + {% else %} + {% include product_resoures_bar.html %} + {% endif %} +
+ [%- include "product_overview_drawings.osr" -%] +
+{%if page.products %} +
+
+

What others do with '{{ page.name }}'

+
+ {% include products_row.html %} +
+
+{% endif %} + +
+{% if page.tabs.build != false %} +
+ {% include product_build.md %} + {% include meta_build.md %} + [%- include "cam_html.osr" %] + [%- include "drawings.osr" name:'Drawings' path:'drawings' url:`${abs_url}` -%] + [%- if product.private.previews3D -%] +
3D Files - Preview
+ [[ product.private.previews3D ]] + [% endif -%] +
+{% endif %} +
+ +[% include "product_resources.md" %] + + +
+
+ [%- if product.gallery!=false %] + [%- include "gallery.osr" name:'Gallery' path:'media/gallery' url:`${abs_url}` %] + [%endif%] +
+{% if page.wiring %} +
+{% endif %} +
\ No newline at end of file diff --git a/packages/osr-templates/discourse/library/other_item.html b/packages/osr-templates/discourse/library/other_item.html new file mode 100644 index 0000000..c925d69 --- /dev/null +++ b/packages/osr-templates/discourse/library/other_item.html @@ -0,0 +1,7 @@ + diff --git a/packages/osr-templates/discourse/library/overview.osr b/packages/osr-templates/discourse/library/overview.osr new file mode 100644 index 0000000..15fd382 --- /dev/null +++ b/packages/osr-templates/discourse/library/overview.osr @@ -0,0 +1,38 @@ +
+
+
+ + {{ image_description }} + +
+
+
+ +
+ [% include "body.md" %] +
+
+
+
+
+ {% if page.showSpecification != false %} +
+
+

Specification

+ [%- include "product_specs.osr" html:true -%] +
+
+ {% endif %} + {% if page.showAuthors == false %} + {% else %} +
+
+ [%- if config.show.authors -%] + [%- include "authors_html.osr" authors:product.authors showHeader:true -%] + [%- endif -%] +
+
+ {% endif %} +
+
diff --git a/packages/osr-templates/discourse/library/product_overview_drawings.osr b/packages/osr-templates/discourse/library/product_overview_drawings.osr new file mode 100644 index 0000000..d6d5465 --- /dev/null +++ b/packages/osr-templates/discourse/library/product_overview_drawings.osr @@ -0,0 +1,29 @@ +
+ [% if product.showDimensions !=false %] +

Dimensions

+ +

+ +

+
+
+ [% endif %] + [% if product.showParts !=false %] +
+
+
+

Parts

+ +

+ +

+
+
+
+

[% include 'product_parts.osr' %]

+
+
+
+ [% endif %] +
+ diff --git a/packages/osr-templates/discourse/library/root.html b/packages/osr-templates/discourse/library/root.html new file mode 100644 index 0000000..229bf5e --- /dev/null +++ b/packages/osr-templates/discourse/library/root.html @@ -0,0 +1,12 @@ +[% include "product_header_jekyll.osr" %] +[% include "product_variables.osr" %] +[%- js -%] + if(variables.debug['break-begin']){ + const g = global; + const p = product; + const c = config; + debugger; + } +[%- endjs -%] +[% include "machine_layout.osr" %] +
diff --git a/packages/osr-templates/discourse/overview_drawings.osr b/packages/osr-templates/discourse/overview_drawings.osr new file mode 100644 index 0000000..a8a5533 --- /dev/null +++ b/packages/osr-templates/discourse/overview_drawings.osr @@ -0,0 +1,15 @@ +[%- if product.showDimensions !=false -%] +### Dimensions +[wrap="center"] + +[/wrap] +
+[%- endif -%] + +[%- if product.showParts !=false -%] +[wrap="center"] + +[/wrap] + +[% include 'product_parts.osr' %] +[%- endif -%] diff --git a/packages/osr-templates/discourse/plugins/html.js b/packages/osr-templates/discourse/plugins/html.js new file mode 100644 index 0000000..9ba73ea --- /dev/null +++ b/packages/osr-templates/discourse/plugins/html.js @@ -0,0 +1,50 @@ +const path = require('path'); + +const link = (name, link, _class) => `${name}`; +const wrap = (content) => ` +
+
+ ${content} +
+
+`; + +const image = (src, link, style) => ``; + +const item = (content, style = 'border-color: #c5c5c5;width: 300px;display: inline-block', title) => + `
+ ${content}
+
${title||''}
+
`; + +const styles = { + thumb: 'border:none; width:200px;max-height:200px' +}; + +const center_caption = (el = 'h5', text) => `<${el} style="text-align:center">${text}`; + +const thumbs = (url, folder) => { + const context = require('@plastichub/osrl/library').getContext(); + folder = path.resolve(folder); + let images = context.fs.images(folder, { + absolute: false + }); + images = images.map((i) => item(image(`${url}/${i}`), 'border:none; width:200px;max-height:200px')); + images = wrap(images.join('\n')); + return images; +} +module.exports = { + html: { + link: link, + caption: { + center: center_caption + }, + container: { + wrap: wrap, + item: item + }, + image: image, + styles: styles, + thumbs: thumbs + } +}; \ No newline at end of file diff --git a/packages/osr-templates/discourse/product.osr b/packages/osr-templates/discourse/product.osr new file mode 100644 index 0000000..52ddd9e --- /dev/null +++ b/packages/osr-templates/discourse/product.osr @@ -0,0 +1,9 @@ +[% include "product_header_jekyll.osr" %] + +[% if config.show.badges %] + {% include product_badges.html %} +[%endif%] + +[% if config.show.authors %] +[% include "authors.osr" authors:product.authors showHeader:true %] +[%endif%] diff --git a/packages/osr-templates/discourse/product_debug.osr b/packages/osr-templates/discourse/product_debug.osr new file mode 100644 index 0000000..f1db6cc --- /dev/null +++ b/packages/osr-templates/discourse/product_debug.osr @@ -0,0 +1,6 @@ +## Product +[% js %] + if(debug){ + return "
" + prettyJSON(store.product) + "
"; + } +[%endjs%] diff --git a/packages/osr-templates/discourse/product_howtos.osr b/packages/osr-templates/discourse/product_howtos.osr new file mode 100644 index 0000000..1da298d --- /dev/null +++ b/packages/osr-templates/discourse/product_howtos.osr @@ -0,0 +1,7 @@ +[%js%] +if(store.product.howtos && store.product.howtos.length){ + return store.product.howtos.map((i)=>{ + return i + }).join('\n
'); +} +[%endjs%] diff --git a/packages/osr-templates/discourse/product_parts.osr b/packages/osr-templates/discourse/product_parts.osr new file mode 100644 index 0000000..90d188f --- /dev/null +++ b/packages/osr-templates/discourse/product_parts.osr @@ -0,0 +1,9 @@ +[%js%] +let p = PRODUCT_ROOT; +const _path = path.resolve(PRODUCT_ROOT + './parts.xlsx'); +if(fs.exists(_path)){ + const data = xlsx.parse(_path); + data[0].data = data[0].data.filter((d) => !!d.length); + return md2html(markdownTable(data[0].data)); +} +[%endjs%] diff --git a/packages/osr-templates/discourse/product_resources.osr b/packages/osr-templates/discourse/product_resources.osr new file mode 100644 index 0000000..33d1d2f --- /dev/null +++ b/packages/osr-templates/discourse/product_resources.osr @@ -0,0 +1,34 @@ +#### Resources +[%- if product.firmware -%] +- [Firmware]([[product.firmware]]) +[%- endif -%] +[%- if product.product_howto -%] +- [Howto]([[product.product_howto]]) +[%- endif -%] +[%- if product.hasFiles!=false %] +- [Files]([[variables.OSR_FILES_WEB]]/[[product.product_rel]]) +[%- endif -%] +- [Git Source]([[variables.GIT_REPO]]/src/branch/master/[[product.product_rel]]) +[%- if product.Preview3d -%] +[%- if product.edrawings -%] +- [3D Preview]([[variables.OSR_MACHINES_ASSETS_URL]]/[[product.product_rel]]/resources/edrawings.html) +[%- else -%] +- [3D Preview]([[variables.OSR_MACHINES_ASSETS_URL]]/[[product.product_rel]]/resources/edrawings.html) +[%- endif -%] +[%- endif -%] +[%- if show.showSpecs -%] +[%- if product.hasSpec -%] +- [Specification PDF]([[product.abs_url]]/[[product.product_rel]]/resources/spec.pdf) +[%- endif -%] +[%- endif -%] +[%- if product.gallery!=false -%] +- [Gallery]([[variables.OSR_FILES_WEB]]/[[product.product_rel]]/media/gallery) +[%- endif -%] +[%- if show.forum -%] + [%- if product.forumCategory -%] +

Forum Posts

+ [% include "product_forum.osr" category:product.forumCategory %] + [%- endif -%] +[%- endif -%] + +[%- include "extra_resources.md" -%] diff --git a/packages/osr-templates/discourse/product_showreel.osr b/packages/osr-templates/discourse/product_showreel.osr new file mode 100644 index 0000000..c60a614 --- /dev/null +++ b/packages/osr-templates/discourse/product_showreel.osr @@ -0,0 +1,7 @@ +[%js%] +if(fs.images(`${PRODUCT_ROOT}/media/products`).length){ + const t = html.thumbs(`${abs_url}/${product}/media/products`,`${PRODUCT_ROOT}/media/products`); + return `

Products done with ${store.product.product_name}

+ ${t}`; +} +[%endjs%] diff --git a/packages/osr-templates/discourse/product_specs.osr b/packages/osr-templates/discourse/product_specs.osr new file mode 100644 index 0000000..cd57b1d --- /dev/null +++ b/packages/osr-templates/discourse/product_specs.osr @@ -0,0 +1,19 @@ +[% js %] +const _path = path.resolve(PRODUCT_ROOT + './specs.xlsx'); +const h = html; +if (!fs.exists(_path)) { + // try global item config (temp, for moulds) + debugger; + if (global.private && global.private.specs) { + data = markdownTable(global.private.specs); + return md2html(data); + } + return ''; +} else { + const t = global; + let data = xlsx.parse(_path); + data[0].data = data[0].data.filter((d) => !!d.length); + data = markdownTable(data[0].data); + return html_beautify(md2html(data)); +} +[% endjs -%] diff --git a/packages/osr-templates/discourse/root.html b/packages/osr-templates/discourse/root.html new file mode 100644 index 0000000..bafab25 --- /dev/null +++ b/packages/osr-templates/discourse/root.html @@ -0,0 +1,89 @@ +[%- include "variables.osr" -%] + +[% include "body.md" %] + +[% if config.variables.show.meta -%] +[% include "meta.osr" %] +[%-endif%] + + +[%- if show.productDump -%] +Product dump: +```json +[%- js -%] + return JSON.stringify(product,null,2) +[%endjs-%] +``` +[%endif%] + +[%- if show.productDump -%] +Config dump: +```json +[%-js-%] + return JSON.stringify(config,null,2) +[%-endjs-%] +``` +[%endif%] + +[wrap="center"] + +[/wrap] + +[%- include "overview_drawings.osr" -%] + +[%- if product.hasSpecs -%] +## Specification +[% include "product_specs.osr" html:true %] + +[Source : [[variables.OSR_FILES_WEB]]/[[product.product_rel]]/specs.xlsx]([[variables.OSR_FILES_WEB]]/[[product.product_rel]]/specs.xlsx) + +[%endif-%] + +[% if show.authors -%] +[%- if product.authors -%] +[% include "authors.osr" authors:product.authors showHeader:true %] +[%-endif-%] +[%-endif-%] + +[% if show.issues -%] +[%- if product.issues -%] +[% include "issues.osr" %] +[%-endif-%] +[%-endif-%] + +[% if show.alternatives -%] +[%- if product.alternatives -%] +#### Alternatives +[% include "alternatives.osr" %] +[%-endif-%] +[%-endif-%] + +[% if show.replacedBy -%] +[%- if product.replacedBy -%] +#### Replaced by +[% include "replacedBy.osr" %] +[%-endif-%] +[%-endif-%] + +[% if show.marketplaceLinks -%] +[%- if product.marketplaceLinks -%] +#### Marketplace +[% include "marketplaceLinks.osr" %] +[%-endif-%] +[%-endif-%] + + +[% include "product_resources.osr" %] + +[% if show.howtos %] + [% include "product_howtos.osr" %] +[%endif%] + +[% if show.debug %] + [% include "product_debug.osr" %] +[%endif%] + + +[%js%] + +[%endjs%] diff --git a/packages/osr-templates/discourse/root_bak.html b/packages/osr-templates/discourse/root_bak.html new file mode 100644 index 0000000..8c3c225 --- /dev/null +++ b/packages/osr-templates/discourse/root_bak.html @@ -0,0 +1,43 @@ +[% include "product_variables.osr" %] + +[[product.product_name]] + +[% include "header_notice.osr" %] + +[% include "body.md" %] + +
+ [% include "product_overview_drawings.osr" %] +
+ +
+
+
+

Specification

+ [% include "product_specs.osr" html:true %] +
+ +
+ [% if config.show.authors %] + [% include "authors_html.osr" authors:product.authors showHeader:true %] + [%endif%] +
+
+
+ +[% include "product_resources.osr" %] + +[% include "product_showreel.osr" %] + +[% if config.show.howtos %] + [% include "product_howtos.osr" %] +[%endif%] + +[% if config.show.debug %] + [% include "product_debug.osr" %] +[%endif%] + + +[%js%] + +[%endjs%] diff --git a/packages/osr-templates/discourse/social_links.osr b/packages/osr-templates/discourse/social_links.osr new file mode 100644 index 0000000..0760fdc --- /dev/null +++ b/packages/osr-templates/discourse/social_links.osr @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/packages/osr-templates/discourse/variables.osr b/packages/osr-templates/discourse/variables.osr new file mode 100644 index 0000000..b676c4a --- /dev/null +++ b/packages/osr-templates/discourse/variables.osr @@ -0,0 +1,62 @@ +[% capture config %][% js %] +const globalVariables = readJSON('${OSR_ROOT}/osr-templates/discourse/base.json'); +addGlobal({config:globalVariables}) +addGlobal({config:globalVariables.variables}) + +register('config',globalVariables.variables) +register('variables',globalVariables.variables) +register('show',globalVariables.variables.show) + +return globalVariables +[%endjs%][% endcapture -%] +[% capture product %][% js %] + const globalVariables = readJSON('${OSR_ROOT}/osr-templates/discourse/base.json') + let localVariables = readJSON('${PRODUCT_ROOT}/config.json') + + delete localVariables['download'] + delete localVariables['product_dimensions'] + delete localVariables['edrawings'] + + localVariables['image']='${product_rel}/renderings/perspective.jpg' + + let defaultsJSON = fs.findUp.sync('defaults.json', { + cwd:PRODUCT_ROOT, + stopAt:root + }); + + if(defaultsJSON){ + defaultsJSON = readJSON(defaultsJSON); + localVariables = { + ...defaultsJSON, + ...localVariables + } + } + + + let allVariables = { + ...globalVariables.variables, + ...localVariables, + ...scope + } + + const _scope = scope + + allVariables.product_rel = product; + + writeJSON("./tmp.json",allVariables) + const allStr = read("./tmp.json") + + let all = forward_slash(substitute(allStr,allVariables)) + write("./tmp-a.json",forward_slash(all)) + + try{ + allVariables = JSON.parse(all); + resolveConfig(allVariables); + addGlobal({product:allVariables}); + register('product',allVariables) + return allVariables; + }catch(e){ + debugger + } + +[%endjs%][% endcapture -%] diff --git a/packages/osr-templates/discourse/vendor_instagram.osr b/packages/osr-templates/discourse/vendor_instagram.osr new file mode 100644 index 0000000..946c7e0 --- /dev/null +++ b/packages/osr-templates/discourse/vendor_instagram.osr @@ -0,0 +1,22 @@ +

Our latest Instagram posts

+ +[%js%] + +return cacache.get.info(CACHE, 'vendor-instagram').then((cache)=>{ + if(cache){ + return cacache.get(CACHE, 'vendor-instagram').then((cached)=>{ + return cached.data.toString(); + }) + } + console.log('get instagram images'); + return instagram.images(config.instagram.user,config.instagram.token,global).then((images)=>{ + images = images.slice(0, 8); + images = html.container.wrap(images.map((i)=> html.container.item(html.image(i,null,'max-height:200px'),'border:none; width:200px;max-height:200px')).join('\n')); + return cacache.put(CACHE,'vendor-instagram',images).then(()=>{ + return images; + }) + }); + +}); + +[%endjs%] diff --git a/packages/osr-templates/discourse/widgets/alternatives.osr b/packages/osr-templates/discourse/widgets/alternatives.osr new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/discourse/widgets/authors.osr b/packages/osr-templates/discourse/widgets/authors.osr new file mode 100644 index 0000000..5fee001 --- /dev/null +++ b/packages/osr-templates/discourse/widgets/authors.osr @@ -0,0 +1,2 @@ +## Authors2 +[%- for author in authors -%] - [ [[-author.name]] ]( [[author.url-]] ) [%- endfor -%] diff --git a/packages/osr-templates/discourse/widgets/authors_html.osr b/packages/osr-templates/discourse/widgets/authors_html.osr new file mode 100644 index 0000000..411723a --- /dev/null +++ b/packages/osr-templates/discourse/widgets/authors_html.osr @@ -0,0 +1,2 @@ +[%- if showHeader -%]

Authors

[%- endif -%] + diff --git a/packages/osr-templates/discourse/widgets/cam_html.osr b/packages/osr-templates/discourse/widgets/cam_html.osr new file mode 100644 index 0000000..0ed97e6 --- /dev/null +++ b/packages/osr-templates/discourse/widgets/cam_html.osr @@ -0,0 +1,16 @@ + +[%if product.production %] +
+ [%- if product.production.cam -%] +

CAM Files

+ [%if product.production.fusion-folder -%] +

Fusion Folder

+ [%- endif -%] +
    + [%- for cam in product.production.cam -%] +
  • [[cam.name]]
  • + [%- endfor -%] +
+ [% endif %] +
+[% endif -%] diff --git a/packages/osr-templates/discourse/widgets/issues.osr b/packages/osr-templates/discourse/widgets/issues.osr new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/discourse/widgets/marketplaceLinks.osr b/packages/osr-templates/discourse/widgets/marketplaceLinks.osr new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/discourse/widgets/meta.osr b/packages/osr-templates/discourse/widgets/meta.osr new file mode 100644 index 0000000..717f5ae --- /dev/null +++ b/packages/osr-templates/discourse/widgets/meta.osr @@ -0,0 +1,10 @@ +[%- if product.status or product.version -%] +#### Brief +[%-endif%] +[%- if product.status -%] +- **Status**: [[product.status]] +[%-endif-%] +[%- if product.version -%] +- **Version**: [[product.version]] +[%-endif-%] +- [**Last Change**]([[variables.GIT_REPO]]/commit/[[GIT_COMMIT]]) : [[GIT_LAST]] by [ [[GIT_AUTHOR]] ]([[variables.GIT_REPO]]/[[GIT_AUTHOR]]) - ```[[GIT_MESSAGE]]``` \ No newline at end of file diff --git a/packages/osr-templates/discourse/widgets/replacedBy.osr b/packages/osr-templates/discourse/widgets/replacedBy.osr new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/email/mosaico/package.json b/packages/osr-templates/email/mosaico/package.json new file mode 100644 index 0000000..4df85ec --- /dev/null +++ b/packages/osr-templates/email/mosaico/package.json @@ -0,0 +1,119 @@ +{ + "name": "@plastichub/email-mosaic", + "description": "Liquid based markup language", + "version": "0.5.4", + "typings": "index.d.ts", + "publishConfig": { + "access": "public" + }, + "bin": { + "osrl": "main.js" + }, + "dependencies": { + "@elastic/elasticsearch": "^7.13.0", + "@google-cloud/local-auth": "^2.1.0", + "@iarna/toml": "^2.2.5", + "@plastichub/core": "^0.2.6", + "@plastichub/fs": "^0.13.39", + "@plastichub/osr-cache": "^0.3.9", + "@plastichub/osr-vcs": "^0.0.3", + "@types/cacache": "^15.0.1", + "@types/download": "^8.0.1", + "@types/get-stdin": "^7.0.0", + "@types/inquirer": "^7.3.3", + "@types/is-glob": "^4.0.2", + "@types/js-beautify": "^1.13.2", + "@types/jsonpath": "^0.2.0", + "@types/moment": "^2.13.0", + "@types/node": "^20.14.2", + "@types/yargs": "^17.0.2", + "axios": "^0.21.1", + "bluebird": "^3.7.2", + "cacache": "^15.2.0", + "chalk": "^2.4.1", + "cheerio": "^1.0.0-rc.10", + "convert-units": "^2.3.4", + "download": "^8.0.0", + "env-var": "^7.3.0", + "errlop": "^4.5.0", + "exception-formatter": "^2.1.2", + "fast-glob": "^3.2.7", + "find-up": "4.0", + "front-matter": "^4.0.2", + "get-stdin": "^9.0.0", + "gitea-js": "^1.20.1", + "glob-base": "^0.3.0", + "googleapis": "^105.0.0", + "gray-matter": "^4.0.3", + "grunt": "^1.6.1", + "grunt-cli": "^1.4.3", + "grunt-contrib-clean": "^2.0.0", + "grunt-extend-config": "^0.9.7", + "grunt-parallel": "^0.5.1", + "grunt-shell": "^3.0.1", + "highlight.js": "^11.1.0", + "inquirer": "^8.1.2", + "is-glob": "^4.0.1", + "is-url": "^1.2.4", + "isomorphic-unfetch": "^3.1.0", + "js-base64": "^3.7.2", + "js-beautify": "^1.14.0", + "jsdom": "^16.7.0", + "jsome": "^2.3.24", + "json-format-highlight": "^1.0.4", + "json-pretty-html": "^1.1.6", + "json-to-pretty-yaml": "^1.2.2", + "jsonpath": "^1.1.1", + "keyv": "^4.5.4", + "keyv-file": "^0.3.1", + "lodash": "^4.17.21", + "markdown-table": "^3.0.3", + "moment": "^2.29.1", + "native-promise-pool": "^3.19.0", + "node-xlsx": "^0.24.0", + "npm-run-all": "^4.1.5", + "open-graph-scraper": "^5.0.5", + "ora": "^1.3.0", + "parse-glob": "^3.0.4", + "pretty": "^2.0.0", + "query-string": "^7.1.3", + "readline": "^1.3.0", + "require-like": "^0.1.2", + "rotating-file-stream": "^3.2.3", + "sharp": "^0.33.4", + "showdown": "^1.9.1", + "typescript": "^4.9.4", + "uri-js": "^4.4.1", + "yaml": "^2.4.2", + "yargs": "^14.2.3", + "yargs-parser": "^15.0.3" + }, + "scripts": { + "test": "tsc; mocha --full-trace mocha \"spec/**/*.spec.js\"", + "test-with-coverage": "istanbul cover node_modules/.bin/_mocha -- 'spec/**/*.spec.js'", + "lint": "tslint --project=./tsconfig.json", + "build": "tsc -p . --declaration", + "dev": "tsc -p . --declaration -w", + "dev-grunt": "cd tasks && tsc -p . --declaration -w", + "typings": "tsc --declaration", + "docs": "npx typedoc src/index.ts", + "dev-test-watch": "mocha-typescript-watch", + "init:google-sheets": "node ./main.js init google-sheets --sheet='1oVEiGH4o3SV-mAA3Mb-WNVJMyYl4VMxLjWjrSw_ipJY' --range='Parts!B4:B5'" + }, + "homepage": "https://git.osr-plastic.org/plastichub/lib-content", + "repository": { + "type": "git", + "url": "https://git.osr-plastic.org/plastichub/lib-content.git" + }, + "engines": { + "node": ">= 8.0.0" + }, + "license": "BSD-3-Clause", + "keywords": [ + "typescript" + ], + "pre-commit": [], + "optionalDependencies": { + "@img/sharp-win32-x64": "^0.33.4" + } +} diff --git a/packages/osr-templates/email/mosaico/readme.md b/packages/osr-templates/email/mosaico/readme.md new file mode 100644 index 0000000..18dcd9a --- /dev/null +++ b/packages/osr-templates/email/mosaico/readme.md @@ -0,0 +1,5 @@ +## HTML EMail - Templates + +### References + +- [mosaico](https://mosaico.io/) diff --git a/packages/osr-templates/osrl/.osrl.json b/packages/osr-templates/osrl/.osrl.json new file mode 100644 index 0000000..89746fb --- /dev/null +++ b/packages/osr-templates/osrl/.osrl.json @@ -0,0 +1,96 @@ +{ + "includes": [ + "${root}/src/data/", + "${PRODUCT_ROOT}", + "${PRODUCT_ROOT}/templates/site/", + "${PRODUCT_ROOT}/templates/shared/", + "${OSR_ROOT}/products/company/campaign/widgets", + "${OSR_ROOT}/products/company/campaign/content", + "${OSR_ROOT}/products/company/campaign/data", + "${OSR_ROOT}/products/company/commons", + "${OSR_ROOT}/products/company/commons/widgets", + "${OSR_ROOT}/osr-templates/osrl/widgets", + "${root}/osr", + "${root}/osr/widgets", + "${root}/_includes", + "${root}/templates/site/" + ], + "variables": { + "PRODUCT_ROOT": "${root}/${product}/", + "abs_url": "https://assets.osr-plastic.org", + "CACHE": "${root}/cache/", + "CACHE_URL": "${abs_url}/cache/", + "GIT_REPO": "https://git.polymech.io/", + "_OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org/machines/", + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org", + "PRODUCTS_ASSETS_URL":"https://assets.osr-plastic.org/machines/${product}", + "OSR_FILES_WEB":"https://files.polymech.io/files/machines", + "PRODUCTS_FILES_URL":"${OSR_FILES_WEB}/${product_rel}", + "DISCORD":"https://discord.gg/s8K7yKwBRc" + }, + "env": { + "bazar":{ + "includes": [ + "${PRODUCT_ROOT}/templates/bazar", + "${PRODUCT_ROOT}/templates/shared/", + "${root}/osr", + "${root}/osr/widgets", + "${PRODUCT_ROOT}" + ], + "variables": { + "abs_url": "https://dev.osr-plastic.org/" + } + }, + "bazar-release":{ + "includes": [ + "${PRODUCT_ROOT}/templates/bazar", + "${PRODUCT_ROOT}/templates/shared/", + "${root}/osr", + "${root}/osr/widgets", + "${PRODUCT_ROOT}" + ], + "variables": { + "abs_url": "https://plastic-hub.com/", + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org/machines/" + } + }, + "hugo-release":{ + "includes": [ + "${PRODUCT_ROOT}/templates/bazar", + "${PRODUCT_ROOT}/templates/shared/", + "${root}/osr", + "${root}/osr/widgets", + "${PRODUCT_ROOT}", + "${OSR_ROOT}/osr-templates/osrl/widgets" + ], + "variables": { + "abs_url": "https://plastic-hub.com/", + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org/machines/" + } + }, + "hugo-debug":{ + "includes": [ + "${PRODUCT_ROOT}/templates/bazar", + "${PRODUCT_ROOT}/templates/shared/", + "${root}/osr", + "${root}/osr/widgets", + "${PRODUCT_ROOT}", + "${OSR_ROOT}/osr-templates/osrl/widgets" + ], + "variables": { + "abs_url": "https://plastic-hub.com/", + "OSR_MACHINES_ASSETS_URL":"https://assets.osr-plastic.org", + "showCart": false, + "showPrice": false, + "showResources": false, + "showShipping": false, + "showPaymentTerms": false, + "showHowtos": false, + "showRenderings": true, + "debug": true + } + } + + } + +} \ No newline at end of file diff --git a/packages/osr-templates/osrl/plugins/html.js b/packages/osr-templates/osrl/plugins/html.js new file mode 100644 index 0000000..9ba73ea --- /dev/null +++ b/packages/osr-templates/osrl/plugins/html.js @@ -0,0 +1,50 @@ +const path = require('path'); + +const link = (name, link, _class) => `${name}`; +const wrap = (content) => ` +
+
+ ${content} +
+
+`; + +const image = (src, link, style) => ``; + +const item = (content, style = 'border-color: #c5c5c5;width: 300px;display: inline-block', title) => + `
+ ${content}
+
${title||''}
+
`; + +const styles = { + thumb: 'border:none; width:200px;max-height:200px' +}; + +const center_caption = (el = 'h5', text) => `<${el} style="text-align:center">${text}`; + +const thumbs = (url, folder) => { + const context = require('@plastichub/osrl/library').getContext(); + folder = path.resolve(folder); + let images = context.fs.images(folder, { + absolute: false + }); + images = images.map((i) => item(image(`${url}/${i}`), 'border:none; width:200px;max-height:200px')); + images = wrap(images.join('\n')); + return images; +} +module.exports = { + html: { + link: link, + caption: { + center: center_caption + }, + container: { + wrap: wrap, + item: item + }, + image: image, + styles: styles, + thumbs: thumbs + } +}; \ No newline at end of file diff --git a/packages/osr-templates/osrl/plugins/instagram.js_ b/packages/osr-templates/osrl/plugins/instagram.js_ new file mode 100644 index 0000000..607a72a --- /dev/null +++ b/packages/osr-templates/osrl/plugins/instagram.js_ @@ -0,0 +1,59 @@ +const url = require('url'); +const path = require('path'); +process.on('unhandledRejection', (reason) => { + console.error('Unhandled rejection, reason: ', reason); + debugger; +}); +const images = (user, password, context) => { + return new Promise((resolve, reject) => { + context.ig.feed(user, password).then((f) => { + f = f.feed.filter((p)=>{ + return p.media_type !==2; + }); + let ret = f.map((p) => { + try { + const media = p.carousel_media ? p.carousel_media[0] : { + image_versions2: p.image_versions2 + }; + if (media) { + const version = media.image_versions2.candidates[1] ? media.image_versions2.candidates[1] : media.image_versions2.candidates[0]; + return { + image: version.url, + url: p.code + } + } + } catch (e) { + debugger; + } + }); + context.BPromise.resolve(ret).map((i) => { + const parts = url.parse(i.image); + const fileName = context.fs.path.basename(parts.pathname); + const cacheDir = context.fs.path.resolve(`${context.CACHE}`); + const cacheFile = context.fs.path.resolve(`${cacheDir}/${fileName}`); + if (context.fs.exists(cacheFile)) { + return cacheFile; + } else { + return context.download(i.image, cacheDir); + } + }, { + concurrency: 1 + }).then(() => { + ret = ret.map((i) => { + const parts = url.parse(i.image); + const fileName = context.fs.path.basename(parts.pathname); + return { + path: `${context.CACHE_URL}/${fileName}`, + url : i.url + } + }); + resolve(ret); + }); + }); + }); +} +module.exports = { + instagram: { + images: images + } +}; \ No newline at end of file diff --git a/packages/osr-templates/osrl/widgets/xlsx.osr b/packages/osr-templates/osrl/widgets/xlsx.osr new file mode 100644 index 0000000..73ec016 --- /dev/null +++ b/packages/osr-templates/osrl/widgets/xlsx.osr @@ -0,0 +1,17 @@ +[% js %] +if(!file){ + return +} +//logger.info('xlsx.osr', file || 'no file') +const _path = lookup(file || ''); +if (!path || !fs.exists(_path)) { + return ''; +} else { + const t = global; + let data = xlsx.parse(_path); + data[0].data = data[0].data.filter((d) => !!d.length); + data = markdownTable(data[0].data); + const ret = md2html(data); + return ret +} +[% endjs %] diff --git a/packages/osr-templates/package-lock.json b/packages/osr-templates/package-lock.json new file mode 100644 index 0000000..a4ec95c --- /dev/null +++ b/packages/osr-templates/package-lock.json @@ -0,0 +1,19 @@ +{ + "name": "@plastichub/osr-templates", + "version": "0.1.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@plastichub/osr-templates", + "version": "0.1.1", + "license": "BSD-3-Clause", + "bin": { + "osr-templates": "main.js" + }, + "engines": { + "node": ">= 14.0.0" + } + } + } +} diff --git a/packages/osr-templates/package.json b/packages/osr-templates/package.json new file mode 100644 index 0000000..0a6b273 --- /dev/null +++ b/packages/osr-templates/package.json @@ -0,0 +1,31 @@ +{ + "name": "@plastichub/osr-templates", + "description": "", + "version": "0.1.1", + "typings": "index.d.ts", + "publishConfig": { + "access": "public" + }, + "module": "index.js", + "bin": { + "osr-templates": "main.js" + }, + "dependencies": { + + }, + "scripts": { + + }, + "homepage": "https://git.osr-plastic.org/plastichub/lib-content", + "repository": { + "type": "git", + "url": "https://git.osr-plastic.org/plastichub/lib-content.git" + }, + "engines": { + "node": ">= 14.0.0" + }, + "license": "BSD-3-Clause", + "keywords": [ + "typescript" + ] +} diff --git a/packages/osr-templates/product/cad/.gitignore b/packages/osr-templates/product/cad/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/config.json b/packages/osr-templates/product/config.json new file mode 100644 index 0000000..10d9e46 --- /dev/null +++ b/packages/osr-templates/product/config.json @@ -0,0 +1,37 @@ +{ + "slug": "${slug}", + "name": "${name}", + "category": "${category}", + "code": "${code}", + "version": "${version}", + "forum": "${forum}", + "forumCategory": "${forumCategory}", + "product_dimensions": "${abs_url}/${product_rel}/drawings/dimensions.jpg", + "product_perspective": "${abs_url}/${product_rel}/renderings/perspective.jpg", + "product_page": "${abs_url}/products/${slug}.html", + "edrawings": "${abs_url}/${product_rel}/resources/edrawings.html", + "download": false, + "showParts":false, + "showDimensions":false, + "Preview3D":false, + "cscartId":"${cart_id}", + "status": "development", + "osr": { + "version": "0.3" + }, + "howtos": [ + ], + "components": [], + "hasSpec": false, + + "production": { + }, + "build":{ + }, + "authors": [ + { + "name": "PlasticHub S.L.", + "url": "${author_link}" + } + ] +} \ No newline at end of file diff --git a/packages/osr-templates/product/config.yaml b/packages/osr-templates/product/config.yaml new file mode 100644 index 0000000..c000aaf --- /dev/null +++ b/packages/osr-templates/product/config.yaml @@ -0,0 +1,12 @@ +tags : +categories: +alternatives: +tabs: + - build: false +product_id: ${product_id} +preview: ${product_preview} +buy: "mailto:sales@plastic-hub.com?subject=Inquiry%20-%20${slug}" +teaser: "${teaser}" +products: true +overview_drawing: true + diff --git a/packages/osr-templates/product/drawings/.gitignore b/packages/osr-templates/product/drawings/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/media/.gitignore b/packages/osr-templates/product/media/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/media/gallery/.gitignore b/packages/osr-templates/product/media/gallery/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/renderings/.gitignore b/packages/osr-templates/product/renderings/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/resources/.gitignore b/packages/osr-templates/product/resources/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/specs.xlsx b/packages/osr-templates/product/specs.xlsx new file mode 100644 index 0000000..1a334c1 Binary files /dev/null and b/packages/osr-templates/product/specs.xlsx differ diff --git a/packages/osr-templates/product/templates/.gitignore b/packages/osr-templates/product/templates/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/product/templates/shared/.gitignore b/packages/osr-templates/product/templates/shared/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/osr-templates/tsconfig.json b/packages/osr-templates/tsconfig.json new file mode 100644 index 0000000..39bb78d --- /dev/null +++ b/packages/osr-templates/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES6", + "allowJs": true, + "noImplicitAny": false, + "noImplicitThis": false, + "alwaysStrict": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "inlineSources": true, + "inlineSourceMap": true, + "pretty": true, + "baseUrl": ".", + "watch": false, + "allowSyntheticDefaultImports": true + }, + "include": [ + "./src/index.ts", + "./tasks/**/*.ts" + ] +} \ No newline at end of file