mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 17:48:30 +02:00
Don't build internal TS packages
This commit is contained in:
@@ -40,6 +40,6 @@
|
|||||||
"nodejs-file-downloader": "^4.13.0",
|
"nodejs-file-downloader": "^4.13.0",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"typescript": "^5.6.0"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,7 @@
|
|||||||
"@types/intercept-stdout": "^0.1.3",
|
"@types/intercept-stdout": "^0.1.3",
|
||||||
"grpc-tools": "^1.12.4",
|
"grpc-tools": "^1.12.4",
|
||||||
"nodemon": "^3.1.4",
|
"nodemon": "^3.1.4",
|
||||||
"npm-run-all": "^4.1.5",
|
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"ts-proto": "^2.2.0",
|
"ts-proto": "^2.2.0"
|
||||||
"typescript": "^5.6.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ async function initialize() {
|
|||||||
const pathPkg = path.join(pluginDir, 'package.json');
|
const pathPkg = path.join(pluginDir, 'package.json');
|
||||||
|
|
||||||
const pathMod = path.posix.join(pluginDir, 'build', 'index.js');
|
const pathMod = path.posix.join(pluginDir, 'build', 'index.js');
|
||||||
|
|
||||||
async function importModule() {
|
async function importModule() {
|
||||||
const id = require.resolve(pathMod);
|
const id = require.resolve(pathMod);
|
||||||
delete require.cache[id];
|
delete require.cache[id];
|
||||||
@@ -247,7 +248,9 @@ async function initialize() {
|
|||||||
payload.type === 'call_http_request_action_request' &&
|
payload.type === 'call_http_request_action_request' &&
|
||||||
Array.isArray(mod.plugin?.httpRequestActions)
|
Array.isArray(mod.plugin?.httpRequestActions)
|
||||||
) {
|
) {
|
||||||
const action = mod.plugin.httpRequestActions.find((a) => a.key === payload.key);
|
const action = mod.plugin.httpRequestActions.find(
|
||||||
|
(a: HttpRequestActionPlugin) => a.key === payload.key,
|
||||||
|
);
|
||||||
if (typeof action?.onSelect === 'function') {
|
if (typeof action?.onSelect === 'function') {
|
||||||
await action.onSelect(ctx, payload.args);
|
await action.onSelect(ctx, payload.args);
|
||||||
sendEmpty(replyId);
|
sendEmpty(replyId);
|
||||||
@@ -259,7 +262,9 @@ async function initialize() {
|
|||||||
payload.type === 'call_template_function_request' &&
|
payload.type === 'call_template_function_request' &&
|
||||||
Array.isArray(mod.plugin?.templateFunctions)
|
Array.isArray(mod.plugin?.templateFunctions)
|
||||||
) {
|
) {
|
||||||
const action = mod.plugin.templateFunctions.find((a) => a.name === payload.name);
|
const action = mod.plugin.templateFunctions.find(
|
||||||
|
(a: TemplateFunctionPlugin) => a.name === payload.name,
|
||||||
|
);
|
||||||
if (typeof action?.onRender === 'function') {
|
if (typeof action?.onRender === 'function') {
|
||||||
const result = await action.onRender(ctx, payload.args);
|
const result = await action.onRender(ctx, payload.args);
|
||||||
sendPayload({ type: 'call_template_function_response', value: result ?? null }, replyId);
|
sendPayload({ type: 'call_template_function_response', value: result ?? null }, replyId);
|
||||||
|
|||||||
1
src-tauri/yaak_models/.gitignore
vendored
1
src-tauri/yaak_models/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
lib
|
|
||||||
@@ -2,9 +2,5 @@
|
|||||||
"name": "@yaakapp-internal/models",
|
"name": "@yaakapp-internal/models",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "lib/index.js",
|
"main": "index.ts"
|
||||||
"typings": "./lib/index.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsc"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "node16",
|
|
||||||
"target": "es6",
|
|
||||||
"lib": ["es2021"],
|
|
||||||
"declaration": true,
|
|
||||||
"declarationDir": "./lib",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"strict": true,
|
|
||||||
"types": ["node"]
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
1
src-tauri/yaak_plugin_runtime/.gitignore
vendored
1
src-tauri/yaak_plugin_runtime/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
lib
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
@@ -2,9 +2,5 @@
|
|||||||
"name": "@yaakapp-internal/plugin",
|
"name": "@yaakapp-internal/plugin",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "lib/index.js",
|
"main": "index.ts"
|
||||||
"typings": "./lib/index.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsc"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "node16",
|
|
||||||
"target": "es6",
|
|
||||||
"lib": ["es2021"],
|
|
||||||
"declaration": true,
|
|
||||||
"declarationDir": "./lib",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"strict": true,
|
|
||||||
"types": ["node"]
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1 +1,4 @@
|
|||||||
export * from './bindings/parser';
|
export * from './bindings/parser';
|
||||||
|
export type COOL = {
|
||||||
|
bar: string;
|
||||||
|
};
|
||||||
|
|||||||
@@ -2,9 +2,5 @@
|
|||||||
"name": "@yaakapp-internal/template",
|
"name": "@yaakapp-internal/template",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "lib/index.js",
|
"main": "index.ts"
|
||||||
"typings": "./lib/index.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsc"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "node16",
|
|
||||||
"target": "es6",
|
|
||||||
"lib": ["es2021"],
|
|
||||||
"declaration": true,
|
|
||||||
"declarationDir": "./lib",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"strict": true,
|
|
||||||
"types": ["node"]
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { invokeCmd } from '../lib/tauri';
|
|
||||||
import type { Tokens } from '@yaakapp-internal/template';
|
import type { Tokens } from '@yaakapp-internal/template';
|
||||||
|
import { invokeCmd } from '../lib/tauri';
|
||||||
|
|
||||||
export function useParseTemplate(template: string) {
|
export function useParseTemplate(template: string) {
|
||||||
return useQuery<Tokens>({
|
return useQuery<Tokens>({
|
||||||
|
|||||||
31
tsconfig.json
Normal file
31
tsconfig.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2021",
|
||||||
|
"lib": [
|
||||||
|
"DOM",
|
||||||
|
"DOM.Iterable",
|
||||||
|
"ESNext"
|
||||||
|
],
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"allowJs": false,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"esModuleInterop": false,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"strict": true,
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"jsx": "react-jsx"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"."
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"vite.config.ts"
|
||||||
|
],
|
||||||
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
|
}
|
||||||
10
tsconfig.node.json
Normal file
10
tsconfig.node.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"noUncheckedIndexedAccess": true
|
||||||
|
},
|
||||||
|
"include": ["vite.config.ts"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user