better-schemic 0.1.0-alpha.1
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 +7 -0
- package/bin.mjs +15 -0
- package/package.json +28 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vertio Solutions
|
|
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,7 @@
|
|
|
1
|
+
# better-schemic
|
|
2
|
+
|
|
3
|
+
The [Better-schemic](https://github.com/NONSTANDARDCODE/better-schemic) CLI — schema-as-code migrations for any database.
|
|
4
|
+
|
|
5
|
+
This is a convenience alias for [`@better-schemic/cli`](https://www.npmjs.com/package/@better-schemic/cli): it lets
|
|
6
|
+
you run the CLI as `bunx better-schemic` / `npx better-schemic` (or install it for the `better-schemic` / `sc` bins). To
|
|
7
|
+
start a new project use `bun create better-schemic`; to add Better-schemic to an existing one, `better-schemic init`.
|
package/bin.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `better-schemic` / `sc` — a thin alias that runs the real CLI from @better-schemic/cli. Resolves the CLI's
|
|
3
|
+
// package.json (an exported subpath), reads its `bin`, and imports that file directly (a file URL
|
|
4
|
+
// bypasses the package `exports` map), so it never depends on @better-schemic/cli exposing lib/ as a subpath.
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { dirname, join } from "node:path";
|
|
8
|
+
import { pathToFileURL } from "node:url";
|
|
9
|
+
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
11
|
+
const pkgJsonPath = require.resolve("@better-schemic/cli/package.json");
|
|
12
|
+
const { bin } = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
|
|
13
|
+
const entry =
|
|
14
|
+
typeof bin === "string" ? bin : (bin["better-schemic"] ?? bin.schemic);
|
|
15
|
+
await import(pathToFileURL(join(dirname(pkgJsonPath), entry)).href);
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "better-schemic",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "The Better-schemic CLI — schema-as-code migrations for SurrealDB. Alias for @better-schemic/cli (bunx better-schemic / npx better-schemic).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Vertio Solutions",
|
|
7
|
+
"homepage": "https://github.com/NONSTANDARDCODE/better-schemic",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/NONSTANDARDCODE/better-schemic.git",
|
|
11
|
+
"directory": "packages/better-schemic"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"bin": {
|
|
15
|
+
"better-schemic": "bin.mjs",
|
|
16
|
+
"sc": "bin.mjs"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"bin.mjs",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@better-schemic/cli": "^0.1.0-alpha.0"
|
|
27
|
+
}
|
|
28
|
+
}
|