create-sverka 0.0.0 → 0.2.3
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/bin.d.mts +1 -0
- package/dist/bin.mjs +15 -0
- package/dist/bin.mjs.map +1 -0
- package/dist/index.d.mts +13 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +25 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +34 -10
- package/README.md +0 -3
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
//#region src/bin.ts
|
|
4
|
+
try {
|
|
5
|
+
const { createSverka } = await import("./index.mjs");
|
|
6
|
+
process.exitCode = await createSverka(process.argv.slice(2));
|
|
7
|
+
} catch (e) {
|
|
8
|
+
const msg = e instanceof Error ? e.stack ?? e.message : String(e);
|
|
9
|
+
process.stderr.write(`fatal: ${msg}\n`);
|
|
10
|
+
process.exitCode = 3;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export {};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=bin.mjs.map
|
package/dist/bin.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\nimport process from \"node:process\";\n\ntry {\n // Dynamic import so a missing sverka dist (partial build) lands here as a\n // readable error instead of Node's raw ERR_MODULE_NOT_FOUND.\n const { createSverka } = await import(\"./index.js\");\n // Set process.exitCode and let the event loop drain instead of calling\n // process.exit() immediately — a forced exit can truncate buffered\n // stdout/stderr writes when output is piped or large.\n process.exitCode = await createSverka(process.argv.slice(2));\n} catch (e: unknown) {\n const msg = e instanceof Error ? (e.stack ?? e.message) : String(e);\n process.stderr.write(`fatal: ${msg}\\n`);\n process.exitCode = 3;\n}\n"],"mappings":";;;AAGA,IAAI;CAGF,MAAM,EAAE,iBAAiB,MAAM,OAAO;CAItC,QAAQ,WAAW,MAAM,aAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC7D,SAAS,GAAY;CACnB,MAAM,MAAM,aAAa,QAAS,EAAE,SAAS,EAAE,UAAW,OAAO,CAAC;CAClE,QAAQ,OAAO,MAAM,UAAU,IAAI,GAAG;CACtC,QAAQ,WAAW;AACrB"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Run `sverka init` with create-* argument translation.
|
|
4
|
+
*
|
|
5
|
+
* `npm create sverka` / `bun create sverka` / `bunx create-sverka` resolve
|
|
6
|
+
* this package by the create-* convention. A leading positional argument
|
|
7
|
+
* is the target directory (e.g. `bun create sverka my-app`) and maps to
|
|
8
|
+
* `sverka init --root <dir>` — init creates the directory itself.
|
|
9
|
+
* Everything else forwards verbatim.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createSverka(argv: string[]): Promise<number>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;wBAWgB,aAAa,iBAAiB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { main } from "sverka";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
/**
|
|
4
|
+
* Run `sverka init` with create-* argument translation.
|
|
5
|
+
*
|
|
6
|
+
* `npm create sverka` / `bun create sverka` / `bunx create-sverka` resolve
|
|
7
|
+
* this package by the create-* convention. A leading positional argument
|
|
8
|
+
* is the target directory (e.g. `bun create sverka my-app`) and maps to
|
|
9
|
+
* `sverka init --root <dir>` — init creates the directory itself.
|
|
10
|
+
* Everything else forwards verbatim.
|
|
11
|
+
*/
|
|
12
|
+
function createSverka(argv) {
|
|
13
|
+
const userArgs = [...argv];
|
|
14
|
+
const cliArgs = ["init"];
|
|
15
|
+
const positional = userArgs[0];
|
|
16
|
+
if (positional !== void 0 && !positional.startsWith("-")) {
|
|
17
|
+
userArgs.shift();
|
|
18
|
+
cliArgs.push("--root", positional);
|
|
19
|
+
}
|
|
20
|
+
return main([...cliArgs, ...userArgs]);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { createSverka };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { main } from \"sverka\";\n\n/**\n * Run `sverka init` with create-* argument translation.\n *\n * `npm create sverka` / `bun create sverka` / `bunx create-sverka` resolve\n * this package by the create-* convention. A leading positional argument\n * is the target directory (e.g. `bun create sverka my-app`) and maps to\n * `sverka init --root <dir>` — init creates the directory itself.\n * Everything else forwards verbatim.\n */\nexport function createSverka(argv: string[]): Promise<number> {\n const userArgs = [...argv];\n const cliArgs = [\"init\"];\n const positional = userArgs[0];\n if (positional !== undefined && !positional.startsWith(\"-\")) {\n userArgs.shift();\n cliArgs.push(\"--root\", positional);\n }\n return main([...cliArgs, ...userArgs]);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,aAAa,MAAiC;CAC5D,MAAM,WAAW,CAAC,GAAG,IAAI;CACzB,MAAM,UAAU,CAAC,MAAM;CACvB,MAAM,aAAa,SAAS;CAC5B,IAAI,eAAe,KAAA,KAAa,CAAC,WAAW,WAAW,GAAG,GAAG;EAC3D,SAAS,MAAM;EACf,QAAQ,KAAK,UAAU,UAAU;CACnC;CACA,OAAO,KAAK,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bugs": "https://github.com/sverka-dev/sverka/issues",
|
|
3
|
-
"description": "Placeholder for create-sverka published by @nx-devkit/prepare-for-release.",
|
|
4
|
-
"homepage": "https://sverka.dev",
|
|
5
|
-
"license": "MIT",
|
|
6
2
|
"name": "create-sverka",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "Scaffold a Sverka project — `npm create sverka` / `bun create sverka`",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": false,
|
|
11
7
|
"repository": {
|
|
12
8
|
"type": "git",
|
|
13
9
|
"url": "git+https://github.com/sverka-dev/sverka.git",
|
|
14
10
|
"directory": "packages/create-sverka"
|
|
15
11
|
},
|
|
12
|
+
"homepage": "https://sverka.dev",
|
|
13
|
+
"bugs": "https://github.com/sverka-dev/sverka/issues",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
16
17
|
"type": "module",
|
|
17
|
-
"
|
|
18
|
-
|
|
18
|
+
"main": "./dist/index.mjs",
|
|
19
|
+
"module": "./dist/index.mjs",
|
|
20
|
+
"types": "./dist/index.d.mts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.mts",
|
|
24
|
+
"import": "./dist/index.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"create-sverka": "dist/bin.mjs"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsdown",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"lint": "eslint src",
|
|
37
|
+
"typecheck": "tsc --noEmit"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"sverka": "^0.2.3"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/README.md
DELETED