jyn 0.0.1-beta → 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +41 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.mjs +0 -0
- package/index.ts +16 -0
- package/package.json +24 -17
- package/tsconfig.json +45 -0
- package/utils/timers.ts +1 -0
- package/index.js +0 -22
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
25
|
+
|
|
26
|
+
// index.ts
|
|
27
|
+
var import_chalk_animation = __toESM(require("chalk-animation"), 1);
|
|
28
|
+
|
|
29
|
+
// utils/timers.ts
|
|
30
|
+
var sleep = (ms = 1e3) => new Promise((res) => setTimeout(res, ms));
|
|
31
|
+
|
|
32
|
+
// index.ts
|
|
33
|
+
async function welcome() {
|
|
34
|
+
const title = import_chalk_animation.default.rainbow("I'm Gyn - a random generator toolbelt");
|
|
35
|
+
await sleep();
|
|
36
|
+
title.stop();
|
|
37
|
+
}
|
|
38
|
+
async function start() {
|
|
39
|
+
await welcome();
|
|
40
|
+
}
|
|
41
|
+
start();
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// index.ts
|
|
4
|
+
import chalkAnimation from "chalk-animation";
|
|
5
|
+
|
|
6
|
+
// utils/timers.ts
|
|
7
|
+
var sleep = (ms = 1e3) => new Promise((res) => setTimeout(res, ms));
|
|
8
|
+
|
|
9
|
+
// index.ts
|
|
10
|
+
async function welcome() {
|
|
11
|
+
const title = chalkAnimation.rainbow("I'm Gyn - a random generator toolbelt");
|
|
12
|
+
await sleep();
|
|
13
|
+
title.stop();
|
|
14
|
+
}
|
|
15
|
+
async function start() {
|
|
16
|
+
await welcome();
|
|
17
|
+
}
|
|
18
|
+
start();
|
package/dist/index.mjs
ADDED
|
File without changes
|
package/index.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import chalkAnimation from 'chalk-animation';
|
|
3
|
+
import { sleep } from './utils/timers';
|
|
4
|
+
|
|
5
|
+
async function welcome(){
|
|
6
|
+
const title = chalkAnimation.rainbow("I'm Gyn - a random generator toolbelt");
|
|
7
|
+
await sleep();
|
|
8
|
+
title.stop();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
async function start(){
|
|
13
|
+
await welcome();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
start();
|
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
"name": "jyn",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "0.0.1-beta.2",
|
|
5
|
+
"description": "Toolkit for random generation",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsup index.ts --format cjs,esm --dts",
|
|
12
|
+
"lint": "tsc"
|
|
13
|
+
},
|
|
14
|
+
"bin":{
|
|
15
|
+
"gyn":"index.js"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/chalk-animation": "^1.6.3",
|
|
19
|
+
"tsup": "^8.5.1",
|
|
20
|
+
"typescript": "^5.9.3"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"chalk-animation": "^2.0.3"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
// "rootDir": "./src",
|
|
6
|
+
// "outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"module": "es2022",
|
|
12
|
+
"target": "esnext",
|
|
13
|
+
"types": [],
|
|
14
|
+
// For nodejs:
|
|
15
|
+
// "lib": ["esnext"],
|
|
16
|
+
// "types": ["node"],
|
|
17
|
+
// and npm install -D @types/node
|
|
18
|
+
|
|
19
|
+
// Other Outputs
|
|
20
|
+
"sourceMap": true,
|
|
21
|
+
"declaration": true,
|
|
22
|
+
"declarationMap": true,
|
|
23
|
+
|
|
24
|
+
// Stricter Typechecking Options
|
|
25
|
+
"noUncheckedIndexedAccess": true,
|
|
26
|
+
"exactOptionalPropertyTypes": true,
|
|
27
|
+
"noEmit": true,
|
|
28
|
+
|
|
29
|
+
// Style Options
|
|
30
|
+
// "noImplicitReturns": true,
|
|
31
|
+
// "noImplicitOverride": true,
|
|
32
|
+
// "noUnusedLocals": true,
|
|
33
|
+
// "noUnusedParameters": true,
|
|
34
|
+
// "noFallthroughCasesInSwitch": true,
|
|
35
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
36
|
+
|
|
37
|
+
// Recommended Options
|
|
38
|
+
"strict": true,
|
|
39
|
+
"verbatimModuleSyntax": true,
|
|
40
|
+
"isolatedModules": true,
|
|
41
|
+
"noUncheckedSideEffectImports": true,
|
|
42
|
+
"moduleDetection": "force",
|
|
43
|
+
"skipLibCheck": true,
|
|
44
|
+
}
|
|
45
|
+
}
|
package/utils/timers.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const sleep = (ms=1000)=> new Promise(res=> setTimeout(res,ms));
|
package/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { OpenRouter } from "@openrouter/sdk";
|
|
2
|
-
|
|
3
|
-
const openrouter = new OpenRouter({
|
|
4
|
-
});
|
|
5
|
-
|
|
6
|
-
const stream = await openrouter.chat.send({
|
|
7
|
-
model: "liquid/lfm-2.5-1.2b-thinking:free",
|
|
8
|
-
messages: [
|
|
9
|
-
{
|
|
10
|
-
"role": "user",
|
|
11
|
-
"content": "What is the meaning of name Abhirup?"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
stream: true
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
for await (const chunk of stream) {
|
|
18
|
-
const content = chunk.choices[0]?.delta?.content;
|
|
19
|
-
if (content) {
|
|
20
|
-
process.stdout.write(content);
|
|
21
|
-
}
|
|
22
|
-
}
|