@seyuna/cli 1.0.0-canary.12 → 1.0.0-canary.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/esm/_dnt.polyfills.d.ts +24 -0
- package/esm/_dnt.polyfills.js +1 -0
- package/esm/_dnt.shims.d.ts +5 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/deno.d.ts +23 -0
- package/esm/deno.js +27 -0
- package/esm/package.json +3 -0
- package/package.json +24 -18
- package/bin/seyuna.js +0 -10
- package/install.js +0 -42
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Seyuna
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# seyuna-cli
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface ImportMeta {
|
|
3
|
+
/** A flag that indicates if the current module is the main module that was
|
|
4
|
+
* called when starting the program under Deno.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* if (import.meta.main) {
|
|
8
|
+
* // this was loaded as the main module, maybe do some bootstrapping
|
|
9
|
+
* }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
main: boolean;
|
|
13
|
+
/** A function that returns resolved specifier as if it would be imported
|
|
14
|
+
* using `import(specifier)`.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* console.log(import.meta.resolve("./foo.js"));
|
|
18
|
+
* // file:///dev/foo.js
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
resolve(specifier: string): string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Deno } from "@deno/shim-deno";
|
|
2
|
+
export { Deno } from "@deno/shim-deno";
|
|
3
|
+
const dntGlobals = {
|
|
4
|
+
Deno,
|
|
5
|
+
};
|
|
6
|
+
export const dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
7
|
+
function createMergeProxy(baseObj, extObj) {
|
|
8
|
+
return new Proxy(baseObj, {
|
|
9
|
+
get(_target, prop, _receiver) {
|
|
10
|
+
if (prop in extObj) {
|
|
11
|
+
return extObj[prop];
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return baseObj[prop];
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
set(_target, prop, value) {
|
|
18
|
+
if (prop in extObj) {
|
|
19
|
+
delete extObj[prop];
|
|
20
|
+
}
|
|
21
|
+
baseObj[prop] = value;
|
|
22
|
+
return true;
|
|
23
|
+
},
|
|
24
|
+
deleteProperty(_target, prop) {
|
|
25
|
+
let success = false;
|
|
26
|
+
if (prop in extObj) {
|
|
27
|
+
delete extObj[prop];
|
|
28
|
+
success = true;
|
|
29
|
+
}
|
|
30
|
+
if (prop in baseObj) {
|
|
31
|
+
delete baseObj[prop];
|
|
32
|
+
success = true;
|
|
33
|
+
}
|
|
34
|
+
return success;
|
|
35
|
+
},
|
|
36
|
+
ownKeys(_target) {
|
|
37
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
38
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
39
|
+
const extKeysSet = new Set(extKeys);
|
|
40
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
41
|
+
},
|
|
42
|
+
defineProperty(_target, prop, desc) {
|
|
43
|
+
if (prop in extObj) {
|
|
44
|
+
delete extObj[prop];
|
|
45
|
+
}
|
|
46
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
47
|
+
return true;
|
|
48
|
+
},
|
|
49
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
50
|
+
if (prop in extObj) {
|
|
51
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
has(_target, prop) {
|
|
58
|
+
return prop in extObj || prop in baseObj;
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
package/esm/deno.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let name: string;
|
|
3
|
+
let version: string;
|
|
4
|
+
let exports: string;
|
|
5
|
+
namespace publish {
|
|
6
|
+
let include: string[];
|
|
7
|
+
}
|
|
8
|
+
namespace tasks {
|
|
9
|
+
let start: string;
|
|
10
|
+
let test: string;
|
|
11
|
+
}
|
|
12
|
+
let imports: {
|
|
13
|
+
"@std/cli": string;
|
|
14
|
+
"@std/fs": string;
|
|
15
|
+
"@std/path": string;
|
|
16
|
+
"@std/assert": string;
|
|
17
|
+
"@std/async": string;
|
|
18
|
+
"@std/fmt": string;
|
|
19
|
+
"@cliffy/command": string;
|
|
20
|
+
dnt: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export default _default;
|
package/esm/deno.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"name": "@seyuna/cli",
|
|
3
|
+
"version": "1.0.0-canary.16",
|
|
4
|
+
"exports": "./src/main.ts",
|
|
5
|
+
"publish": {
|
|
6
|
+
"include": [
|
|
7
|
+
"src/**/*.ts",
|
|
8
|
+
"deno.json",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"tasks": {
|
|
14
|
+
"start": "deno run -A src/main.ts",
|
|
15
|
+
"test": "deno test -A"
|
|
16
|
+
},
|
|
17
|
+
"imports": {
|
|
18
|
+
"@std/cli": "jsr:@std/cli@^1.0.25",
|
|
19
|
+
"@std/fs": "jsr:@std/fs@^1.0.0",
|
|
20
|
+
"@std/path": "jsr:@std/path@^1.0.0",
|
|
21
|
+
"@std/assert": "jsr:@std/assert@^1.0.0",
|
|
22
|
+
"@std/async": "jsr:@std/async@^1.0.0",
|
|
23
|
+
"@std/fmt": "jsr:@std/fmt@^1.0.0",
|
|
24
|
+
"@cliffy/command": "jsr:@cliffy/command@1.0.0-rc.8",
|
|
25
|
+
"dnt": "https://deno.land/x/dnt@0.40.0/mod.ts"
|
|
26
|
+
}
|
|
27
|
+
};
|
package/esm/package.json
ADDED
package/package.json
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seyuna/cli",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
4
|
-
"main": "./index.js",
|
|
5
|
-
"bin": {
|
|
6
|
-
"seyuna": "./bin/seyuna.js"
|
|
7
|
-
},
|
|
8
|
-
"scripts": {
|
|
9
|
-
"postinstall": "node ./install.js"
|
|
10
|
-
},
|
|
3
|
+
"version": "1.0.0-canary.16",
|
|
11
4
|
"description": "Seyuna CLI",
|
|
12
|
-
"
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/seyuna-corp/seyuna-cli.git"
|
|
8
|
+
},
|
|
13
9
|
"license": "MIT",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/seyuna-corp/seyuna-cli/issues"
|
|
12
|
+
},
|
|
13
|
+
"module": "./esm/src/main.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./esm/src/main.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
14
19
|
"engines": {
|
|
15
20
|
"node": ">=18"
|
|
16
21
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
22
|
+
"bin": {
|
|
23
|
+
"seyuna": "./esm/main.js"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@deno/shim-deno": "~0.18.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^20.9.0"
|
|
20
30
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"@seyuna/cli-linux": "1.0.0-canary.12",
|
|
24
|
-
"@seyuna/cli-win32": "1.0.0-canary.12"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
31
|
+
"_generatedBy": "dnt@0.40.0"
|
|
32
|
+
}
|
package/bin/seyuna.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { spawn } = require("child_process");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const os = require("os");
|
|
5
|
-
|
|
6
|
-
const exe = os.platform() === "win32" ? "seyuna.exe" : "seyuna";
|
|
7
|
-
const binPath = path.join(__dirname, exe);
|
|
8
|
-
|
|
9
|
-
const proc = spawn(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
10
|
-
proc.on("exit", code => process.exit(code));
|
package/install.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const os = require("os");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
|
|
5
|
-
const platform = os.platform();
|
|
6
|
-
let pkg;
|
|
7
|
-
|
|
8
|
-
switch (platform) {
|
|
9
|
-
case "darwin":
|
|
10
|
-
pkg = "@seyuna/cli-darwin";
|
|
11
|
-
break;
|
|
12
|
-
case "linux":
|
|
13
|
-
pkg = "@seyuna/cli-linux";
|
|
14
|
-
break;
|
|
15
|
-
case "win32":
|
|
16
|
-
pkg = "@seyuna/cli-win32";
|
|
17
|
-
break;
|
|
18
|
-
default:
|
|
19
|
-
console.error(`Unsupported platform: ${platform}`);
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const binSrc = require.resolve(`${pkg}/bin/seyuna${platform === "win32" ? ".exe" : ""}`);
|
|
25
|
-
const binDest = path.join(__dirname, "bin", `seyuna${platform === "win32" ? ".exe" : ""}`);
|
|
26
|
-
|
|
27
|
-
fs.mkdirSync(path.dirname(binDest), { recursive: true });
|
|
28
|
-
fs.copyFileSync(binSrc, binDest);
|
|
29
|
-
|
|
30
|
-
if (platform !== "win32") {
|
|
31
|
-
fs.chmodSync(binDest, 0o755);
|
|
32
|
-
} else {
|
|
33
|
-
// Create Windows CMD shim
|
|
34
|
-
const cmdShimPath = path.join(__dirname, "bin", "seyuna.cmd");
|
|
35
|
-
fs.writeFileSync(cmdShimPath, `@echo off\r\n"${binDest}" %*`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
console.log(`seyuna installed for ${platform}`);
|
|
39
|
-
} catch (err) {
|
|
40
|
-
console.error(`Failed to install seyuna for ${platform}:`, err);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|